If you are looking for a comprehensive 'Cheat Sheet' of all the commands, the pdf is here. Below is a list of simple ROS(Indigo Igloo) commands with a description on their function.
- You must setup your environment to use ROS on multiple machines.
- ROS_MASTER_URI : Set the address of the robot.
export ROS_MASTER_URI=http://<robot ip>:11311/
- ROS_HOSTNAME : Should be set to the PC you are as the workstation.
export ROS_HOSTNAME=<workstation IP>
- roscd : Changes directory to the location of the specified ROS package
roscd <package name>
- rossrv : show <package name/service type>: dump the given service definition to the terminal
rossrv [show, ...]
- rosmsg : show <package name/message type>: dump the given message definition to the terminal
rosmsg [show, ...]
- rosrun : Runs the given node from the given package. Equivalent to roscd /bin && ./ [, , ...]
rosrun <package name> <executable name> [<arg1>, <arg2>, ...]
- roscore : starts up a roscore node which provides the /rosout topic, among others
roscore
- roslaunch : Roslaunch is used to start a group of nodes with specific topics and parameters. It first checks for a roscore also known as the ros master and checks to see if it is running. Roslaunch will start roscore if one is not found. Then the Launch file runs all of the nodes within the launch file. See also [http://wiki.wpi.edu/robotics/ROS_File_Types ROS Launch File type]
roslaunch <launch folder or package name> <launch file>
- rostopic ...
list
: shows current ROS topics.info <topic name>
: shows the nodes connected to the given topic.echo <topic name>
: displays the raw data being sent on the given topic.pub <topic name> <ROS message type> [<arg2>, <arg3>, ...]
: publishes the given data on the given topic.
- rosservice ...
list
: show current ROS servicescall <topic name> <ROS service type> [<arg2>, <arg3>, ...]
: make a service call to the given topic using the given service type.
- rosnode
- If you are not sure if your node has initialized properly, or is subscribing/publishing to a topic you think it should be, you can use this tool to examine it. This tool will also show you all active nodes, so if your node has died you can find out by using this.
- This is THE debugging tool in ROS. roswtf will scan your packages, environment, and configurations and come up with every possible reason why your program might not be working. It is a bit of an information overload, but with patience you can find most of the flaws using this tool.