Ask Your Question
0

[ROS2][bag]not record rotation data [closed]

asked 2019-12-17 20:39:00 -0600

lin404 gravatar image

updated 2019-12-19 00:00:16 -0600

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?

edit retag flag offensive reopen merge delete

Closed for the following reason duplicate question by lin404
close date 2020-01-19 21:41:28.412267

1 Answer

Sort by ยป oldest newest most voted
0

answered 2019-12-18 06:52:12 -0600

ct2034 gravatar image

The cmd_velmessage contains both, translation and rotation. But the absolute rotations from the teleop tool use actions (https://index.ros.org/doc/ros2/Tutori...).

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

edit flag offensive delete link more

Comments

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!

lin404 gravatar image lin404  ( 2019-12-18 23:11:49 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2019-12-17 20:39:00 -0600

Seen: 62 times

Last updated: Dec 19 '19