ROS

From Bike Wiki
Revision as of 03:45, 5 May 2019 by 128.84.126.226 (talk) (Nodes)
Jump to navigation Jump to search

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?)