Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DDS_RETCODE_BAD_PARAMETER] Bad parameter value In ROS2 foxy execution #2179

Open
incheol67 opened this issue Feb 20, 2025 · 0 comments
Open

Comments

@incheol67
Copy link

Hello,
I encountered an issue while using CycloneDDS communication.

When I run a regular Python script, everything works fine without any errors. However, when I run a ROS 2 node, I get the following error:

📌 [Error message: BAD PARAMETER]


(go2) unitree@ubuntu:~/ros2_ws/sim2real$ ros2 run go2_viplanner rgb_node

Traceback (most recent call last):
File "/home/unitree/ros2_ws/sim2real/install/go2_viplanner/lib/go2_viplanner/rgb_node", line 33, in
sys.exit(load_entry_point('go2-viplanner==0.0.0', 'console_scripts', 'rgb_node')())
File "/home/unitree/ros2_ws/sim2real/install/go2_viplanner/lib/python3.8/site-packages/go2_viplanner/rgb_node.py", line 75, in main
camera_publisher = CameraPublisher()
File "/home/unitree/ros2_ws/sim2real/install/go2_viplanner/lib/python3.8/site-packages/go2_viplanner/rgb_node.py", line 26, in init
self.client = VideoClient()
File "/home/unitree/ros2_ws/unitree_sdk2_python/unitree_sdk2py/go2/video/video_client.py", line 12, in init
super().init(VIDEO_SERVICE_NAME, False)
File "/home/unitree/ros2_ws/unitree_sdk2_python/unitree_sdk2py/rpc/client.py", line 10, in init
super().init(serviceName)
File "/home/unitree/ros2_ws/unitree_sdk2_python/unitree_sdk2py/rpc/client_base.py", line 22, in init
self.__stub.Init()
File "/home/unitree/ros2_ws/unitree_sdk2_python/unitree_sdk2py/rpc/client_stub.py", line 30, in Init
self.__sendChannel = factory.CreateSendChannel(GetClientChannelName(self.__serviceName, ChannelType.SEND), Request)
File "/home/unitree/ros2_ws/unitree_sdk2_python/unitree_sdk2py/core/channel.py", line 232, in CreateSendChannel
channel = self.CreateChannel(name, type)
File "/home/unitree/ros2_ws/unitree_sdk2_python/unitree_sdk2py/core/channel.py", line 229, in CreateChannel
return Channel(self.__participant, name, type, self.__qos)
File "/home/unitree/ros2_ws/unitree_sdk2_python/unitree_sdk2py/core/channel.py", line 166, in init
self.__topic = Topic(self.__participant, name, type, qos)
File "/home/unitree/.local/lib/python3.8/site-packages/cyclonedds/topic.py", line 59, in init
super().init(
File "/home/unitree/.local/lib/python3.8/site-packages/cyclonedds/core.py", line 181, in init
raise DDSException(
cyclonedds.core.DDSException: [DDS_RETCODE_BAD_PARAMETER] Bad parameter value. Occurred upon initialisation of a cyclonedds.topic.Topic

I tried debugging this bad parameter issue, and I found that the values being passed when running the regular Python script and the ROS 2 node are exactly the same.

🚨 So why does it fail only in ROS 2?
What could be causing this issue specifically when running the ROS 2 node?

Image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant