cyberbotics / webots_ros2

Webots ROS 2 packages
Apache License 2.0
389 stars 141 forks source link

hard coded temp directory causes IPC connection issues to webots due to different lookups #921

Open snoato opened 1 month ago

snoato commented 1 month ago

Describe the Bug A clear and concise description of what the bug is. Webots uses IPC for communication with external controllers like the webots_ros2 bridge. To enable this, a file is created in the temp directory. Webots looks up the default temp directory for the system (e.g., it might be /var/tmp instead of /tmp on some setups). webots_ros2 only uses /tmp statically. This means that they are unable to communicate unless the code is changed or a symlink is created, since webots_ros2 can't find the IPC file.

Steps to Reproduce

  1. Change the default temp directory
  2. Run webots_ros2
  3. Communication will be impossible

Expected behavior webots_ros2 should also use the default temp directory (e.g. using python's tempfile.gettempdir().

System