ROS2 Humble - SystemD + CycloneDDS topics not showing up on boot

asked 2022-11-14 02:23:20 -0500

eth1 gravatar image

I'm running ROS2 Humble on Ubuntu 22.04, with Cyclone DDS. So far, I'm running into issues similar to this, but slightly different.

This is my service file, for a Python publisher that acquires images from a GigE vision camera, then publishes it to a ROS topic:

[Unit]
Description=GigE Vision camera service
After=network.target

[Service]
Type=simple
Environment="RMW_IMPLEMENTATION=rmw_cyclonedds_cpp"
ExecStart=/bin/bash -c "source /opt/ros/humble/setup.bash && /opt/camera/gige.py '<cam_serial>' 'camera/gige_1' --fps 30"
User=camera
LimitNOFILE=100000
Restart=always
KillSignal=SIGKILL

[Install]
WantedBy=multi-user.target

The service seems to start fine after a reboot (LED on the camera showed that frames are being pulled from it), but if I run

ros2 topic list

The topic for the camera could not be found. Curiously, if I do a systemctl restart gige-camera.service, those topics will then appear as expected. This also seems to be affecting the ROS bridge (I'm using it to connect Foxglove Studio to ROS2) - the bridge service starts successfully on boot, and Foxglove can connect to it, but there will be no topics of interest until both the publisher services and the bridge is restarted.

As the thread above links to a solution for Fast-RTPS DDS, is there something similar that can be done to make Cyclone DDS work?

edit retag flag offensive close merge delete