OrebroUniversity / navigation_oru-release

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Abort flag in Tasks at Execute Task service

MFernandezCarmona opened this issue · comments

Hi,
It seems that we cannot abort tasks on the vehicle execution node. We have an example code to call it https://github.com/OrebroUniversity/navigation_oru-release/blob/master/orunav_vehicle_execution/src/send_abort_task_main.cpp, but it seems that it's not handled.

Is this obsolete somehow? What would be the approach?
Thanks

I know, this is so big and complex that I'm always afraid of breaking things. I checked for the namespacing, but it as "abort" is inside "execute task", and "execute task" service works, it should too.
So I searched inside vehicle execution node code for any use of the word "abort" but no results. I think this may be something removed from the code before uploading it to github.
Could it be the case?
Thanks

I think I can work with update trajectories and avoid aborting. But in the future this may be relevant...

Hi,
I've been working on trajectory updates, but there is a limitation in this approach: "computeTrajectoryChunksCASE2" method in vehicle execution node needs at least 3 points in the new trajectory to work. As I'm calling coordinator to trigger this, I need to provide at least 5 points due to the extra processing time.
So, updating trajectories to force the robot to stop only allows me to do it with a huge delay. I.e. the robot will still advance almost 2 meters after the signal is sent.
I've tried to force the "brake" state implemented in the proximity areas, but from that I cannot reset the trajectory pool to create a faster "abort".
@h72a65 @FedericoPecora @ksatyaki you can see the problem in this linked video:
https://www.dropbox.com/s/o19izprgoa9o45r/Abort_as_task_update.ogv?dl=0

Just discussed this with @h72a65 and a better way to brake fast would be to compute and apply the new "stopping" trajectory segment inside the vehicle execution node, which would save the round-trip via the coordinator, if I understood correctly.

@MFernandezCarmona could you look into the vehicle execution node and see if you can apply the abort directly in there? And in case of problems, a direct email to henrik.andreasson@oru.se is more likely to be seen than a mention here.

Agree. One of my attempts was to use "sendBrakeCommand" inside a callback to force a stop and then send a new trajectory, but never managed to change the trajectory, because it complained about being on the wrong state.

https://github.com/MFernandezCarmona/navigation_oru-release/blob/master/orunav_vehicle_execution/src/orunav_vehicle_execution_node.cpp#L1511

Maybe that it's useful with some changes. I'll forward this to Henrik to see his opinion.

I have implemented an "abort" behaviour. It basically stops and clears out whatever is remaining from the ongoing trajectory. We can discuss it in detail at the pull request.
Cheers