cyberbotics / epuck_ros2

ROS2 node for the e-puck robot and its simulation model
https://cyberbotics.com/doc/guide/epuck
Apache License 2.0
57 stars 19 forks source link

Add Odometry topic to `epuck_ros2_cpp` #4

Closed lukicdarkoo closed 4 years ago

lukicdarkoo commented 4 years ago

Description Odometry topic should be added epuck_ros2_cpp package.

Related Issues Closes #3

Tasks

lukicdarkoo commented 4 years ago

The result of psrecord $(pgrep driver) --interval 1 --plot plot1.pdf --duration 60: image

Keep in mind that includes the following topics at rate of 15.6Hz (64ms):

/cmd_vel [geometry_msgs/msg/Twist]
/laser [sensor_msgs/msg/LaserScan]
/odom [nav_msgs/msg/Odometry]
/ps0 [sensor_msgs/msg/Range]
/ps1 [sensor_msgs/msg/Range]
/ps2 [sensor_msgs/msg/Range]
/ps3 [sensor_msgs/msg/Range]
/ps4 [sensor_msgs/msg/Range]
/ps5 [sensor_msgs/msg/Range]
/ps6 [sensor_msgs/msg/Range]
/ps7 [sensor_msgs/msg/Range]
/tf [tf2_msgs/msg/TFMessage]
/tf_static [tf2_msgs/msg/TFMessage]

and having 1 dynamic transform publisher, and 9 static transform publishers. Also, RViz2 was subscribed to the topics.

lukicdarkoo commented 4 years ago

There is currently a bug with odometry, after some time it "jumps" to a random place. Trying to identify a source...


OK, the jumps are caused when a number of ticks is around 32750. Familiar number? :)


Fixed in bee89b8830373fbe3bf68426c9ad443212ccde40 and 7aa951e4f35387ecddc484c07c2422d2d4cf9c21

DavidMansolino commented 4 years ago

There is currently a bug with odometry, after some time it "jumps" to a random place. Trying to identify a source...

OK, the jumps are caused when a number of ticks is around 32750. Familiar number? :)

Fixed in bee89b8 and 7aa951e

Yes if I am not wrong this is the limit of the encoders returned by the e-pucks. It indeed makes sense that this is the cause, well spotted.