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

Issue with RosPublisherSystem in Python #379

Open
phanikiran1169 opened this issue Mar 3, 2025 · 0 comments
Open

Issue with RosPublisherSystem in Python #379

phanikiran1169 opened this issue Mar 3, 2025 · 0 comments

Comments

@phanikiran1169
Copy link

Hello,

On the latest commit f208880 for drake-ros, there is an issue with the usage of RosPublisherSystem in Python. I am unable to run the example python script rs_flip_flop.py

Details

OS: Ubuntu LTS 22.04 LTS
ROS Distribution: Iron
Drake (installed via APT): drake-dev 1.37.0-1

Error Log

sirhawk@phani:~/test/src/drake-ros$ ros2 run drake_ros_examples rs_flip_flop.py
Traceback (most recent call last):
  File "/home/sirhawk/test/install/drake_ros_examples/lib/drake_ros_examples/rs_flip_flop.py", line 152, in <module>
    main()
  File "/home/sirhawk/test/install/drake_ros_examples/lib/drake_ros_examples/rs_flip_flop.py", line 91, in main
    RosPublisherSystem.Make(Bool, "Q", qos, sys_ros_interface.get_ros_interface()))
  File "/home/sirhawk/test/install/drake_ros/lib/python3.10/site-packages/drake_ros/core/__init__.py", line 88, in _make_ros_publisher_system
    return RosPublisherSystem(
RuntimeError: Unable to load a custom holder type from a default-holder instance
cannot publish data, at ./src/rmw_publish.cpp:62 during '__function__'
Fail in delete datareader, at ./src/rmw_service.cpp:100 during '__function__'
[ros2run]: Segmentation fault

The above error is specific to Python. The C++ executable works without any errors. I also noticed that this issue was not present in the commit b6fba61 (This is my current working commit and I have no issues with RosPublisherSystem in Python. I have noticed this issue when I have pulled in the latest commit)

C++ working log

sirhawk@phani:~/test/src/drake-ros$ ros2 run drake_ros_examples rs_flip_flop
sirhawk@phani:~/test/src/drake-ros$ ros2 topic list
/Q
/Q_not
/R
/S
/parameter_events
/rosout

Kindly let me know if my observations are valid

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