Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ROS2 Pose control ignores message frame #22

Open
Fireronin opened this issue May 24, 2024 · 9 comments
Open

ROS2 Pose control ignores message frame #22

Fireronin opened this issue May 24, 2024 · 9 comments
Assignees

Comments

@Fireronin
Copy link
Contributor

Opened per @michalpelka request. I don't think it's a problem, but it can be changed to filter out only matching frames or something if this is needed

@michalpelka
Copy link
Collaborator

michalpelka commented May 24, 2024

Thanks for opening up, but I strongly disagree with your judgment on a minority of the issue. It is a problem since every ROS 2 tool should perform the transformation of stamped messages.

Let's assume that some system will give commands to move the robot one meter forward. In this case, it would send a message with "base_link" frame_id and translation [1,0,0]. In the current code, it will set it in the scene at [1,0,0] permanently.
This tool should be aligned with transform components existing in ROS 2 gem.
Please provide a detailed plan of implementation here.

@Fireronin
Copy link
Contributor Author

I think this is supported by TF2 API, you just create map(at 0,0)->anchor(at custom start point)->base_link

@michalpelka
Copy link
Collaborator

michalpelka commented May 27, 2024

Could you provide an exact API to do that? It looks like a workaround to not fully implemented functionality.

@Fireronin
Copy link
Contributor Author

So I think there are 2 ways this can be handled and they have different benefits and drawbacks:

Solution 1:
Change type of message received from PoseStamped to Pose.

  • Dose not require understanding of tf2
  • Provides easy to use interface to move things around in engine, and combined with starting offset, this should give user a simple way to use ros2 interface to move things around in engine.
  • Makes it bit harder to use it to teleport things to relative positions

Solution 2:
Resolve the position of frame_id in the message, using tf2 interface then move the object to position relative to frame_id. This gives more control. But very similar things can be achieved by using TF2 mode, and interacting directly with tf2 tree in ros2.

Tell me what you need and I will implement it. 🙂

@pijaro
Copy link
Contributor

pijaro commented Jun 4, 2024

We should use frame_id from the PoseStamped. As a first implementation (and a default), we should use the map frame as the (0,0,0) of the level.

If there is another transform living on the /tf, ie map -> poi, then we need to be able to spawn with PoseStamped.Header.frame_id=poi in the correct position.

@michalpelka
Copy link
Collaborator

I like @pijaro idea.

@Fireronin
Copy link
Contributor Author

Here is branch that implements this, it's waiting for base branch for merge
https://github.com/RobotecAI/robotec-o3de-tools/tree/frame-header-consideration

@arturkamieniecki
Copy link
Contributor

A new PR addressing this issue was made: #88

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants