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

Revision history [back]

I was able to export some of the data to CSV using rostopic echo -p and plot it in Matlab.

forward velocity plot

The interesting behavior from that (assuming that the times are sync'd properly... which I'm not 100% confident about, since rostopic -p seemed to be ignoring use_sim_time and --clock when I tried to record them to CSV individually), is that the odometry lags a lot behind the commands. Being able to plot it in rxplot would make me a lot more confident about the possible time sync issue, but rxplot /cmd_vel/linear/x,/odom/twist/twist/linear/x only plots odometry, never commands. rxplot /cmd_vel/linear/x,/odom/twist/twist/linear/x is what the above Matlab plot is supposed to show.

Regarding the lag between command and odometry, I suggest you check the accelerations you are using. I feel like I've seen behavior similar to this when move_base essentially tries to command something, the robot doesn't really respond as expected, and then move_base backs off the command; after backing off, move_base tries to ramp up again, the robot again lags behind, etc etc. Where that behavior is coming from, I can't really say exactly, but I recall seeing behavior along those lines a while back.

Try lowering your acceleration values to see how that affects that rxplot. You are looking for a plot that may have a small static time offset (make sense, the robot doesn't instantaneously achieve commands), but otherwise the graphs should look the same (modulus noise in odometry). Since you aren't actually on a TurtleBot, it's entirely possible your accelerations are different.