luxonis / rae-ros

Implementation of RAE ROS and gazebo stack
MIT License
32 stars 13 forks source link

PWM resources are not released on container shutdown #45

Closed sskorol closed 1 year ago

sskorol commented 1 year ago

Steps:

Expected: there are no errors during startup Actual: /ws/src/rae-ros/entrypoint.sh: line 5: echo: write error: Device or resource busy is displayed.

I believe we should release PWMs before shutting down the container. The error comes from here when we echo to PWMs.

danilo-pejovic commented 1 year ago

That error is safe to ignore - exporting those files just means we are creating means to control the motors, once the container is powered down and new one is started it will try to create those same files (and fail because they already exist) but it shouldnt have any issue controlling the motors even if it wasnt the process that spawned those files.

It would be helpful to check if files are already exported before trying to export them again - we will probably add those checks relatively soon.