Difference between revisions of "ROS"

From Bike Wiki
Jump to navigation Jump to search
(+newlines)
(Nodes)
Line 4: Line 4:
 
(how do I start ROS? what is roscore?)
 
(how do I start ROS? what is roscore?)
 
== Nodes ==
 
== Nodes ==
(what are nodes?)<br />
+
A node is a process that performs computation. Each node is an independent part of your application, and they can be combined together into a graph. A robot control system will usually comprise many nodes.
 +
 
 +
Nodes can communicate with other nodes through ROS communication tools (topics, services, and actions).
 +
 
 +
Nodes provide several benefits. For one, there is fault tolerance - crashes are isolated to individual nodes. Code complexity is also reduced compared to monolithic systems. Finally, implementation details are well hidden as the nodes expose a minimal API to the rest of the graph.
 +
 
 +
'''How do I start a new node?'''
 +
There are two levels of initialization for a roscpp Node.
 +
First, you can initialize a node through a call to one of the <code>ros::init()</code> functions.
 +
Second, the node is started through the creation of a <code>ros::NodeHandle</code>.
 +
 
(how do I interact with nodes? how do I start a new node? how do I shut down a node? all nodes?)
 
(how do I interact with nodes? how do I start a new node? how do I shut down a node? all nodes?)
 
=== rosserial_arduino ===
 
=== rosserial_arduino ===
 
(what's special about this node?)
 
(what's special about this node?)
 +
 
== Topics ==
 
== Topics ==
 
(what's a topic?)<br />
 
(what's a topic?)<br />

Revision as of 03:45, 5 May 2019

We use ROS to send messages between the Pi and the Due. As of April 2019, we use the Indigo Igloo version, released in 2014, on the Pi.

Starting ROS and roscore

(how do I start ROS? what is roscore?)

Nodes

A node is a process that performs computation. Each node is an independent part of your application, and they can be combined together into a graph. A robot control system will usually comprise many nodes.

Nodes can communicate with other nodes through ROS communication tools (topics, services, and actions).

Nodes provide several benefits. For one, there is fault tolerance - crashes are isolated to individual nodes. Code complexity is also reduced compared to monolithic systems. Finally, implementation details are well hidden as the nodes expose a minimal API to the rest of the graph.

How do I start a new node? There are two levels of initialization for a roscpp Node. First, you can initialize a node through a call to one of the ros::init() functions. Second, the node is started through the creation of a ros::NodeHandle.

(how do I interact with nodes? how do I start a new node? how do I shut down a node? all nodes?)

rosserial_arduino

(what's special about this node?)

Topics

(what's a topic?)
(how can I interact with topics from the command line using the rostopic tool?)
(how can I interact with topics using nodes?)

Messages

(what's a message (aka a data type for a topic, service, etc)?)
(what are the most helpful available message types?)
(how do I work with Float32MultiArrays in Python and C++, since that's the most frequently used message?)
(how do I create my own message?)