-
Notifications
You must be signed in to change notification settings - Fork 7
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
costmap setup #261
Conversation
@@ -0,0 +1,217 @@ | |||
controller_server: |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
uwrt_mars_rover_drivetrain/uwrt_mars_rover_drivetrain_description/config/sensor_parameters.yaml
Outdated
Show resolved
Hide resolved
..._mars_rover_drivetrain/uwrt_mars_rover_drivetrain_description/config/costmap_parameters.yaml
Outdated
Show resolved
Hide resolved
clearing: True | ||
marking: True | ||
data_type: "PointCloud2" | ||
static_layer: |
There was a problem hiding this comment.
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: |
There was a problem hiding this comment.
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"] |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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/
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

This view just has the costmap

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]