mdrwiega / depth_nav_tools

A set of tools for mobile robot navigation with the depth sensor
http://wiki.ros.org/depth_nav_tools
Other
56 stars 40 forks source link

Camera details not being initialized #20

Closed nakai-omer closed 1 year ago

nakai-omer commented 1 year ago

Hi,

In the parametersCallback, the depth_sensor_params_update flag is being set to true. Since this is being called before detectCliff, it blocks updating the camera details from the CameraInfo message (unless cam_model_update_ is set to true).

The line that sets it to true is: https://github.com/mdrwiega/depth_nav_tools/blob/f30d64833fbdd6d4eb8fa114b2afead51226f30e/cliff_detector/src/cliff_detector_node.cpp#L113

IMHO, it will be more correct to actually set the depth_sensor_params_update to false after updating parameters, so it re-initializes the camera model from the next CameraInfo message, as parameters are being used in the camera info initialization code.

We are using ROS2 Humble.

nakai-omer commented 1 year ago

I have fixed it as part of the Humble PR #19

mdrwiega commented 1 year ago

Hi, Thanks for your fix! I hope it can be merged soon.

mdrwiega commented 1 year ago

It's finally merged. Thanks again for your changes!