-
Notifications
You must be signed in to change notification settings - Fork 734
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
[rolling] image_publisher: Fix loading of the camera info parameters on startup #983
[rolling] image_publisher: Fix loading of the camera info parameters on startup #983
Conversation
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 you target rolling
? then I will backport this to the other distros
68e9e3a
to
1306e63
Compare
1306e63
to
2d58d0e
Compare
@ahcorde the changes were retargeted to |
@@ -71,36 +71,46 @@ ImagePublisher::ImagePublisher( | |||
auto param_change_callback = | |||
[this](std::vector<rclcpp::Parameter> parameters) -> rcl_interfaces::msg::SetParametersResult | |||
{ | |||
RCLCPP_INFO(get_logger(), "param_change_callback"); |
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.
remove
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.
Done
@@ -224,9 +234,7 @@ void ImagePublisher::onInit() | |||
camera_info_.p = {1, 0, static_cast<float>(camera_info_.width / 2), 0, 0, 1, | |||
static_cast<float>(camera_info_.height / 2), 0, 0, 0, 1, 0}; | |||
|
|||
timer_ = this->create_wall_timer( |
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.
if you remove these lines the dowork
method will never be called and the image will be never flipped
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.
The timer is set in the reconfigureCallback
. I didn't want to repeat the CameraInfoManager
block of code in onInit
and did not want to create timer there just to recreate it once again in reconfigureCallback
.
https://github.com/Mergifyio backport jazzy humble iron |
✅ Backports have been created
|
…on startup (#983) As described in #965 camera info is not loaded from the file on node initialization, but only when the parameter is reloaded. This PR resolves this issue and should be straightforward to port it to `Humble`, `Iron` and `Jazzy`. (cherry picked from commit 847920b) # Conflicts: # image_publisher/src/image_publisher.cpp
…on startup (#983) As described in #965 camera info is not loaded from the file on node initialization, but only when the parameter is reloaded. This PR resolves this issue and should be straightforward to port it to `Humble`, `Iron` and `Jazzy`. (cherry picked from commit 847920b) # Conflicts: # image_publisher/src/image_publisher.cpp
…on startup (#983) As described in #965 camera info is not loaded from the file on node initialization, but only when the parameter is reloaded. This PR resolves this issue and should be straightforward to port it to `Humble`, `Iron` and `Jazzy`. (cherry picked from commit 847920b) # Conflicts: # image_publisher/src/image_publisher.cpp
…n startup (backport #983) (#996) As described in #965 camera info is not loaded from the file on node initialization, but only when the parameter is reloaded. This PR resolves this issue and should be straightforward to port it to `Humble`, `Iron` and `Jazzy`.<hr>This is an automatic backport of pull request #983 done by [Mergify](https://mergify.com). --------- Co-authored-by: Krzysztof Wojciechowski <[email protected]> Co-authored-by: Michael Ferguson <[email protected]>
…startup (backport #983) (#997) As described in #965 camera info is not loaded from the file on node initialization, but only when the parameter is reloaded. This PR resolves this issue and should be straightforward to port it to `Humble`, `Iron` and `Jazzy`.<hr>This is an automatic backport of pull request #983 done by [Mergify](https://mergify.com). --------- Co-authored-by: Krzysztof Wojciechowski <[email protected]> Co-authored-by: Michael Ferguson <[email protected]>
… startup (backport #983) (#995) As described in #965 camera info is not loaded from the file on node initialization, but only when the parameter is reloaded. This PR resolves this issue and should be straightforward to port it to `Humble`, `Iron` and `Jazzy`.<hr>This is an automatic backport of pull request #983 done by [Mergify](https://mergify.com). Co-authored-by: Krzysztof Wojciechowski <[email protected]>
As described in #965 camera info is not loaded from the file on node initialization, but only when the parameter is reloaded.
This PR resolves this issue and should be straightforward to port it to
Humble
,Iron
andJazzy
.