What are ROS actions and how do they relate to topics and services?
Nodes: all code written for ROS is a Node
A node is like a process
You run it with, e.g.
Topics: the fundamental way nodes communicate with each other
Publishers and Subscribers
Message with data types
Services: Synchronous communication
Ask and answer
Like a function call
For long running activities, for example, navigate to somewhere
Activity is initiated
Activity announces that it has terminated (successfully or not.)
From time to time it reports its progress
When defined as an action, this corresponds to three submessages
Part1: the goal (initiate the request)
Part2: the result (report completion)
Part3: the action is running (status update)
Creating an Action
Analogous to topics and services
File now has three sections corresponding to the goal, result and feedback
Some tricky updates to CMakeList.txt and package.xml
Handles the three submessages (see simple_action_server.py)
Declare that we want to serve action requests and start it
Wait for callback to be called.
Run the server
Notice that there are now 5 topics generated from that one Timer.action file
Notice that the messages associated with the actions also have had more information atached to them
Node which will now ask request an action
Declare that we want to be an action client, and start it
Begin the ball rolling by sending the goal to the action server
Now block and wait for the action to complete.
Run the client
Notice that it displays the result of the fake action
Getting fancier - Server
Callback of the sever handles all three parts
First called when the goal is sent
Check whether the goal is reasonable and abort if not.
Begin performing the action.
Reguarly check whether preemption was requested
Whenever desired, send a feedback message
When done send completion message.
Getting fancier – Client
Connect to action server
Send it the goal, while declaring handler for feedback calls
Wait for completion or abort.
List of lectures
Selection of key papers
Schedule of Papers
Robotics and ROS
2: ROS at a high level
6: Robots and Simulators
7: Wander Bot
9: Building Maps
11: Chess Bot
12: Follow Bot
Brandeis Robotics Network
Guidelines to Charging Lipos
Reports from previous Generations