-
Notifications
You must be signed in to change notification settings - Fork 0
Testing your own code on a robot
For both ergonomic and resource allocation reasons, it's inadvisable to work physically in front of the robot. Instead, we encourage you to only touch the robot when you're ready to run code immediately.
-
Verify that your code compiles locally. When you are ready to test on the robot, continue.
-
In a separate, local shell use
rsync
to copy your files to the robot. Say you don't already have a workspace on the robot. Use your SSH session to make the path to the workspace source directory (mkdir -p ~/catkin_ws/src
). Now we can copy over your local source files with the below:
rsync -havz ~/catkin_ws/src <bwi username>@<robot IP address>:"~/catkin_ws"
It's important that you don't copy over the devel
or build
folder! Files in these paths are machine-specific and will cause confusing errors if used on the robot as-is.
Note that rsync will copy files incrementally. Next time you run the command, it won't waste any time sending files that haven't changed on the robot. So, you can run this command every time you make an update locally to mirror the changes on the robot.
- Build on the robot over SSH:
catkin build
- Source the workspace, and run your code!