Hello,
I'm using the nav_msgs::Path
message to visualize multiple trajectories.
With one path publisher!
I want to separate these trajectories, i mean, i don't want them to be connected with the line when its visualized in RViz
.
Is it possible to break somehow the visualized path?
I tried to solve it by adding a dummy pose of x,y,z=nan, but that did not work, since RVIZ
couldn't visualize the path due to Nans.
I also tried to change the frame_id
of the dummy pose, but that resulted in basically a xyz=0 (a 2 lines were drawn to 000 in rviz).
Thank you in advance.
Originally posted by akosodry on ROS Answers with karma: 121 on 2019-07-18
Post score: 0
Original comments
Comment by PeteBlackerThe3rd on 2019-07-18:
That's not what nav_msgs::Path
is designed for so it won't work. You can do this with a geometry_msgs::Marker
LINE_LIST type. Or you could use multiple publishers of nav_msgs::Path
Comment by akosodry on 2019-07-18:
Thank you. Could you put this into an answer? I will accept it.
Comment by akosodry on 2019-07-18:
@PeteBlackerThe3rd it turns out that the LINE_STRIP
is the one i need to use for path visualization. But still i don't understand how should i "break"/separate the paths? Suppose i have the following points for two trajectories:
x , y, z
1, 0, 0 <- traj1, point1
1, 1, 0 <- traj1, point2
0, 1, 0 <- traj1, point3
BREAK/SEPARATION IS REQUIRED HERE
-1, 1, 0 <- traj2, point1
-1, 0, 0 <- traj2, point2
-1, -1, 0 <- traj2, point3
how can i separate traj1 and traj2 with the geometry_msgs::Marker LINE_STRIP?
Comment by PeteBlackerThe3rd on 2019-07-18:
That's why I recommended the LIST_LIST type. You will need to double up the points within each path, to make them continuous, but that means you can also represent unconnected paths within the same message.
Comment by akosodry on 2019-07-18:
@PeteBlackerThe3rd
OKay then, im working on it. Thank you.
Should i copy your comment into the answer section?
Comment by PeteBlackerThe3rd on 2019-07-18:
Yes, feel free to add that if you write up an answer to your question.