Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

costmap setup #261

Merged
merged 5 commits into from
Jan 25, 2024
Merged

costmap setup #261

merged 5 commits into from
Jan 25, 2024

Conversation

meshvaD
Copy link

@meshvaD meshvaD commented Nov 8, 2023

There is a static layer, obstacle layer and inflation layer. Right now, the obstacle layer uses one stereo camera and one lidar (which we can easily change once we finalize the sensors we are using). The static layer is also just a blank map.

Use the launch file nav.launch.py to launch the navigation stuff.

Here are some screenshots of how it looks

This view includes the pointcloud, the lidar, and the costmap
Screenshot from 2023-11-04 20-53-15

This view just has the costmap
Screenshot from 2023-11-04 20-52-31

Also, sometimes RVIZ doesn't update the costmap fast enough, but you can save the map to a file and then view it by calling:
ros2 run nav2_map_server map_saver_cli -t [topic: ex.global_costmap/costmap] -f [output file]

@@ -0,0 +1,217 @@
controller_server:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I assume this is just the default file given from the nav2 guide, right?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, how did you tweak the params? It's fine if these are just "arbitrary" for now... but we just need to know if we need to come back to them if something isnt working

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All the controller_server params are just from the guide, and the params are not tweaked

clearing: True
marking: True
data_type: "PointCloud2"
static_layer:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can keep it in but may not be as important right now since we are not using SLAM nor do we have a map being served to our rover from anywhere. Just keep this in mind.

enabled: true
subscribe_to_updates: true
transform_tolerance: 0.1
inflation_layer:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good, plans for us to avoid obstacles

height: 3
resolution: 0.05

plugins: ["static_layer", "inflation_layer", "obstacle_layer"]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just took a peek at the setup guide any they are using voxel_layer and inflation_layer.
If I understand correcltly, voxel layer is for 3D planning (which can be done with our stereocamera) and inflation layer is for avoidance, so good to keep. Let''s get rid of static layer here. I'll let you decide between obstacle layer and voxel layer for the local planner. Seems like the difference between 2D/3D detections on the costmap to me. Maybe we start simple and keep obstalce layer so it's 2D? Will let you reply to this comment with your judgement

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think for now it might be best to get a 2D costmap, so with a obstacle layer. Even if we have a voxel layer, since we are only planning for the drivetrain to move in 2D, it might be unnecessary. If we do end up needed it in the future, we can always just add the plugin!

Also just a note: we might need to make some custom costmap layers as well. If our camera has any noise in it, we'll probably need to filter it out (there is a DenoiseLayer, but it doesn't seem to be available for galactic, I'd have to look at it more later).

And if there are hills in the scene, how would we differentiate between a climbable hill vs an obstacle.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And we should have a static_layer, even if it is empty. The obstacle_layer doesn't work without a static_layer, it seems like a problem some other people have too: https://answers.ros.org/question/405789/local-costmaps-obstacle-layer-not-detecting-obstacles/

@meshvaD meshvaD merged commit 1a3d359 into comp-2024 Jan 25, 2024
6 of 9 checks passed
@meshvaD meshvaD deleted the meshvad/comp2024-costmapSetup branch January 25, 2024 05:13
@meshvaD meshvaD restored the meshvad/comp2024-costmapSetup branch January 26, 2024 00:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants