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

How to visualise a driven path?

asked 2021-07-15 12:17:54 -0500

offtaste gravatar image

Hey guys,

seems like a very common thing to me, but I did not find a solution for this (and I am not that good in ros to do it myself).

I am driving around a vehicle with move_base and a static map in RVIZ and everything works fine, so I recorded everything with rosbag. (ubuntu 18.04 and ros melodic, static map, localisation with gps, RVIZ for visualization)

I am able to replay everything with rosbag play so this is fine. But to verify how good the system works, I want to also visualize the driven path, not just the planned global one.

I dont care about the kind of visualization, it does not have to be a path, but could be everything else.

What I was able to find is the hector trajectory server, but I am not able to use it correctly I think. When I call it with rosrun it tells me that it finshed waiting for tf and I could chose "Trajectory" as a path in RVIZ, but thats all. looks like this:

~/catkin_ws$ rosrun hector_trajectory_server hector_trajectory_server

`[ INFO] [1626368186.486718585]: Waiting for tf transform data between frames map and base_link to become available Maybe I just don't call the service right?

Or is there a way to directly mark all the recorded fixes while playing the rosbag?

Would be happy to get some answers, thanks in advance!

edit retag flag offensive close merge delete

Comments

1

Is Odometry visualization what you are looking for? It basically plots an arrow for every published odometry position.

Humpelstilzchen gravatar image Humpelstilzchen  ( 2021-07-15 15:30:01 -0500 )edit

Thanks! I will try that later and come back.

offtaste gravatar image offtaste  ( 2021-07-17 11:15:54 -0500 )edit

That COULD have been what I looked for, but does not work for me. There seem to be some problems with the odom.

offtaste gravatar image offtaste  ( 2021-07-23 02:18:37 -0500 )edit

Yes, I guess that is the general idea of that visualization to find issues with the robots odometry.

Humpelstilzchen gravatar image Humpelstilzchen  ( 2021-07-23 02:22:29 -0500 )edit

the odometry itself is fine, but the odom messages are not transformed in the map. But that's not a big problem.

offtaste gravatar image offtaste  ( 2021-07-23 05:11:16 -0500 )edit

Sorry, doubt that. A working odom message requires the correct frame, you seem to have an issue here.

Humpelstilzchen gravatar image Humpelstilzchen  ( 2021-07-23 05:14:13 -0500 )edit

1 Answer

Sort by » oldest newest most voted
0

answered 2021-07-15 19:35:24 -0500

Before running the rosbag play try this (roscore must be running):

rosparam set /use_sim_time true

and then run the hector_trajectory_server.

When run the rosbag play use the optional --clock: rosbag play --clock <FILENAME>

If still not working, try to plot the rosrun rqt_tf_tree rqt_tf_tree and check if everything is connected

edit flag offensive delete link more

Comments

I already have sim time on and playing rosbag with clock. As I said, the playing runs very nice as it did at the recording...

offtaste gravatar image offtaste  ( 2021-07-17 11:15:29 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2021-07-15 12:17:54 -0500

Seen: 524 times

Last updated: Jul 15 '21