-
Notifications
You must be signed in to change notification settings - Fork 191
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
fix: fix parameters and clean up node handles #136
Conversation
See issue #137 |
@rctoris Do we know why this PR is not merged? This fix is quite helpful. |
src/web_video_server.cpp
Outdated
async_web_server_cpp::HttpReply::stock_reply(async_web_server_cpp::HttpReply::not_found)) | ||
{ | ||
declare_parameter("port", rclcpp::PARAMETER_INTEGER); | ||
declare_parameter("verbose", rclcpp::PARAMETER_BOOL); | ||
declare_parameter("my_doaddressuble_array", rclcpp::PARAMETER_STRING); |
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.
Typo
declare_parameter("my_doaddressuble_array", rclcpp::PARAMETER_STRING); | |
declare_parameter("address", rclcpp::PARAMETER_STRING); |
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.
fixedfixed
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.
@@ -2,7 +2,7 @@ | |||
#define WEB_VIDEO_SERVER_H_ | |||
|
|||
#include <rclcpp/rclcpp.hpp> | |||
#include <cv_bridge/cv_bridge.h> | |||
#include <cv_bridge/cv_bridge.hpp> |
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 my case, using humble the cv_bridge.hpp is not found by the compilator
#include <cv_bridge/cv_bridge.hpp> | |
#include <cv_bridge/cv_bridge.h> |
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 my case, using humble the cv_bridge.hpp is not found by the compilator
The cv_bridge.h header seems to be deprecated:
#warning This header is obsolete, please include cv_bridge/cv_bridge.hpp instead
Since we are compiling using -werror, this breaks compilation for us.
Is there a compile time switch that we can use to check for the ros2 version?
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.
Yay, I just notice the root cause of the problem. It is because the humble branch of cv_bridge has not been updated with the new header file. Still, we can fix it here at compile time by detecting ROS distro at compile time by doing something like that.
#include <cv_bridge/cv_bridge.hpp> | |
#ifdef USE_CV_BRIDGE_H | |
#include <cv_bridge/cv_bridge.h> | |
#else | |
#include <cv_bridge/cv_bridge.hpp> | |
#endif |
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.
This has been fixed in #149
@@ -1,5 +1,5 @@ | |||
#include "web_video_server/image_streamer.h" | |||
#include <cv_bridge/cv_bridge.h> | |||
#include <cv_bridge/cv_bridge.hpp> |
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.
same problem here
#include <cv_bridge/cv_bridge.hpp> | |
#include <cv_bridge/cv_bridge.h> |
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.
same here
#include <cv_bridge/cv_bridge.hpp> | |
#ifdef USE_CV_BRIDGE_H | |
#include <cv_bridge/cv_bridge.h> | |
#else | |
#include <cv_bridge/cv_bridge.hpp> | |
#endif |
@@ -117,32 +127,26 @@ WebVideoServer::WebVideoServer(rclcpp::Node::SharedPtr &nh, rclcpp::Node::Shared | |||
} |
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.
This print was removed, but I found it really useful to check that everything is launching correctly
} | |
RCLCPP_INFO(nh_->get_logger(), "Waiting For connections on %s:%d", address_.c_str(), port_); | |
} |
@chameau5050 I don´t have access to the branch anymore, but I notified some people that have and hopefully they can do the changes. |
Public API Changes
None
Description
Parameters where not usable before.
private_nh isn't needed.