filmov
tv
Getting Started with ROS Part 2: Services and Actions

Показать описание
All robots based on ROS are programmed using five simple but core constructs, and you'll hear these often:
- Nodes
- Parameters
- Topics
- Services
- Actions
In this video we cover services and actions.
Commands used in this video:
Show services in the current ROS graph:
💻 ros2 service list
Show services and service type:
💻 ros2 service list -t
💻 ros2 service type [service; e.g., /spawn]
Filter parameter-related services from the service list:
💻 ros2 service list | grep -v param
Show actions in the current ROS graph:
💻 ros2 action list
Display message, service or action interface details:
💻 ros2 interface show [interface; e.g., turtlesim/srv/Spawn]
Call the spawn service to add a turtle named "snapper" to the turtlesim playfield:
💻 ros2 service call /spawn turtlesim/srv/Spawn "{x: 1, y: 1, theta: 3.14, name: 'snapper'}"
Discover and use the turtlesim service to kill an existing turtle
💻 ros2 service type /kill
💻 ros2 interface show turtlesim/srv/Kill
💻 ros2 service call /kill turtlesim/srv/Kill '{name: snapper}'
Send a rotation goal to turtle1 in the turtlesim simulator:
💻 ros2 action send_goal /turtle1/rotate_absolute turtlesim/action/RotateAbsolute "{theta: 3.14}"
💻 ros2 action send_goal /turtle1/rotate_absolute turtlesim/action/RotateAbsolute "{theta: 0.00}" --feedback
Retrieve detailed information about the turtlesim node:
💻 ros2 node info /turtlesim
––––––––––––––––––––––––––––––
Soundtrack:
Creative Commons — Attribution-ShareAlike 3.0 Unported— CC BY-SA 3.0
Subscribe to Ubuntu on YouTube for more content like this:
And follow our other social accounts:
LinkedIn:
Twitter:
Facebook:
Instagram:
#linux #ubuntu #canonical #opensource
- Nodes
- Parameters
- Topics
- Services
- Actions
In this video we cover services and actions.
Commands used in this video:
Show services in the current ROS graph:
💻 ros2 service list
Show services and service type:
💻 ros2 service list -t
💻 ros2 service type [service; e.g., /spawn]
Filter parameter-related services from the service list:
💻 ros2 service list | grep -v param
Show actions in the current ROS graph:
💻 ros2 action list
Display message, service or action interface details:
💻 ros2 interface show [interface; e.g., turtlesim/srv/Spawn]
Call the spawn service to add a turtle named "snapper" to the turtlesim playfield:
💻 ros2 service call /spawn turtlesim/srv/Spawn "{x: 1, y: 1, theta: 3.14, name: 'snapper'}"
Discover and use the turtlesim service to kill an existing turtle
💻 ros2 service type /kill
💻 ros2 interface show turtlesim/srv/Kill
💻 ros2 service call /kill turtlesim/srv/Kill '{name: snapper}'
Send a rotation goal to turtle1 in the turtlesim simulator:
💻 ros2 action send_goal /turtle1/rotate_absolute turtlesim/action/RotateAbsolute "{theta: 3.14}"
💻 ros2 action send_goal /turtle1/rotate_absolute turtlesim/action/RotateAbsolute "{theta: 0.00}" --feedback
Retrieve detailed information about the turtlesim node:
💻 ros2 node info /turtlesim
––––––––––––––––––––––––––––––
Soundtrack:
Creative Commons — Attribution-ShareAlike 3.0 Unported— CC BY-SA 3.0
Subscribe to Ubuntu on YouTube for more content like this:
And follow our other social accounts:
LinkedIn:
Twitter:
Facebook:
Instagram:
#linux #ubuntu #canonical #opensource
Комментарии