A toolkit for generating robot instructions from within Rhino3d's Grasshopper plugin.
- Install Rhino 7
- Open Rhino
- Run "grasshopper" command
- In the Grasshopper window go to "File" --> "Special Folders" --> "Components Folder"
- In the explorer window that pops up, copy the GHA for this assembly into that folder
- If you downloaded this GHA, make sure it is "unblocked" by right clicking on it, going to "properties" and selecting "unblock" in the window that pops up.
- Restart Rhino and Grasshopper to load the assembly.
- If running on a Raspberry Pi
- Purchase a Raspberry Pi 4B with at least 4gb of memory and a micro SD card, preferably with a very high read/write speed (Class 10) and at least 32gb memory.
- Install Ubuntu 22.04 LTS 64bit Desktop on the SD card using the directions found here
- In the raspberry pi tool on your PC, select "other general purpose OS" --> "Ubuntu" --> "Ubuntu Desktop 22.04 64bit"
- Select destination drive (SD card)
- Click "write"
- When it's done, you can eject the SD card and insert it into your Pi.
- If setting up a virtual machine:
- Download Oracle VM Virtual Box (or your preferred virtual machine software)
- Set up a virtual machine with at least 4gb of RAM, 2 CPUs, and 32gb of storage.
- Install Ubuntu 22.04 TS 64 bit Desktop on it from an image you download.
- Make sure your Virtual Machine's network adapter settings are set to "bridged" to prevent communication issues with the Create3. You can change these settings in Virtual Box.
- After Ubuntu is set up
- Start your system (either Pi or virtual machine)
- If you need to set up user credentials, do so
- After you're logged into the Desktop, open a terminal window
- Follow the directions found here to install Ros2 on your system.
- Make sure you install the desktop version of Humble
- Use the option for cyclonedds middleware, or whatever middleware your Create3 is running.
- After installation is complete, you should be able to test out ros2 by running the command "ros2 topic list" from the terminal window. It may not show any nodes, if your robots are not yet on your network, but at least it should not give you errors. If there is an error message, installation was not successful
- Install VS code. For a virtual machine, you can follow directions you find online for installing the software, for Raspberry Pi, you need to perform a special install because the Pi runs on an ARM processor and the typical install won't work:
- Follow the installation instructions found here, using "Method 2", EXCEPT IN STEP 4 of "Method 2" do this:
- In "Step 4" change the command to say "set[arm64]" instead of the default. This will find the correct install package for your processor.
- After you install code, verify that it works by typing "code ." in the terminal and making sure the VS code opens
- Follow the installation instructions found here, using "Method 2", EXCEPT IN STEP 4 of "Method 2" do this:
- Set up the Ros2 syntax highlighting for VS code here
- Install git, using the directions for "install git on Linux" here
- Install Python3 "sudo apt install python3"
- set the correct version of setup tools "pip install setuptools==58.2.0" because you might get the error outlined here. You might have to install pip first.
- Verify contents of bashrc contains following lines at the bottom, by running the command "gedit ~/.bashrc", adding them if missing:
source /opt/ros/humble/setup.bash source /usr/share/colcon_argcomplete/hook/colcon-argcomplete.bash export RMW_IMPLEMENTATION=rmw_cyclonedds_cpp
- Create a fork of this repository so that you can make your own additions to robot behaviors.
- Create a clone of your forked repository on your local machine, using SSH if you want to be able to push changes back to it.
- Navigate to the ros2_ws subdirectory of the project in your local clone of the repo.
- Run "colcon build --symlink-install"
- Run "gedit ~/.bashrc"
- add at the bottom of the file: "source ~/{your project directory}/ros2_ws/install/setup.bash", OR if running on a non-admin user: "source home/{username}/{path to repo in your user directory}/ros2_ws/install/setup.bash"
- Important, if you are not the admin user, and a separate admin user set up ros2 on your system already, add the following to the .bashrc file as well:
source /opt/ros/humble/setup.bash source /usr/share/colcon_argcomplete/hook/colcon-argcomplete.bash export RMW_IMPLEMENTATION=rmw_cyclonedds_cpp
Separately, if you are not using this repo and are just creating a new ros2 workspace in a fresh repo, here are some directions:
- Again, this is not necessary if you are just forking the repo and working off of it.
- If you decide to create a new codebase in a completely fresh ros2 workspace, then you'll need to do this.
- Set up your ros2 workspace following instructions in this tutorial, which I've outlined below:
- create an empty repo, clone it locally
- add to .gitignore file:
/ros2_ws/build /ros2_ws/install /ros2_ws/log *.pyc
- in the repo root, run "mkdir ros2_ws"
- "cd ros2_ws"
- "mkdir src"
- "colcon build", verify that 3 folders are created in the ros2_ws directory: "install", "build", and "log"
- cd "src"
- "ros2 pkg create {name of your project without spaces} --build-type ament_python --dependencies rclpy"
- After your project is set up, run "gedit ~/.bashrc" and add "source ~/{your project directory}/ros2_ws/install/setup.bash", OR if running on a non-admin user: "source home/{username}/{path to repo in your user directory}/ros2_ws/install/setup.bash"
- you can now build the project from the ros2_ws directory by running "colcon build --symlink-install"
- finally, you can commit your changes to your repo.
- There is an OUTSTANDING tutorial for Ros2 found here
- Additionally, you can set up syntax highlighting for VS Code with Ros2 here
- The Ros2 Humble Docs are also excellent and provide both high level and detailed information.
- Please refer to iRobot's extensive documentation found here
- Also, the iRobot Learning Library contains hours of useful tutorials.