-
Notifications
You must be signed in to change notification settings - Fork 297
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
rosbridge services for rule based name matching #241
base: eloquent
Are you sure you want to change the base?
Conversation
…#238) Signed-off-by: Dirk Thomas <[email protected]>
Signed-off-by: Dirk Thomas <[email protected]> Signed-off-by: Allison Thackston <[email protected]>
…os2#236) Signed-off-by: Dirk Thomas <[email protected]> Signed-off-by: Allison Thackston <[email protected]>
Signed-off-by: Michael Carroll <[email protected]> Signed-off-by: Allison Thackston <[email protected]>
Signed-off-by: Allison Thackston <[email protected]>
The PR seems to undo changes recently merged as part of #234? (Also please sign off the commits to pass DCO.) |
Working on the DCO. And yes, I tried those changes, but they didn't work for me 🤷♀️ |
Signed-off-by: Allison Thackston <[email protected]>
00869ba
to
9bee811
Compare
Signed-off-by: Allison Thackston <[email protected]>
DCO complete. It would probably be good to add a unit test to better test the services. I was able to test it with my bot, but I'm unaware of a ROS package that has service name differences that's already a part of the ROS ecosystem that also has unit tests. Alternatively we could add one in this package, but that would mean it would need to be compiled with ROS1 and ROS2 (and be different) and this package is already somewhat tricky to setup. |
Any other changes requested on this? |
My previous comment still applies:
"I tried those changes, but they didn't work for me" isn't a satisfactory answer for reverting it in this PR. |
Here's a detailed console output of the current eloquent branch which appears to be incomplete in actually mapping services of different names in a rosbridge. OutputStep 28/50 : RUN mkdir -p src && cd src && git clone --branch eloquent https://github.com/ros2/ros1_bridge.git && cd ../ && colcon build --merge-install --packages-select ros1_bridge --cmake-force-configure --install-base /opt/ros/eloquent
---> Running in a79e8d132fc2
Cloning into 'ros1_bridge'...
Starting >>> ros1_bridge
--- stderr: ros1_bridge
CMake Warning at /opt/ros/eloquent/share/actionlib_msgs/cmake/actionlib_msgsConfig.cmake:29 (message):
Package 'actionlib_msgs' is deprecated (This package will be removed in a
future ROS distro, once the ROS 1 bridge supports actions.)
Call Stack (most recent call first):
CMakeLists.txt:94 (find_package)
/workspaces/ros1_bridge/build/ros1_bridge/generated/ctrl_pkg__srv__ActiveStateSrv__factories.cpp:124:6: error: redefinition of ‘void ros1_bridge::ServiceFactory<ROS1_T, ROS2_T>::translate_1_to_2(const ROS1Request&, ros1_bridge::ServiceFactory<ROS1_T, ROS2_T>::ROS2Request&) [with ROS1_T = ctrl_pkg::ActiveStateSrv; ROS2_T = ctrl_pkg::srv::ActiveStateSrv; ros1_bridge::ServiceFactory<ROS1_T, ROS2_T>::ROS1Request = ctrl_pkg::ActiveStateSrvRequest_<std::allocator<void> >; ros1_bridge::ServiceFactory<ROS1_T, ROS2_T>::ROS2Request = ctrl_pkg::srv::ActiveStateSrv_Request_<std::allocator<void> >]’
void ServiceFactory<
^~~~~~~~~~~~~~~
ctrl_pkg::ActiveStateSrv,
~~~~~~~~~~~~~~~~~~~~~~~~~
ctrl_pkg::srv::ActiveStateSrv
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>::translate_1_to_2(
~
/workspaces/ros1_bridge/build/ros1_bridge/generated/ctrl_pkg__srv__ActiveStateSrv__factories.cpp:71:6: note: ‘void ros1_bridge::ServiceFactory<ROS1_T, ROS2_T>::translate_1_to_2(const ROS1Request&, ros1_bridge::ServiceFactory<ROS1_T, ROS2_T>::ROS2Request&) [with ROS1_T = ctrl_pkg::ActiveStateSrv; ROS2_T = ctrl_pkg::srv::ActiveStateSrv; ros1_bridge::ServiceFactory<ROS1_T, ROS2_T>::ROS1Request = ctrl_pkg::ActiveStateSrvRequest_<std::allocator<void> >; ros1_bridge::ServiceFactory<ROS1_T, ROS2_T>::ROS2Request = ctrl_pkg::srv::ActiveStateSrv_Request_<std::allocator<void> >]’ previously declared here
void ServiceFactory<
^~~~~~~~~~~~~~~
ctrl_pkg::ActiveStateSrv,
~~~~~~~~~~~~~~~~~~~~~~~~~
ctrl_pkg::srv::ActiveStateSrv
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>::translate_1_to_2(
~
/workspaces/ros1_bridge/build/ros1_bridge/generated/ctrl_pkg__srv__ActiveStateSrv__factories.cpp:137:6: error: redefinition of ‘void ros1_bridge::ServiceFactory<ROS1_T, ROS2_T>::translate_1_to_2(const ROS1Response&, ros1_bridge::ServiceFactory<ROS1_T, ROS2_T>::ROS2Response&) [with ROS1_T = ctrl_pkg::ActiveStateSrv; ROS2_T = ctrl_pkg::srv::ActiveStateSrv; ros1_bridge::ServiceFactory<ROS1_T, ROS2_T>::ROS1Response = ctrl_pkg::ActiveStateSrvResponse_<std::allocator<void> >; ros1_bridge::ServiceFactory<ROS1_T, ROS2_T>::ROS2Response = ctrl_pkg::srv::ActiveStateSrv_Response_<std::allocator<void> >]’
void ServiceFactory<
^~~~~~~~~~~~~~~
ctrl_pkg::ActiveStateSrv,
~~~~~~~~~~~~~~~~~~~~~~~~~
ctrl_pkg::srv::ActiveStateSrv
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>::translate_1_to_2(
~
/workspaces/ros1_bridge/build/ros1_bridge/generated/ctrl_pkg__srv__ActiveStateSrv__factories.cpp:84:6: note: ‘void ros1_bridge::ServiceFactory<ROS1_T, ROS2_T>::translate_1_to_2(const ROS1Response&, ros1_bridge::ServiceFactory<ROS1_T, ROS2_T>::ROS2Response&) [with ROS1_T = ctrl_pkg::ActiveStateSrv; ROS2_T = ctrl_pkg::srv::ActiveStateSrv; ros1_bridge::ServiceFactory<ROS1_T, ROS2_T>::ROS1Response = ctrl_pkg::ActiveStateSrvResponse_<std::allocator<void> >; ros1_bridge::ServiceFactory<ROS1_T, ROS2_T>::ROS2Response = ctrl_pkg::srv::ActiveStateSrv_Response_<std::allocator<void> >]’ previously declared here
void ServiceFactory<
^~~~~~~~~~~~~~~
ctrl_pkg::ActiveStateSrv,
~~~~~~~~~~~~~~~~~~~~~~~~~
ctrl_pkg::srv::ActiveStateSrv
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>::translate_1_to_2(
~
/workspaces/ros1_bridge/build/ros1_bridge/generated/ctrl_pkg__srv__ActiveStateSrv__factories.cpp:150:6: error: redefinition of ‘void ros1_bridge::ServiceFactory<ROS1_T, ROS2_T>::translate_2_to_1(const ROS2Request&, ros1_bridge::ServiceFactory<ROS1_T, ROS2_T>::ROS1Request&) [with ROS1_T = ctrl_pkg::ActiveStateSrv; ROS2_T = ctrl_pkg::srv::ActiveStateSrv; ros1_bridge::ServiceFactory<ROS1_T, ROS2_T>::ROS2Request = ctrl_pkg::srv::ActiveStateSrv_Request_<std::allocator<void> >; ros1_bridge::ServiceFactory<ROS1_T, ROS2_T>::ROS1Request = ctrl_pkg::ActiveStateSrvRequest_<std::allocator<void> >]’
void ServiceFactory<
^~~~~~~~~~~~~~~
ctrl_pkg::ActiveStateSrv,
~~~~~~~~~~~~~~~~~~~~~~~~~
ctrl_pkg::srv::ActiveStateSrv
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>::translate_2_to_1(
~
/workspaces/ros1_bridge/build/ros1_bridge/generated/ctrl_pkg__srv__ActiveStateSrv__factories.cpp:97:6: note: ‘void ros1_bridge::ServiceFactory<ROS1_T, ROS2_T>::translate_2_to_1(const ROS2Request&, ros1_bridge::ServiceFactory<ROS1_T, ROS2_T>::ROS1Request&) [with ROS1_T = ctrl_pkg::ActiveStateSrv; ROS2_T = ctrl_pkg::srv::ActiveStateSrv; ros1_bridge::ServiceFactory<ROS1_T, ROS2_T>::ROS2Request = ctrl_pkg::srv::ActiveStateSrv_Request_<std::allocator<void> >; ros1_bridge::ServiceFactory<ROS1_T, ROS2_T>::ROS1Request = ctrl_pkg::ActiveStateSrvRequest_<std::allocator<void> >]’ previously declared here
void ServiceFactory<
^~~~~~~~~~~~~~~
ctrl_pkg::ActiveStateSrv,
~~~~~~~~~~~~~~~~~~~~~~~~~
ctrl_pkg::srv::ActiveStateSrv
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>::translate_2_to_1(
~
/workspaces/ros1_bridge/build/ros1_bridge/generated/ctrl_pkg__srv__ActiveStateSrv__factories.cpp:163:6: error: redefinition of ‘void ros1_bridge::ServiceFactory<ROS1_T, ROS2_T>::translate_2_to_1(const ROS2Response&, ros1_bridge::ServiceFactory<ROS1_T, ROS2_T>::ROS1Response&) [with ROS1_T = ctrl_pkg::ActiveStateSrv; ROS2_T = ctrl_pkg::srv::ActiveStateSrv; ros1_bridge::ServiceFactory<ROS1_T, ROS2_T>::ROS2Response = ctrl_pkg::srv::ActiveStateSrv_Response_<std::allocator<void> >; ros1_bridge::ServiceFactory<ROS1_T, ROS2_T>::ROS1Response = ctrl_pkg::ActiveStateSrvResponse_<std::allocator<void> >]’
void ServiceFactory<
^~~~~~~~~~~~~~~
ctrl_pkg::ActiveStateSrv,
~~~~~~~~~~~~~~~~~~~~~~~~~
ctrl_pkg::srv::ActiveStateSrv
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>::translate_2_to_1(
~
/workspaces/ros1_bridge/build/ros1_bridge/generated/ctrl_pkg__srv__ActiveStateSrv__factories.cpp:110:6: note: ‘void ros1_bridge::ServiceFactory<ROS1_T, ROS2_T>::translate_2_to_1(const ROS2Response&, ros1_bridge::ServiceFactory<ROS1_T, ROS2_T>::ROS1Response&) [with ROS1_T = ctrl_pkg::ActiveStateSrv; ROS2_T = ctrl_pkg::srv::ActiveStateSrv; ros1_bridge::ServiceFactory<ROS1_T, ROS2_T>::ROS2Response = ctrl_pkg::srv::ActiveStateSrv_Response_<std::allocator<void> >; ros1_bridge::ServiceFactory<ROS1_T, ROS2_T>::ROS1Response = ctrl_pkg::ActiveStateSrvResponse_<std::allocator<void> >]’ previously declared here
void ServiceFactory<
^~~~~~~~~~~~~~~
ctrl_pkg::ActiveStateSrv,
~~~~~~~~~~~~~~~~~~~~~~~~~
ctrl_pkg::srv::ActiveStateSrv
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>::translate_2_to_1(
~
make[2]: *** [CMakeFiles/ros1_bridge.dir/generated/ctrl_pkg__srv__ActiveStateSrv__factories.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
/workspaces/ros1_bridge/build/ros1_bridge/generated/ctrl_pkg__srv__NavThrottleSrv__factories.cpp:124:6: error: redefinition of ‘void ros1_bridge::ServiceFactory<ROS1_T, ROS2_T>::translate_1_to_2(const ROS1Request&, ros1_bridge::ServiceFactory<ROS1_T, ROS2_T>::ROS2Request&) [with ROS1_T = ctrl_pkg::NavThrottleSrv; ROS2_T = ctrl_pkg::srv::NavThrottleSrv; ros1_bridge::ServiceFactory<ROS1_T, ROS2_T>::ROS1Request = ctrl_pkg::NavThrottleSrvRequest_<std::allocator<void> >; ros1_bridge::ServiceFactory<ROS1_T, ROS2_T>::ROS2Request = ctrl_pkg::srv::NavThrottleSrv_Request_<std::allocator<void> >]’
void ServiceFactory<
^~~~~~~~~~~~~~~
ctrl_pkg::NavThrottleSrv,
~~~~~~~~~~~~~~~~~~~~~~~~~
ctrl_pkg::srv::NavThrottleSrv
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>::translate_1_to_2(
~
/workspaces/ros1_bridge/build/ros1_bridge/generated/ctrl_pkg__srv__NavThrottleSrv__factories.cpp:71:6: note: ‘void ros1_bridge::ServiceFactory<ROS1_T, ROS2_T>::translate_1_to_2(const ROS1Request&, ros1_bridge::ServiceFactory<ROS1_T, ROS2_T>::ROS2Request&) [with ROS1_T = ctrl_pkg::NavThrottleSrv; ROS2_T = ctrl_pkg::srv::NavThrottleSrv; ros1_bridge::ServiceFactory<ROS1_T, ROS2_T>::ROS1Request = ctrl_pkg::NavThrottleSrvRequest_<std::allocator<void> >; ros1_bridge::ServiceFactory<ROS1_T, ROS2_T>::ROS2Request = ctrl_pkg::srv::NavThrottleSrv_Request_<std::allocator<void> >]’ previously declared here
void ServiceFactory<
^~~~~~~~~~~~~~~
ctrl_pkg::NavThrottleSrv,
~~~~~~~~~~~~~~~~~~~~~~~~~
ctrl_pkg::srv::NavThrottleSrv
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>::translate_1_to_2(
~
/workspaces/ros1_bridge/build/ros1_bridge/generated/ctrl_pkg__srv__NavThrottleSrv__factories.cpp:137:6: error: redefinition of ‘void ros1_bridge::ServiceFactory<ROS1_T, ROS2_T>::translate_1_to_2(const ROS1Response&, ros1_bridge::ServiceFactory<ROS1_T, ROS2_T>::ROS2Response&) [with ROS1_T = ctrl_pkg::NavThrottleSrv; ROS2_T = ctrl_pkg::srv::NavThrottleSrv; ros1_bridge::ServiceFactory<ROS1_T, ROS2_T>::ROS1Response = ctrl_pkg::NavThrottleSrvResponse_<std::allocator<void> >; ros1_bridge::ServiceFactory<ROS1_T, ROS2_T>::ROS2Response = ctrl_pkg::srv::NavThrottleSrv_Response_<std::allocator<void> >]’
void ServiceFactory<
^~~~~~~~~~~~~~~
ctrl_pkg::NavThrottleSrv,
~~~~~~~~~~~~~~~~~~~~~~~~~
ctrl_pkg::srv::NavThrottleSrv
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>::translate_1_to_2(
~
/workspaces/ros1_bridge/build/ros1_bridge/generated/ctrl_pkg__srv__NavThrottleSrv__factories.cpp:84:6: note: ‘void ros1_bridge::ServiceFactory<ROS1_T, ROS2_T>::translate_1_to_2(const ROS1Response&, ros1_bridge::ServiceFactory<ROS1_T, ROS2_T>::ROS2Response&) [with ROS1_T = ctrl_pkg::NavThrottleSrv; ROS2_T = ctrl_pkg::srv::NavThrottleSrv; ros1_bridge::ServiceFactory<ROS1_T, ROS2_T>::ROS1Response = ctrl_pkg::NavThrottleSrvResponse_<std::allocator<void> >; ros1_bridge::ServiceFactory<ROS1_T, ROS2_T>::ROS2Response = ctrl_pkg::srv::NavThrottleSrv_Response_<std::allocator<void> >]’ previously declared here
void ServiceFactory<
^~~~~~~~~~~~~~~
ctrl_pkg::NavThrottleSrv,
~~~~~~~~~~~~~~~~~~~~~~~~~
ctrl_pkg::srv::NavThrottleSrv
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>::translate_1_to_2(
~
/workspaces/ros1_bridge/build/ros1_bridge/generated/ctrl_pkg__srv__NavThrottleSrv__factories.cpp:150:6: error: redefinition of ‘void ros1_bridge::ServiceFactory<ROS1_T, ROS2_T>::translate_2_to_1(const ROS2Request&, ros1_bridge::ServiceFactory<ROS1_T, ROS2_T>::ROS1Request&) [with ROS1_T = ctrl_pkg::NavThrottleSrv; ROS2_T = ctrl_pkg::srv::NavThrottleSrv; ros1_bridge::ServiceFactory<ROS1_T, ROS2_T>::ROS2Request = ctrl_pkg::srv::NavThrottleSrv_Request_<std::allocator<void> >; ros1_bridge::ServiceFactory<ROS1_T, ROS2_T>::ROS1Request = ctrl_pkg::NavThrottleSrvRequest_<std::allocator<void> >]’
void ServiceFactory<
^~~~~~~~~~~~~~~
ctrl_pkg::NavThrottleSrv,
~~~~~~~~~~~~~~~~~~~~~~~~~
ctrl_pkg::srv::NavThrottleSrv
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>::translate_2_to_1(
~
/workspaces/ros1_bridge/build/ros1_bridge/generated/ctrl_pkg__srv__NavThrottleSrv__factories.cpp:97:6: note: ‘void ros1_bridge::ServiceFactory<ROS1_T, ROS2_T>::translate_2_to_1(const ROS2Request&, ros1_bridge::ServiceFactory<ROS1_T, ROS2_T>::ROS1Request&) [with ROS1_T = ctrl_pkg::NavThrottleSrv; ROS2_T = ctrl_pkg::srv::NavThrottleSrv; ros1_bridge::ServiceFactory<ROS1_T, ROS2_T>::ROS2Request = ctrl_pkg::srv::NavThrottleSrv_Request_<std::allocator<void> >; ros1_bridge::ServiceFactory<ROS1_T, ROS2_T>::ROS1Request = ctrl_pkg::NavThrottleSrvRequest_<std::allocator<void> >]’ previously declared here
void ServiceFactory<
^~~~~~~~~~~~~~~
ctrl_pkg::NavThrottleSrv,
~~~~~~~~~~~~~~~~~~~~~~~~~
ctrl_pkg::srv::NavThrottleSrv
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>::translate_2_to_1(
~
/workspaces/ros1_bridge/build/ros1_bridge/generated/ctrl_pkg__srv__NavThrottleSrv__factories.cpp:163:6: error: redefinition of ‘void ros1_bridge::ServiceFactory<ROS1_T, ROS2_T>::translate_2_to_1(const ROS2Response&, ros1_bridge::ServiceFactory<ROS1_T, ROS2_T>::ROS1Response&) [with ROS1_T = ctrl_pkg::NavThrottleSrv; ROS2_T = ctrl_pkg::srv::NavThrottleSrv; ros1_bridge::ServiceFactory<ROS1_T, ROS2_T>::ROS2Response = ctrl_pkg::srv::NavThrottleSrv_Response_<std::allocator<void> >; ros1_bridge::ServiceFactory<ROS1_T, ROS2_T>::ROS1Response = ctrl_pkg::NavThrottleSrvResponse_<std::allocator<void> >]’
void ServiceFactory<
^~~~~~~~~~~~~~~
ctrl_pkg::NavThrottleSrv,
~~~~~~~~~~~~~~~~~~~~~~~~~
ctrl_pkg::srv::NavThrottleSrv
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>::translate_2_to_1(
~
/workspaces/ros1_bridge/build/ros1_bridge/generated/ctrl_pkg__srv__NavThrottleSrv__factories.cpp:110:6: note: ‘void ros1_bridge::ServiceFactory<ROS1_T, ROS2_T>::translate_2_to_1(const ROS2Response&, ros1_bridge::ServiceFactory<ROS1_T, ROS2_T>::ROS1Response&) [with ROS1_T = ctrl_pkg::NavThrottleSrv; ROS2_T = ctrl_pkg::srv::NavThrottleSrv; ros1_bridge::ServiceFactory<ROS1_T, ROS2_T>::ROS2Response = ctrl_pkg::srv::NavThrottleSrv_Response_<std::allocator<void> >; ros1_bridge::ServiceFactory<ROS1_T, ROS2_T>::ROS1Response = ctrl_pkg::NavThrottleSrvResponse_<std::allocator<void> >]’ previously declared here
void ServiceFactory<
^~~~~~~~~~~~~~~
ctrl_pkg::NavThrottleSrv,
~~~~~~~~~~~~~~~~~~~~~~~~~
ctrl_pkg::srv::NavThrottleSrv
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>::translate_2_to_1(
~
make[2]: *** [CMakeFiles/ros1_bridge.dir/generated/ctrl_pkg__srv__NavThrottleSrv__factories.cpp.o] Error 1
make[1]: *** [CMakeFiles/ros1_bridge.dir/all] Error 2
make: *** [all] Error 2
---
Failed <<< ros1_bridge [ Exited with code 2 ]
[Processing: ros1_bridge]
Summary: 0 packages finished [42.3s]
1 package failed: ros1_bridge
1 package had stderr output: ros1_bridge And a corresponding dockerfile to reproduce: Dockerfile
|
To be fair, my intention isn't to "revert a PR" -- it's to make service mapping work. I have now provided an example of the output I was seeing with the current state of the code, as well as a dockerfile for you to reproduce it on your end. I don't believe I'm doing something wrong in my set up. If I have, please let me know what I did wrong? I was able to successfully map services after I made changes to the code base, which I'm sharing here, since I thought it might be valuable to others. |
Ping @nuclearsandwich. Any update on this? |
Updated rosbridge to handle services with rule-based name matching.
Motivating use: ROS2 has more strict rules on variable name format in services than ROS1, requiring a name change between ROS1 and ROS2 variables.
This PR fixes:
Tested: On the AWS Deepracer using this dockerfile
This change is