0
$\begingroup$

Rosanswers logo

I am following the tutorial for using ros2 bag

I used command ros2 bag record -o test /turtle1/cmd_vel /turtle1/pose to record the data.
I draw a cycle by pressing T-> forward arrow-> R-> forward arrow-> E-> forward arrow-> D-> forward arrow-> C-> forward arrow-> V-> forward arrow-> B-> forward arrow-> G -> forward arrow
It is 8 times move forward + 8 times rotate = 16 counts

However, when I did ros2 bag play test, the turtle only moves forward then will throw warning msg:hit the wall
So I checked ros2 bag info test, it shows:

Topic information: Topic: /turtle1/cmd_vel | Type: geometry_msgs/msg/Twist | Count: 8 | Serialization Format: cdr
                 Topic: /turtle1/pose | Type: turtlesim/msg/Pose | Count: 6592 | Serialization Format: cdr

It seems it did not record/count the rotate operations.

Any idea why? Or is there any thing I missed?
PS: I am using virtualbox to run the Linux environment for ROS2 in Mac. Could it be the reason?


Originally posted by lin404 on ROS Answers with karma: 60 on 2019-12-17

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

The cmd_vel message contains both, translation and rotation. But the absolute rotations from the teleop tool use actions (https://index.ros.org/doc/ros2/Tutorials/Understanding-ROS2-Actions/).

If you try your experiment again with only using arrow keys, it should work.


Originally posted by ct2034 with karma: 862 on 2019-12-18

This answer was ACCEPTED on the original site

Post score: 0


Original comments

Comment by lin404 on 2019-12-19:
I see. ros2 bag only records data published on topics, but function using 'T|R|E|D|C|V|B|G' keys is provided by action rotate_absolute. Thank you very much!

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.