Monash-Connected-Autonomous-Vehicle / ESDA

Software stack for MCAVs annual IGVC entry
0 stars 0 forks source link

Fuse our pothole, lane, obstacle detection maps into a single /map #12

Open AbBaSaMo opened 5 months ago

AbBaSaMo commented 5 months ago

Refer to https://github.com/Monash-Connected-Autonomous-Vehicle/ESDA/issues/12#issuecomment-1949581525 for list of todos/prereqs

AnthonyZhOon commented 4 months ago

I think this is not directly writing a costmap 2d layer, it seems like we can make another occupancy_grid_camera topic and add it with a occupancy grid generated by lidar. This might require writing an occupany grid publisher for both lidar and camera sensors. Then the costmap is generated the same for both lidar and camera obstacles.

AbBaSaMo commented 4 months ago

@AnthonyZhOon hmm, so do you mean rather than create costmap layers, we fuse our multiple occupancy grids and publish the result to the /map topic which nav2 uses?

So fuse:

AnthonyZhOon commented 4 months ago

I think it makes more sense to identify all obstacles there as the costmap is a postprocessing on these obstacles to create a heatmap. though there is an argument that only hard walls are lethal obstacles and lanes can be weaker obstacles

AbBaSaMo commented 4 months ago

@AnthonyZhOon makes sense. In that case I'll update the issues to reflect this as generating occ grids to be fused.

AbBaSaMo commented 4 months ago

Actually gonna close the issue rather than delete as this can all be reflected and discussed in this one https://github.com/Monash-Connected-Autonomous-Vehicle/ESDA/issues/25 and 2 is now redundant rather than 1

AbBaSaMo commented 4 months ago

Re-opening issue and re-purposing it to fusion of the 3 occupancy grids:

AnthonyZhOon commented 3 months ago

Written a node for fusing 2 occupancy grids in the occupancy-fuser branch. Need to test it still but had trouble showing grids in rviz2. It creates a new grid based on the largest width and height of collected grids, and uses a 2d convolve to add each subscribed grid to the centre of the new grid.

AbBaSaMo commented 3 months ago

@AnthonyZhOon any errors being output by rviz or nodes or screenshots? could it be a missing transform issue?

I can take a look monday after 4. Either way moving issue from in progress to review.

AbBaSaMo commented 3 months ago

@AnthonyZhOon are there unpushed changes you've made? colcon build outputs the following error when attempting to buils occupnacy-fuser

Use of hyphen is said to be the issue as per https://answers.ros.org/question/368144/colcon-build-fails-on-newly-created-package/ but I don't want to trial it given you seem to have gotten it built and I might just be missing something.

Rosdeps have al been installed

AbBaSaMo commented 3 months ago

@AnthonyZhOon changed package name to using '_' insread of '-' which fixed the issue. If I can confirm you have no unpushed changed, am gonna push.

Image

AbBaSaMo commented 3 months ago

It seems the issue is that the occupancy grids have not been initialized with correct parameters, so based on the following grid1 message, you have a 51x51 grid with only cell 50 occupied, and a resolution of 0 so each cell is 0x0m iirc

Image

AbBaSaMo commented 3 months ago

@AnthonyZhOon can confirm that this outputs a grid. will push after class plus a meeting, and possible add a random generator for cells

Image

AbBaSaMo commented 3 months ago

Another thing to note is that you'll probs need a static tf publisher for base_link. Publishing an arbitrary one, but I'll have to confirm if it doesnt work without it

Image

AbBaSaMo commented 3 months ago

@AnthonyZhOon pushed fixes and changes, so the remaining tasks for testing are: