0

How can I add a detected object in cost map that generated from move_base package. Car is detecting traffic light and road line in simulation but how can add this property in coast map because the car has to go from one point to another by following the traffic rules and it uses sensors such as lidar imu camera gps.

I thought of adding the detected objects to the map. Generating map and giving koordinate data from code isn't hard but i can't find adding detected object in cost map and navigating car.

  • Didn't quite understand the question but you probably want to convert your detected object coordinates and publish it as LaserScan or PointCloud2 message and use that message and add it to [costmap params](https://github.com/husky/husky/blob/811f480057f9192bbc1b7f17c48631d159159352/husky_navigation/config/costmap_common.yaml#L21) just like any other sensor – Combinacijus Mar 13 '23 at 16:40
  • thanks for your answer. Actually, what I want to do is combine the data I obtained with image processing with gmapping and move_base packages (lidar, imu and gps). For this, I thought of adding the images that I took from the camera and processed as an obstacle to the map. For example, it should add the road lines to the map and determine the way if there is an obstacle, or if there is a traffic sign, it should determine the way according to the sign. – Muhammet Mar 14 '23 at 14:51
  • if are there any other solution, i can try it – Muhammet Mar 14 '23 at 15:25

1 Answers1

0

So you'd have gmmaping (although I would recommend lama-slam it's way faster and works better) which converts lidar data to costmap2d aka puts obstacles and localizes your robot.

If I understand correctly you have RGB camera which detects road lines. So I would convert those road lines from camera image 2D screen space to PointCloud2 3D world space using Homography transformation example but that only works on flat surface and if camera is fixed to robot

Then put your new PointCloud2 as new costmap layer. So now your road lines would seem like any other obstacle/wall to a robot. Now local and global planner can plan paths without hitting road lines. But if road is narrow local planner would have hard time navigating through it.

As for road signs I don't really know. You would have to have some higher level planning algorithm which would direct move_base (global and local planners) when and where to go, probably you'd want some kind of state machine like SMACH, SMACC, FlexBE etc.

Did this help with your question?

Combinacijus
  • 405
  • 2
  • 8