Skip to content

A toolkit for generating robot instructions from within Rhino3d's Grasshopper plugin.

License

Notifications You must be signed in to change notification settings

gruedisueli/Create3-Grasshopper-Toolkit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Create3-Grasshopper-Toolkit

A toolkit for generating robot instructions from within Rhino3d's Grasshopper plugin.

Installation instructions:

Grasshopper

  1. Install Rhino 7
  2. Open Rhino
  3. Run "grasshopper" command
  4. In the Grasshopper window go to "File" --> "Special Folders" --> "Components Folder"
  5. In the explorer window that pops up, copy the GHA for this assembly into that folder
    1. 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.
  6. Restart Rhino and Grasshopper to load the assembly.

Ros2 Installation on either Raspberry Pi or Virtual Machine:

  1. If running on a Raspberry Pi
    1. 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.
    2. Install Ubuntu 22.04 LTS 64bit Desktop on the SD card using the directions found here
      1. In the raspberry pi tool on your PC, select "other general purpose OS" --> "Ubuntu" --> "Ubuntu Desktop 22.04 64bit"
      2. Select destination drive (SD card)
      3. Click "write"
      4. When it's done, you can eject the SD card and insert it into your Pi.
  2. If setting up a virtual machine:
    1. Download Oracle VM Virtual Box (or your preferred virtual machine software)
    2. Set up a virtual machine with at least 4gb of RAM, 2 CPUs, and 32gb of storage.
    3. Install Ubuntu 22.04 TS 64 bit Desktop on it from an image you download.
    4. 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.
  3. After Ubuntu is set up
  4. Start your system (either Pi or virtual machine)
  5. If you need to set up user credentials, do so
  6. After you're logged into the Desktop, open a terminal window
  7. Follow the directions found here to install Ros2 on your system.
    1. Make sure you install the desktop version of Humble
    2. Use the option for cyclonedds middleware, or whatever middleware your Create3 is running.
  8. 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
  9. 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:
    1. Follow the installation instructions found here, using "Method 2", EXCEPT IN STEP 4 of "Method 2" do this:
      1. In "Step 4" change the command to say "set[arm64]" instead of the default. This will find the correct install package for your processor.
    2. After you install code, verify that it works by typing "code ." in the terminal and making sure the VS code opens
  10. Set up the Ros2 syntax highlighting for VS code here
  11. Install git, using the directions for "install git on Linux" here
  12. Install Python3 "sudo apt install python3"
  13. 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.
  14. 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
    

Recommended use of the ros2 workspace in this project:

  1. Create a fork of this repository so that you can make your own additions to robot behaviors.
  2. 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.
  3. Navigate to the ros2_ws subdirectory of the project in your local clone of the repo.
  4. Run "colcon build --symlink-install"
  5. Run "gedit ~/.bashrc"
  6. 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"
    1. 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:

  1. Again, this is not necessary if you are just forking the repo and working off of it.
  2. If you decide to create a new codebase in a completely fresh ros2 workspace, then you'll need to do this.
  3. Set up your ros2 workspace following instructions in this tutorial, which I've outlined below:
    1. create an empty repo, clone it locally
    2. add to .gitignore file:
        /ros2_ws/build
        /ros2_ws/install
        /ros2_ws/log
        *.pyc
    
    1. in the repo root, run "mkdir ros2_ws"
    2. "cd ros2_ws"
    3. "mkdir src"
    4. "colcon build", verify that 3 folders are created in the ros2_ws directory: "install", "build", and "log"
    5. cd "src"
    6. "ros2 pkg create {name of your project without spaces} --build-type ament_python --dependencies rclpy"
    7. 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"
    8. you can now build the project from the ros2_ws directory by running "colcon build --symlink-install"
    9. finally, you can commit your changes to your repo.

Highly recommended tutorials on Ros2!

  1. There is an OUTSTANDING tutorial for Ros2 found here
  2. Additionally, you can set up syntax highlighting for VS Code with Ros2 here
  3. The Ros2 Humble Docs are also excellent and provide both high level and detailed information.

Setup of Create3 robot

  1. Please refer to iRobot's extensive documentation found here
  2. Also, the iRobot Learning Library contains hours of useful tutorials.

About

A toolkit for generating robot instructions from within Rhino3d's Grasshopper plugin.

Resources

License

Stars

Watchers

Forks

Packages

No packages published