FlexBE / generic_flexbe_states

A collection of robot-agnostic FlexBE states.
BSD 3-Clause "New" or "Revised" License
13 stars 27 forks source link

Add timeout parameter to get_joint_values states #7

Open dcconner opened 6 years ago

dcconner commented 6 years ago

For GetJointValuesState and GetJointValuesDynState a state can block indefinitely if parameter values are not published.

I propose adding an optional time out parameter (default: None) that will return a 'timeout' outcome. If no timeout value is given, then will block indefinitely.

I propose doing this in a kinetic_devel branch to avoid conflicts with existing indigo code.

lcluz commented 4 years ago

Was this ever addressed? I am looking into the possibility of having a timeout in a state (different from the ones you refer), to avoid it getting stuck. Is there a way to do that?

pschillinger commented 4 years ago

Adding a timeout is quite straightforward and you can take a look at the flexbe_states/WaitState for an example (this state is essentially nothing else than a timeout).

Regarding this specific issue, I don't know whether somebody did it, at least there is no PR open. But feel free to open one in case you need to improve one of the state implementations here. I'm currently not working on this repo myself, but plan to revise and improve the existing state implementations once I finished my current clean-up iteration of the main repo.

AravindaDP commented 4 years ago

I would also suggest making hardcoded join_states topic a state param so it can be configured. (To support reading joint_states from different paths on different states. e.g. in case of a multi robot coordination where different robots have joint states published on different topics.)

I would be happy to make a PR if it is a welcome enhancement.

dcconner commented 4 years ago

This fell of my radar. I'll try and submit the pull request this week