Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions controller_manager/controller_manager/spawner.py
Original file line number Diff line number Diff line change
Expand Up @@ -393,6 +393,19 @@ def main(args=None):
node.destroy_node()
if lock.is_locked:
lock.release()
# workaround for https://github.com/ros-controls/ros2_control/issues/2330
# the lock file is not automatically removed after termination, which hinders other users to start ros2control
if os.path.isfile(lock.lock_file):
try:
os.remove(lock.lock_file)
logger.info(
f"Lock file '{lock.lock_file}' explicitly removed after spawning "
+ bcolors.BOLD
+ controller_name
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
+ controller_name
+ f"{controller_names}"

+ bcolors.ENDC
)
except PermissionError as err:
logger.fatal(str(err))
rclpy.shutdown()


Expand Down
Loading