What are ROS actions and how do they relate to topics and services?
PRR Chapter 5: Actions
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
Action Server (simple_action_server.py)
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 attached to them
Action Client (simple_action_client.py)
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 - (fancy_action_server.py)
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 - (fancy_action_client.py)
Connect to action server
Send it the goal, while declaring handler for feedback calls
Wait for completion or abort.
List of lectures!
Links of Interest
The "Big Ideas"
Sensing and Moving
How do robots know what to do?
ROS Nodes and Simulators
How do robots perceive
Using Sensors via ROS
How do mobile Robots move?
Using ROS to control movement
How do Robots Orient Themselves?
The almighty TF package
How do Robots Know Where they Are?
Guest Lecture: Charlie Squires
AMCL: Localization in practice
Speaker: Keith Merril
How do Robots Know Where To Go?
Term Project Kickoff (Sprint 1)
Term Project Kickoff Continued
Weekly Updates (Sprint 2)
Howo do Robots Know Where to go (Sprint 2)
Weekly Standups (Sprint 3)
Path Planning (Sprint 3)
ELECTRONICS FOR ROBOTICISTS - 1
ELECTRONICS FOR ROBOTICISTS - 2
Final Project Proposals
Guide for Teaching Asssistants!
Programming Guide for PRR Book