Closed suddrey-qut closed 4 years ago
Since packages with the same name as in this example are mapped automatically why do you specific it explicitly in the mapping file?
At the time I was skimming the tutorials and did not notice that it would implicitly generate a bridge for packages with the same name. It also seems that for messages it does not care if I provide an explicit mapping.
In hindsight I know what I did was technically redundant, but it's hard to tell from the error messages how I had caused the issue.
I have made a pull request to bring services in line with messages, which do handle duplication between explicit and implicit pairs.
For sanity, I have created a valid example of where this issue would arise
I have created a slimmed down version of my messages package that has a single message and service. The service name is the same between ROS1 and ROS2 but the message has been renamed from ROS1Message to ROS2Message respectively.
I have also amended the mapping file such that it has a mapping between ROS1Message and ROS2Message, but has no explicit mapping for the service.
Eloquent branch: https://github.com/RoboticVisionOrg/rv_msgs/tree/eloquent_bridge_example
ROS1 branch: https://github.com/RoboticVisionOrg/rv_msgs/tree/ros1_bridge_example
In this example, I still get the redefinition error.
When I compile your example repositories, there are no compilation errors. When I add the mapping for the GetDoorStatus
service, I do get redefinition errors. I made some comments on the pull request referenced.
I encountered the same error and solved it with your patch! thanks a lot!
Operating System: Description: Ubuntu 18.04.4 LTS
Installation type: eloquent binaries, ros1_bridge source
Version or commit hash: On eloquent branch of ros1_bridge: ± git rev-parse HEAD 60f903cb159ad4ef59b9b09badf71caa601cba04
DDS implementation: Fast-RTPS
Client library (if applicable): N/A
Steps to reproduce issue
Following the instructions found on the ros1_bridge docs.
Clone the ROS1 version of the messages into a ROS1 workspace and build it
Clone the ROS2 version of the messages into a ROS2 workspace and build it
In a new terminal, ensuring no work spaces are sourced clone the eloquent branch of ros1_bridge into a new empty workspace
Expected behavior
Bridge compiles without errors
Actual behavior
generate_services adds a pair for both the implicit match derived from rospack and the explicit match provided in the mapping.yaml file causing gcc to throw redefinition errors.
Additional information
This is the same issue as #243.