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

Revision history [back]

click to hide/show revision 1
initial version

You're outputting points, not lines. A line has a start and an end point. Hence the error in rviz. Duplicating a point gives you zero-length lines. This is not the proper fix.

You can either: output only the points as points/spheres or retrieve the actual line information from dynamic_voronoi.

Besides that: Yes, you will need to transform the grid coordinates in the dynamic voronoi to map coordinates. The transformation depends on how you fed the information in there in the first place.

You're outputting points, not lines. A line has a start and an end point. Hence the error in rviz. Duplicating a point gives you zero-length lines. This is not the proper fix.

You can either: either output only the points as points/spheres or retrieve the actual line information from dynamic_voronoi.

Besides that: Yes, you will need to transform the grid coordinates in the dynamic voronoi to map coordinates. The transformation depends on how you fed the information in there in the first place.

You're outputting points, not lines. A line has a start and an end point. Hence the error in rviz. Duplicating a point gives you zero-length lines. This is not the proper fix.

You can either output only the points as points/spheres or retrieve the actual line information from dynamic_voronoi.

Besides that: Yes, you will need to transform the grid coordinates in the dynamic voronoi to map coordinates. The transformation depends on how you fed the information in there in the first place.

Edit: The second problem is that you are completely missing the map to grid conversion. You are using cell indices as point coordinates. This obviously cannot work. How to transform that correctly depends on where/how you store the map cells into your voronoi. You'll need to invert that process.

Here is an example of how we do this for a costmap in a local_planner: https://github.com/GKIFreiburg/gki_navigation/blob/master/gki_navigation_controllers/channel_controller/src/channel_controller.cpp updateVoronoi and visualizeVoronoi will be of interest.

You're outputting points, not lines. A line has a start and an end point. Hence the error in rviz. Duplicating a point gives you zero-length lines. This is not the proper fix.

You can either output only the points as points/spheres or retrieve the actual line information from dynamic_voronoi.

Besides that: Yes, you will need to transform the grid coordinates in the dynamic voronoi to map coordinates. The transformation depends on how you fed the information in there in the first place.

Edit: The second problem is that you are completely missing the map to grid conversion. You are using cell indices as point coordinates. This obviously cannot work. How to transform that correctly depends on where/how you store the map cells into your voronoi. You'll need to invert that process.

Here is an example of how we do this for a costmap in a local_planner: https://github.com/GKIFreiburg/gki_navigation/blob/master/gki_navigation_controllers/channel_controller/src/channel_controller.cpp updateVoronoi and visualizeVoronoi will be of interest.interest, especially you need to replicate how costmap.mapToWorld used.