Skip to content

Public Repo for the Cornell Blossom Robot

License

Notifications You must be signed in to change notification settings

wenhaox/blossom-public

Repository files navigation

Blossom

Python-based control library for Blossom or Dynamixel-controlled robots. Written for computer-tethering and streamlining the pipeline from software tasks to robot control.

Get repo

In a terminal, clone this repo

git clone https://github.com/hrc2/blossom-public/

Download through a package will be added in the future.

Setup

Make sure you're using Python 2.7.

Also ensure that pip is installed.

Make a venv (virtual environment) in the top blossom directory:

virtualenv venv
source venv/bin/activate

Interfaces

To be able to run the web UI or start the mobile app, install yarn.

Then cd into the blossom_web directory and run yarn install.

Server

To install dependencies, run

pip install -r requirements.txt

Mac OSX: You may need to append --user to the pip command to circumvent installation issues:

pip install -r requirements.txt --user

If this still doesn't work, you may have to append sudo before pip:

sudo pip install -r requirements.txt --user

This may require you to run in sudo for subsequent steps.

It may take a while to install the dependencies; you may want to run pip verbose to make sure that it's still downloading: pip install -rv requirements.txt

If you run into an error opening a port, try changing Blossom's permissions: sudo chmod 777 /dev/ttyACM0. Alternatively, rerun everything with admin privileges.

If you're using OSX and getting strange errors, try:

sudo chown -R $USER /Library/Python/2.7

Installation will take longer on a Raspberry Pi, and you may need additional dependencies:

sudo apt-get install xvfb

CLI

To start the CLI, plug Blossom in and run

python start.py -n [robot_name]

For example, to start Woody:

python start.py -n woody

Additional flags:

-b do not start up web ui
-p denote the port
-i specify an IP address (won't work with localhost)

Linux may default to a loopback IP (127.0.1.1); in this case you must specify the IP address using -i.

Available commands:

  • l: list available sequences
  • s: perform a sequence, followed by sequence name
    • e.g. s -> Enter -> yes
    • To perform an idler (looped gesture), enter two sequence names separated by =, e.g. s -> Enter -> yes=no (play yes then loop no indefinitely until another sequence is played).
  • q: quit

GUI

The GUI should be accessible via localhost:8000 after starting up the CLI if -b was not specified. Otherwise, the CLI should print a message stating the server url.

Mobile app

The app can be installed on iOS or Android via the Expo Client app (available in the respective app stores). From within the app, search for https://exp.host/@michaelhu/blossom-app.

Android: if Blossom is not controllable at first, unfocus and refocus the app.

iOS: Expo now no longer supports QR scanning or URL entry, so you must have an Expo account to publish and "test" the app; instructions are in BlossomApp.

About

Public Repo for the Cornell Blossom Robot

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 96.4%
  • Python 2.8%
  • HTML 0.4%
  • Objective-C 0.1%
  • Ruby 0.1%
  • Java 0.1%
  • Other 0.1%