ROS: Difference between revisions

 
(16 intermediate revisions by the same user not shown)
Line 1: Line 1:
[http://wiki.ros.org/Documentation ROS] is a software platform for robotics.
[http://wiki.ros.org/Documentation ROS] is a network-capable software platform for robotics, capable of managing processes (nodes), and exchanging information between them. Releases are named, with the current 12th release being Melodic Morenia (typically referred to as Melodic, released 2018-05-23).
 
==ROS on [[Debian]]==
ROS Melodic supports Debian 9 ("stretch") with binary packages. Installation instructions can be found [http://wiki.ros.org/Installation/Debian here]. Debian Unstable requires building from [http://wiki.ros.org/Installation/Source source].


==Concepts==
==Concepts==
* [http://wiki.ros.org/Topics Topic]: a named bus on which messages of a single type are published
** <code>rostopic list</code> will list active topics on a running rosmaster
* [http://wiki.ros.org/Parameter%20Server Parameter]: a key in the global configuration dictionary
** XMLRPC data types
* [http://wiki.ros.org/Packages Package]: defined by a directory containing a file [http://www.ros.org/reps/rep-0127.html package.xml] (REP-0127)
* [http://wiki.ros.org/Packages Package]: defined by a directory containing a file [http://www.ros.org/reps/rep-0127.html package.xml] (REP-0127)
** msg/MyMessageType.msg defines messages for the package, published to topics
** msg/MyMessageType.msg defines messages for the package, published to topics
Line 13: Line 11:
** A running node has a type and a graph resource name
** A running node has a type and a graph resource name
** A node is typically launched standalone using [http://wiki.ros.org/rosbash#rosrun rosrun]
** A node is typically launched standalone using [http://wiki.ros.org/rosbash#rosrun rosrun]
** If a node is started with the name of an existing node, the existing node is stopped
* [http://wiki.ros.org/Master Master]: implemented by the [http://wiki.ros.org/rosmaster rosmaster] package, usually started via <code>roscore</code>
* [http://wiki.ros.org/Master Master]: implemented by the [http://wiki.ros.org/rosmaster rosmaster] package, usually started via <code>roscore</code>
* [http://wiki.ros.org/Topics Topic]: a named bus on which messages of a single type are published
** A topic can be latched, meaning that new subscribers get the last message published
* [http://wiki.ros.org/Services Service]: a named synchronous procedure, implemented by some Node
** Connections can be persistent according to the client's choice
* [http://wiki.ros.org/Parameter%20Server Parameter]: a key in the global configuration dictionary
** XMLRPC data types
* [http://wiki.ros.org/Bags Bag]: a recorded/pregenerated set of messages that can be replayed


==Names==
==Names==
Line 22: Line 28:
* ~private (the node's name replaces the tilde)
* ~private (the node's name replaces the tilde)


Names can furthermore be [http://wiki.ros.org/Remapping%20Arguments remapped] when a node is started by e.g. rosrun.
Names can furthermore be [http://wiki.ros.org/Remapping%20Arguments remapped] when a node is started by e.g. <code>rosrun</code>.
* Special case: launch node into namespace with <code>__ns</code>
* Special case: change node name with variable <code>__name</code>
** To launch barnode with the name barnode3: <code>roslaunch foopkg barnode __name:=barnode3</code>


==Executables==
==Executables==
Line 28: Line 37:
* [http://wiki.ros.org/roslaunch roslaunch]: starts collections of nodes specified in a [http://wiki.ros.org/roslaunch/XML launch] XML file
* [http://wiki.ros.org/roslaunch roslaunch]: starts collections of nodes specified in a [http://wiki.ros.org/roslaunch/XML launch] XML file
** roscore: roslaunch to start core ros functionality
** roscore: roslaunch to start core ros functionality
* [http://wiki.ros.org/rosnode rosnode]: manage running nodes
** <code>rosnode list</code> lists running nodes
** <code>rosnode info</code> displays information about a running node
* [http://wiki.ros.org/rostopic rostopic]: interact with topics using YAML
** <code>rostopic list</code> will list active topics on a running rosmaster
** <code>rostopic echo</code> echoes messages from the topic
* [http://wiki.ros.org/rosservice rosservice]: interact with services using YAML
* [http://wiki.ros.org/rosmsg rosmsg]: display information about message types
* [http://wiki.ros.org/rosmsg#rossrv rossrv]: display information about services
* [http://wiki.ros.org/rospack rospack]: display information about packages
* rosversion: display version of available packages
* [http://wiki.ros.org/rosbag rosbag]: replay and inspect bags