ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Adding geometry_msgs/Pose caused geometry_msgs/Twist value to change [rosserial]

asked 2020-11-24 20:12:03 -0500

ariccspstk gravatar image

This is what I have tried,

1) Creating a msg file as shown below:

robo_base/Encoder enc
geometry_msgs/Twist twist

2) Generate the header files for catkin_ws/devel/include and ros_lib, build the package and stuffs

3) When I launch the nodes and rostopic echo /robo_data (What I named it), I got the velocity at around 0.27ish m/s (Joystick control, max is 0.25).

4) Then, I tried again by adding a new line into the message file:

robo_base/Encoder enc
geometry_msgs/Pose pose
geometry_msgs/Twist twist

5) Repeat step 2 and 3, now the velocity turned into 0.34ish (Nothing changed in the joystick files, should stayed somewhere around 0.25).

May I know what is causing the error above or does anyone knows any fix for it? Thanks.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2020-11-25 20:27:45 -0500

ariccspstk gravatar image

Fixed by removing the delay after nh.spinOnce(), does anyone knows the reason behind?

edit flag offensive delete link more

Question Tools

1 follower


Asked: 2020-11-24 20:12:03 -0500

Seen: 117 times

Last updated: Nov 25 '20