-
Notifications
You must be signed in to change notification settings - Fork 18
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
[DRAFT] [WON'T MERGE] Beam sensor model rework #168
Conversation
Signed-off-by: Ramiro Serra <serraramiro@ekumenlabs.com>
Signed-off-by: Ramiro Serra <serraramiro@ekumenlabs.com>
Signed-off-by: Ramiro Serra <serraramiro@ekumenlabs.com>
Signed-off-by: Ramiro Serra <serraramiro@ekumenlabs.com>
Signed-off-by: Ramiro Serra <serraramiro@ekumenlabs.com>
Signed-off-by: Michel Hidalgo <michel@ekumenlabs.com>
Observations, tests, and hypothesis to date:
|
odom_to_base_transform); | ||
} catch (const tf2::TransformException & error) { | ||
RCLCPP_ERROR(get_logger(), "Could not transform from odom to base: %s", error.what()); | ||
return; | ||
} | ||
|
||
auto base_to_laser_transform = Sophus::SE3d{}; | ||
auto base_to_laser_transform = Sophus::SE2d{}; |
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 figured I would ask. Here we lookup SE(2) odometry but use SE(3) transforms to get laser scans in the laser frame to the base frame. What's the rationale here? In what circumstances would a system with a non planar transform between base and laser frames be able to use planar AMCL?
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.
In what circumstances would a system with a non planar transform between base and laser frames be able to use planar AMCL?
Fair question. I think the answer would be lasers that are mounted upside-down. I remember getting the idea from nav2_amcl/src/amcl_node.cpp#L780-L784.
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.
Ah good point. That's super common, though I'd argue that working in 3D just for that case is unnecessary overhead. Let's take that discussion to #170.
Things to try out as per team discussion:
|
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.
partial review ...
/// Leverages a Brasenham raycasting technique to cast a ray on the occupancy grid, \n | ||
/// from the laser frame and with the provided bearing until \n | ||
/// it hits an unknown/occupied cell or reaches `max_beam_range`. | ||
/// Unknown cells are treated as occupied. | ||
/** | ||
* \tparam OccupancyGrid Type that satisfies \ref OccupancyGridPage. | ||
* \param grid Grid to cast the ray on. | ||
* \param starting_position Position of the laser in map frame. | ||
* \param bearing_in_laser_frame An SO2 rotation that represents the bearing of the beam in laser frame. | ||
* \param max_beam_range Maximum range of the sensor in meters. | ||
* \return double Length in meters of the casted ray. | ||
*/ | ||
|
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.
nit: what is this documenting?
namespace beluga { | ||
|
||
/// Bresenham's 2D line drawing algorithm, optimized for integer arithmetic. | ||
struct bresenham2i { |
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.
note to self: review raycasting in detail later
As this won't be merged, I'll close it but keep the branch around for #170. |
Summary
I'm opening this up for visibility and because I'm running out of ideas. This isn't PR material, it's incomplete, and it must be split before it can be reviewed and merged. That said, it aggregates all functionality developed to date and rebase against
main
to get the beam sensor model up and running.To reproduce:
What you'll see is Beluga underperfoming in terms of accuracy and consistency through time compared to Nav2 AMCL.
Checklist