ros2 / ros2/geometry2

tf2_buffer_server aborts goal without setting error if timeout is set in goal

Open
#500 0 comments 0 reactions 1 assignee View on GitHub

@ahcorde is already working on this.

Since Feb 3, 2022.

Dominant language
C++
Stars
153
Forks
256
Avg merge
3d 23h
Merged PRs (30d)
14

Description

Galactic from Packages

I wrote an action client for the tf2_buffer_server and tested it with invalid frames while setting the timeout in the goal. I did not check the goal-status, but only the error flag in the result. This works if I don't set the timeout, because the result.error.error is set to LOOKUP_ERROR https://github.com/ros2/geometry2/blob/74b873a497f405f4296bb1c5de4023ff45eb9007/tf2_ros/src/buffer_server.cpp#L75

If however I set the timeout, the action is aborted without setting the error:
https://github.com/ros2/geometry2/blob/74b873a497f405f4296bb1c5de4023ff45eb9007/tf2_ros/src/buffer_server.cpp#L98

I know that you should check the goal-status, but I think it would be nicer to have a consistent result so that we always have the error filled if the action did not succeed.

My proposal would be to simply set
result->error.error = result->error.TIMEOUT_ERROR;
if the timeout was triggered.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.