Open Timple opened 1 year ago
PS. Also seems to be the case for rolling.
Not a fix, but a workaround to enable the use of ROS1 bridge with the above Dockerfile (without logging):
Instead of roscore
run rosmaster --core
But that would mean I would need to configure all nodes to run without /rosout
right?
Hi! Were you able to resolve the issue? I am also experiencing the same error.
I did something similar here, but with the addition of rosbridge_suite: https://github.com/brow1633/ros_docker/blob/main/ros-humble-bridge
I'm not sure about configuring other nodes. I haven't run into issues, but haven't run this extensively to be honest.
@brow1633 because you are using rosmaster --core
instead of roscore
.
Therefore you simply skip logging and there is no issue with converting the logging message.
So this https://github.com/ros2/ros1_bridge/issues/393#issuecomment-1471540515 led me to investigate the history.
The last working commit for Log
messages was 81f8b08671c8d161a0f0482bae4580d4d01e69c9. Since 2381bf474aa70323752b9f66cb5bbe93a5b0f99c it's broken (PR #382).
@LoyVanBeek did you ever run in to problems with Log
messages?
Hey Tim
Nope, have never tried bridging those until now.
We only use the parameter_bridge
. When I configure it to bridge /rosout
and type rcl_interfaces/msg/Log
with this config:
topics:
- topic: /rosout
type: rcl_interfaces/msg/Log
queue_size: 1
I get:
failed to create bidirectional bridge for topic '/rosout' with ROS 2 type 'rcl_interfaces/msg/Log': No template specialization for the pair
We're still on Foxy + Noetic btw.
Even with the mapping rules in https://github.com/ros2/rcl_interfaces/blob/humble/rcl_interfaces/mapping_rules.yaml, the 'enum' for error levels also doesn't yet line up. And the ROS1 field topics[]
is also missing from the ROS 2 variant.
But I'd expect that to be fine:
https://github.com/ros2/ros1_bridge/commit/2381bf474aa70323752b9f66cb5bbe93a5b0f99c#diff-addbc08357f431e24b7c461dce9513f7aa52338c08319c8929b17e213a9e4037R808-R822
ros1_field_missing_in_ros2 = any(ros1_fields_not_mapped)
if ros1_field_missing_in_ros2:
# if some fields exist in ROS 1 but not in ROS 2
# check that no fields exist in ROS 2 but not in ROS 1
# since then it might be the case that those have been renamed and should be mapped
for ros2_member in ros2_spec.structure.members:
for ros1_field in ros1_spec.parsed_fields():
if ros1_field.name.lower() == ros2_member.name:
break
else:
# if fields from both sides are not mappable the whole message is not mappable
return None
return mapping
So I'm not sure what the problem is. I have a branch on my fork https://github.com/LoyVanBeek/ros1_bridge/tree/debug/mapping_uuids that adds a whole bunch of logging to pinpoint this. All I have to offer at the moment.
Yes, i found the same issue for rolling ros2 version. i installed the ros noetic version in my ubuntu22 docker container built from source. and when I print out the pairs, there is no output like this: " - 'rcl_interfaces/msg/Log' (ROS 2) <=> 'rosgraph_msgs/Log' (ROS 1)"
I have tried many methods to solve this problem, but it does not work. i would appreciate that If anybody could provide a solution to it.
Yes, i found the same issue for rolling ros2 version. i installed the ros noetic version in my ubuntu22 docker container built from source. and when I print out the pairs, there is no output like this: " - 'rcl_interfaces/msg/Log' (ROS 2) <=> 'rosgraph_msgs/Log' (ROS 1)"
I have tried many methods to solve this problem, but it does not work. i would appreciate that If anybody could provide a solution to it.
Hi guys, I have solved this problem with this commit b9f1739fd84fc877a8ec6e5c416b65aa2d782f89. My work env is (ubuntu 22 jammy + build from source ros noetic + ros2 rolling) docker container.
You are pointing to a commit that modified a typo in a readme. I guess you meant another commit?
This commit 81f8b08 is still stuck on the same issue that /rosout topics cannot be mapped. Nope, this commit solved my problem. https://github.com/ros2/ros1_bridge/commit/b9f1739fd84fc877a8ec6e5c416b65aa2d782f89
is there a solution to this problem? failed to create 2to1 bridge for topic '/rosout' with ROS 2 type 'rcl_interfaces/msg/Log' and ROS 1 type 'rosgraph_msgs/Log': No template specialization for the pair
do we just checkout the code at this point of commit https://github.com/ros2/ros1_bridge/commit/b9f1739fd84fc877a8ec6e5c416b65aa2d782f89?
We do. But it's a shame we miss all the new features and improvements that are being implemented.
But that's how it goes: workaround is in place, so the issue plunges down the backlog :slightly_frowning_face:
@Timple,
Thanks for the follow up. I modified https://github.com/contradict/ros-humble-ros1-bridge/blob/main/Dockerfile to checkout the commit.
Afterwards, I tried running the examples. I have the following docker containers running with -net=host option.
ros-humble-ros1-bridge running ros1-bridge osrf/ros:noetic-desktop-full running roscore osrf/ros:noetic-desktop-full for running ros1 talker osrf/ros:humble-desktop-full for running ros2 listener
i can see that the bridge is connected
but my listener is not outputting anything.
is there another bug i am unaware of?
I run the commnad ros2 topic info /chatter --verbose Type: std_msgs/msg/String
Publisher count: 1
Node name: _NODE_NAMEUNKNOWN Node namespace: _NODE_NAMESPACEUNKNOWN Topic type: std_msgs/msg/String Endpoint type: PUBLISHER GID: 01.0f.0c.f2.55.00.80.68.01.00.00.00.00.00.12.03.00.00.00.00.00.00.00.00 QoS profile: Reliability: RELIABLE History (Depth): UNKNOWN Durability: VOLATILE Lifespan: Infinite Deadline: Infinite Liveliness: AUTOMATIC Liveliness lease duration: Infinite
Subscription count: 1
Node name: _NODE_NAMEUNKNOWN Node namespace: _NODE_NAMESPACEUNKNOWN Topic type: std_msgs/msg/String Endpoint type: SUBSCRIPTION GID: 01.0f.0c.f2.55.00.80.68.01.00.00.00.00.00.13.04.00.00.00.00.00.00.00.00 QoS profile: Reliability: BEST_EFFORT History (Depth): UNKNOWN Durability: VOLATILE Lifespan: Infinite Deadline: Infinite Liveliness: AUTOMATIC Liveliness lease duration: Infinite
and apparently the Node name for the ros1_bridge package in my ros2 humble docker is not defined. _NODE_NAMEUNKNOWN i am expecting the node to be ros1_bridge as i can see it in my ros1 noetic docker with rosnode list.
problem was my docker network configuration and host firewall settings, the ros1_bridge works fine. recommend to disable firewall with sudo ufw disable
Not to my knowledge.
But if you go bug-hunting: might as well try the master :wink:
Hi. This thread helped me a lot in getting the ros1-bridge to work on my ROS2 Humble + ROS Noetic setup. I've created a Docker image that can build the ros-humble-ros1-bridge
package in 10 minutes -- no need to compile ROS2 Humble from the source. You can find my setup here:
https://github.com/TommyChangUMD/ros-humble-ros1-bridge-builder/
Hi @TommyChangUMD
Nice work. I actually made it to work on ROS2 Iron + ROS Noetic. Also the bridge works by copying the build output into my ROS2 install folder which is very neat and clean.
I'm running a horrible amalgamation of master + action support + some cherry picked fixes. I had to create custom convert_2_to_1 template specializations to convert the severity levels between ros1/ros2. The dynamic bridge needed an extra check to set the QoS for /rosout as well. The other nodes might need that too, but I haven't looked at them.
I'm not sure if this repo is still alive, or will accept changes for humble.
Bug report
Required Info:
ros_bridge
from sourceSteps to reproduce issue
Then run with this docker-compose file:
Expected behavior
Bridging
/rosout
Actual behavior
Not bridging
/rosout
Additional information
Seems like the mapping is not found: https://github.com/ros2/rcl_interfaces/blob/humble/rcl_interfaces/mapping_rules.yaml
Relevant other issues:
https://github.com/ros2/ros1_bridge/issues/159 Was fixed, is broken again for humble https://github.com/contradict/ros-humble-ros1-bridge/issues/2 (Not the fault of the dockerfile I think)