ROS2 joint_state publish and subscribe of topic issue

Is there a difference to use ROS2 compared to ROS1 with the joint state subscriber and publisher? I have issue publishing topic joint_state in ros2 and seeing the output in a terminal. The ros2 bridge is turned on.

And do you have to install the joint_state_publisher in the isaac sim ROS2 workspace to be able to publish and subscribe to topics like joint_states and joint_command?

FYI i am able to run an isaac sim example that publishing camera and rgb topics and i can see them fine in the terminal.

1 Like

Hi @bjhsaghaug - Can you confirm this is still an issue with latest Isaac Sim 2022.2.1?

Hello rthaker.

I have just tested it on Isaac sim 2022.2.1 and have the same problem.
I am doing the tutorial: 8. ROS2 Joint Control: Extension Python Scripting, to test the publish and subscribe.
I have colcon buildt the ros2 workspace in isaac sim 2022.2.1 and sourced the terminals that i try to se the topics published and the terminal where i try to run the python script.

Have tried to change the ROS_ID and added a ROS2 Context to specify my ROS ID number.
Have also modified the fastdds.xml file so i dont get the [RTPS_TRANSPORT_SHM Error] when running ros2 topic list.

I am using ubuntu 20.04, and ROS2 foxy

Are you seeing this issue with the GUI example, or the Extension example, or both?

Hey qwan
I have only tested the Extension version, I do tutorial up to 8.2 step 10, when i cannot see the joint_states in tutorials and when i start the ros2 run isaac_tutorials script, i dont see any output of the joint_states in the terminal and the arm in isaac sim does not move, which implies that it does not receive the joint_command from the script.
I follow the video that is added in tutorials, but i dont get any of the outputs from that video in my end.

and just to double chekc, was the environment variable for FASTRTPS_DEFAULT_PROFILES_FILE added to all the terminals that messages needed to be sent or received? In your case it sounds like (1) the terminal that you are running the script in, (2) before launching sim, and (3) the terminal you are running the ros2 topic list in.

To fix the issue with FASTRTPS I followed the solution from github: ROS2 Foxy communication issues · Issue #3000 · eProsima/Fast-DDS · GitHub, which leads to another file (isaac_ros_common/rtps_udp_profile.xml at main · NVIDIA-ISAAC-ROS/isaac_ros_common · GitHub) that modifies the FASTRTPS file that is shown in ROS/ROS2 installation.

After updating the file i ran these two commands:
export FASTRTPS_DEFAULT_PROFILES_FILE=~/.ros/fastdds.xml
export RMW_IMPLEMENTATION=rmw_fastrtps_cpp

This solved the issue with [RTPS_TRANSPORT_SHM Error] in the terminal that runs isaac sim and ros2 topic list. But after running both commands and restart the pc, I havent added the file to new terminals, since havent gotten the error code I thought i didnt have to add every time.

Also I am using the Terminator terminal to run the ros2 topic list, isac sim is ran on the normal terminal when i start the program.

If i understand correct, i have to add the FASTRTPS file to every terminal that i am using for isaac sim, ros2 topics and python scripts? And should i also source ros2 at the normal terminal that opens up isaac sim before i launch isaac sim?

I am fairly new to using isaac sim, so there might be some basic stuff I have missed.

I manage to solve my problem.

The issue was that i was launching isaac sim from the omniverse GUI which didnt allow me to set up the FASTRTPS environment. When i figured out how to launch isaac sim from terminal where i had the environment set up, I am now able to publish and subscribe the /joint_states and /joint_command.
Thank you for the help qwan, the questions you asked guided me to the solution.

For info to others who are new and might have similar issue with ROS publishing and subscribing, using ROS2 bridge you start isaac sim in terminal with running the script (ref 7. Setup FAQ — Omniverse Robotics documentation) in the isaac sim folder (also have to set up permission to run the script with chmod), this shows the same startup screen as starting isaac sim from the omniverse GUI.
Just remember to set up FASTRTPS environment before launching isaac sim from the same terminal with commands:
export FASTRTPS_DEFAULT_PROFILES_FILE=~/.ros/fastdds.xml
(follow the ROS/ROS2 install guide 6. ROS & ROS 2 Installation — Omniverse Robotics documentation)

1 Like

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