본문 바로가기
기계공학부 시절의 기록/ROS2 Study

ROS2 course week5. homework

by juhyeonglee 2021. 10. 6.
728x90
반응형

1. service call

$ ros2 run turtlesim 

$ ros2 run turtlesim turtle_teleop_key

$ ros2 service call /clear std_srvs/srv/Empty 

 

$ ros2 service call /turtle1/set_pen turtlesim/srv/SetPen "{r: 255, g: 0, b: 0, width: 10}"

 

 

$ ros2 service call /spawn turtlesim/srv/Spawn "{x: 2, y: 2, theta: 0.2, name: 'turtle3'}"

 

 

 

2. action

$ ros2 action list -t

 

$ ros2 action info /turtle1/rotate_absolute

 

$ ros2 action send_goal /turtle1/rotate_absolute turtlesim/action/RotateAbsolute "{theta: 1.5708}"

$ ros2 action send_goal /turtle1/rotate_absolute turtlesim/action/RotateAbsolute "{theta: 1.5708}" --feedback

 

 

 

 

 

3. inerface : data type for ROS2 communication

 

$ ros2 topic list -t

 

$ ros2 interface show geometry_msgs/msg/Twist

$ ros2 interface show geometry_msgs/msg/Vector3

$ ros2 interface list

 

$ ros2 interface packages

 

 

 

 

 

 

 

 

 

 

 

 

https://discourse.ros.org/t/mini-pupper-ros-opencv-open-source-pi-robot-dog/22177

 

 

728x90
반응형

댓글