Getting around the Pi
Jump to navigation
Jump to search
Here's a list of commands commonly used on the Pi, grouped by purpose. You'll probably want to be familiar with how we use ROS first.
Getting around
cd
. With no arguments, goes to the home directory. With an argument, changes to that directory. Press TAB while typing an argument to try to autocomplete it. With an argument of..
, goes one level up.roscd
. The evil twin ofcd
. Takes an argument of the form <PACKAGE> (usually "bike"), or <PACKAGE>/<PATH>. Our code (as of February 2020) is all in the "scripts" directory under the main package directory, which has three subdirectories:- Launch, which has ROS launch files. They describe how to start a collection of ROS nodes.
- Navigation, which is a checkout of our Navigation repo. It has Python navigation files.
- Startup, which is a checkout of our Startup repo. It has two Bash scripts, that start and end testing runs.
Running things
- We use roslaunch files to start the correct combination of ROS nodes.
- There's a script called
start.sh
in the home directory of the Pi. It runs the appropriate launch commands. It sets some environment variables, so run it using the commandsource start.sh <LAUNCH FILE>
, where <LAUNCH FILE> is the name of a launch file we use. You can list all of the launch files usingrosls bike/scripts/Launch
.
Printing things
rostopic list
to write out a list of all the ROS topics that have been DEFINED OR USED (not just the ones that've been published to)rostopic echo <TOPIC NAME>
to print out a feed of data published to <TOPIC NAME>. Topic names usually start with a forward slash (for example,/nav_instr
or/bike_state
). Stop it with Ctrl-C. If nothing prints, nothing's being published.
Editing things
Vim and Emacs are installed.