ROS2 bridge don't works to me

Hello, i’m trying to use ROS2 bridge but not works to me because i doesn’t seem to publish ros2 topics. On this topic
External Extensions : ROS2 Bridge the solution for this are change to appimage version but now i’m using appimage. Someone can help me? (using ros1bridge everything is ok)

Hi @leonlime,

I am also encountering issues with using the ROS2 bridge, what output do you get from the terminal when you activate the ROS2 bridge (either at startup if autoload is enabled or when you manually activate it via the UI)?

I receive errors relating to loading dynamic libraries but I am using Ubuntu 22.04 and ROS 2 distribution humble which aren’t yet officially supported? What OS are you using?

ayushg@nvidia.com would you please help

Hello,
As I mentioned on this topic External Extensions : ROS2 Bridge, ROS2 bridge works well.
Before I ran isaac-sim in terminal, I set ROS_DOMAIN_ID. (e.g. export ROS_DOMAIN_ID=10)
Then I also set ROS_DOMAIN_ID in the terminal for ROS2. (the same as isaac-sim)

I have tested ros2 bridge extension with isaac-sim:2022.1.0 docker container.
ros2 bridge extension doesn’t work in docker container.
It is the same as with isaac-sim:2021.2.1 docker container.
AppImage works well but docker container doesn’t.

Hello @sunryang.kim ,

In Isaac Sim 2022.1, we use the ROS2 Context OmniGraph node to define the ROS2 domain ID’s. For example, to run the ROS2 Navigation sample with a domain ID of 10, you would need to open the scenario (Isaac Examples → ROS → Navigation), then look for a context node in each ActionGraph and set the domain_id input value to 10.

For the standalone workflow (looking at the ROS2 carter_stereo example), you can set the domain_id value of the context nodes using the following code:

# Setting ROS_DOMAIN_ID to 10
og.Controller.set(og.Controller.attribute("/World/Carter_ROS/ActionGraph" + "/ros2_context.inputs:domain_id"), 10)
og.Controller.set(og.Controller.attribute("/World/Carter_ROS/ROS_Cameras" + "/ros2_context.inputs:domain_id"), 10)
og.Controller.set(og.Controller.attribute("/World/ROS_Clock" + "/ros2_context.inputs:domain_id"), 10)

You would also need to disable the rclpy Twist publisher in the sample and run the following line in a new sourced terminal with ROS_DOMAIN_ID set: ros2 topic pub /cmd_vel geometry_msgs/msg/Twist "{linear: {x: 0.0, y: 0.0, z: 0.0}, angular: {x: 0.0, y: 0.0, z: 0.5}}"

In either case, you should never have to run export ROS_DOMAIN_ID=10 in the isaac sim terminal. For your own projects you would only need to set the domain_id value once in the ros2 context node and this will be saved in your USD file.

Hope that helps!

Hello @Ayush_G,

Thank you for your advice.
I’ve already tested ros2_bridge extension with Isaac Sim 2022.1 appImage with basic installation(2. Basic Isaac Sim Installation — Omniverse Robotics documentation) and it works well. (I used ROS2 foxy docker container for test)
But when I tested ros2_bridge extension with Isaac Sim 2022.1 docker container with advanced installation(3. Deploy to Cloud — Omniverse Robotics documentation), it didn’t work.
For Isaac Sim 2022.1 docker container was built on Ubuntu 18.04, I used another docker container for ROS2 foxy.
I made ROS2 foxy docker container have the same ROS_DOMAIN_ID as that of ros2_bridge extension(default 0).
It didn’t seem to publish ros2 topics.

Hello @sunryang.kim,

Does it work if you run both the isaac-sim container and the ROS2 Foxy container using the following flags?

  1. --network=host
  2. -v /dev/shm:/dev/shm (to mount the directory for shared memory inside the containers)

The following command for running the isaac-sim container (from the advanced installation) is modified with these added flags.

sudo docker run --name isaac-sim --entrypoint bash -it --gpus all -e "ACCEPT_EULA=Y" --rm --network=host \
-v ~/docker/isaac-sim/cache/kit/nv_shadercache:/isaac-sim/kit/cache/Kit/103.1/6e2a27c0/nv_shadercache:rw \
-v ~/docker/isaac-sim/cache/ov:/root/.cache/ov:rw \
-v ~/docker/isaac-sim/cache/pip:/root/.cache/pip:rw \
-v ~/docker/isaac-sim/cache/glcache:/root/.cache/nvidia/GLCache:rw \
-v ~/docker/isaac-sim/cache/computecache:/root/.nv/ComputeCache:rw \
-v ~/docker/isaac-sim/logs:/root/.nvidia-omniverse/logs:rw \
-v ~/docker/isaac-sim/config:/root/.nvidia-omniverse/config:rw \
-v ~/docker/isaac-sim/data:/root/.local/share/ov/data:rw \
-v ~/docker/isaac-sim/documents:/root/Documents:rw \
-v /dev/shm:/dev/shm \
nvcr.io/nvidia/isaac-sim:2022.1.0

And running your foxy docker could look similar to:
docker run -it --rm --network=host -v /dev/shm:/dev/shm osrf/ros:foxy-desktop

1 Like

Hello @Ayush_G,

  1. “-v /dev/shm:/dev/shm” made ros2_bridge extension work.
    I started docker container with

Thank you for your help.

Thanks for the replies. To solve the problem I simply formatted my pc and reinstalled everything again and then, ros2bridge worked fine.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.