ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

ros1_bridge doesn't find ROS1 std_msgs/String type for chatter example

asked 2023-02-22 11:42:26 -0500

alberto gravatar image

updated 2023-02-22 13:07:22 -0500

Hi all, I'm using ROS2 Foxy on Windows in one PC, and ROS1 Noetic on Linux in another machine. I want them to communicate. I've compiled ros1_bridge following its readme, knowing that for the Foxy pkg I need to checkout the correct branch.

  • I managed to build ros1_bridge correctly.
  • The two machine are communicating in ROS2, which means I can see the topics and do the echo.
  • The machine on Windows (ROS2 ) is publishing, the other (ROS1 and ROS2) is subscribed, I want to read the topic in ROS1. (I'm literaly doing the example 1b)

Now, the bridge starts but I get:

created 2to1 bridge for topic '/chatter' with ROS 2 type 'std_msgs/msg/String' and ROS 1 type ''

While I am expecting:

created 2to1 bridge for topic '/chatter' with ROS 2 type 'std_msgs/msg/String' and ROS 1 type 'std_msgs/String'

EDIT: I noticed that adding --bridge-all-topics, I get the correct type for ROS1, but still the listener node doesn't print anything. After some minutes it says: Failed to connect to xxx.yyy.local:49195

I did source ROS1 and ROS2 before the build, and if I do rostopic type /chatter I get std_msgs/String.

What am I doing wrong?

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
0

answered 2023-02-23 04:46:14 -0500

alberto gravatar image

I solved myself, still I'm not sure how. The thing I did was to close the terminal dedicated to the bridge and re-do all the source (Linux), on Windows I did nothing. Other things I did previously was:

  • to remove the firewall with sudo ufw disable, because I wasn't able to see ros2 topics
  • add export ROS_MASTER_URI=http://localhost:11311 and export ROS_IP=127.0.0.1 in .bashrc. (Maybe this changes were crucial, and I didn't reopen the terminal after them)

Now everything works, tested also with a PoseStamped publisher/subscriber.

edit flag offensive delete link more

Comments

Great,happy it was solved.

Davies Ogunsina gravatar image Davies Ogunsina  ( 2023-02-24 06:43:41 -0500 )edit
0

answered 2023-02-22 18:04:22 -0500

Davies Ogunsina gravatar image

Using the ros1_bridge we have the dynamic , parameter and action bridge. Open new terminal after you have launched the ros1_brige , source the ros 2 distro, then source the ros 1_distro . Then : rostopic list .

edit flag offensive delete link more

Question Tools

2 followers

Stats

Asked: 2023-02-22 11:42:26 -0500

Seen: 132 times

Last updated: Feb 23 '23