ros-teleop / twist_mux

Twist multiplexer
Apache License 2.0
57 stars 86 forks source link

Publish zero if locked #42

Open BriceRenaudeau opened 1 year ago

BriceRenaudeau commented 1 year ago

Hi,

I found that when a topic is locked, the mux just stops publishing. This means that our robot depends on another timeout to stop (the smoother in our case). twist_mux_lock_timout

So I made a small modification to publish zero twists when the topic that has priority is locked.

To do so, I moved the lock check in the topic callback. If the topic is locked, I replace the message with geometry_msgs::msg::Twist(). If this topic has priority, the zero twist value will be published.

Hence the robot starts to brake immediately.

doisyg commented 1 year ago

This seems very useful. Can we have an estimate of when it will be merged ? @bmagyar and @efernandez, do you know who currently maintains this package ?

bmagyar commented 1 year ago

hi guys, sorry for the delay on this

could you please add a feature flag for this and have it off by default? I'd rather not change default behaviour straight away

BriceRenaudeau commented 1 year ago

I will make the modification to make it optional.

What do you mean by feature flag?

BriceRenaudeau commented 1 year ago

Hi @bmagyar,

I made the changes to make it optional.

It may be good to change the documentation too.