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

[pose control] Header PoseStamped consideration added #35

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

Fireronin
Copy link
Contributor

Based on #22

@Fireronin Fireronin changed the title Pose consideration Header po PoseStammped consideration added Jun 12, 2024
@Fireronin Fireronin changed the title Header po PoseStammped consideration added Header PoseStammped consideration added Jun 17, 2024
@Fireronin Fireronin changed the title Header PoseStammped consideration added [pose control] Header PoseStammped consideration added Jun 17, 2024
@adamdbrw adamdbrw changed the title [pose control] Header PoseStammped consideration added [pose control] Header PoseStamped consideration added Jun 17, 2024
Copy link
Collaborator

@michalpelka michalpelka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I cannot accept - I set it to move in base_link with identity transform - this should give no movement, however it caused robot movement. It gave unpredictable results when Offset Tag is used.
Here is no tag:
Screencast from 07-25-2024 05:54:33 PM.webm
Here is tag of box entity used:
Screencast from 07-25-2024 05:55:31 PM.webm

Signed-off-by: Krzysztof Rymski <[email protected]>

formating

add include

try/catch

tryc catch part2

Resolving conversations

Update Gems/ROS2PoseControl/Code/Source/Clients/ROS2PoseControl.cpp

Co-authored-by: Piotr Jaroszek <[email protected]>

Fixed bad movement

Pose consideration

Signed-off-by: Krzysztof Rymski <[email protected]>

formating

add include

try/catch

tryc catch part2

Resolving conversations

Update Gems/ROS2PoseControl/Code/Source/Clients/ROS2PoseControl.cpp

Co-authored-by: Piotr Jaroszek <[email protected]>

Fixed bad movement
@Fireronin
Copy link
Contributor Author

Rebased and tested

@pijaro
Copy link
Contributor

pijaro commented Aug 6, 2024

I can't make it work with my example.

I put two entities on the scene with ROS 2 frames (base_link and target):

image
image

I've added the ROS2PoseControl to base_link model, set tracking to true, and published the message:

ros2 topic pub /goal_pose geometry_msgs/msg/PoseStamped "{header:{frame_id: target}, pose:{position:{x: 1.0}}}" -1

It was expected that base_link model would teleport to 1m in front of target, but I got the warning:

[Warning] (ROS2PoseControl) - No entity with tag found .
[Warning] (ROS2PositionControl) - Could not transform map to target, error: Invalid frame ID "map" passed to canTransform argument target_frame - frame does not exist

and nothing happened.

It works when I set the frame to base_link, then it will jump 1m on X axis:

ros2 topic pub /goal_pose geometry_msgs/msg/PoseStamped "{header:{frame_id: base_link}, pose:{position:{x: 1.0}}}" -1

@Fireronin
Copy link
Contributor Author

Generally, I have written a more detailed documentation https://github.com/RobotecAI/robotec-o3de-tools/blob/kr/pose-controll-better-documentation/doc/UserGuide/PoseControl.md

It will be merged in another pr, but first this needs to be resolved, you are missing transform from map frame to target frame. Therefore If you are saying I want to move this object in front of target frame, component tries to find location in relation to map.

This is because this component is generally made to work in ROS 2 tf positions

@Fireronin
Copy link
Contributor Author

I see, in my testing I didn't encountered this as correct values were set when I was using goal position and then they persisted even when they were hidden, now I made thise settings visible once more

@pijaro
Copy link
Contributor

pijaro commented Aug 6, 2024

TF tree in my example is a valid ROS 2 TF tree and the proposed system should also work.

There is no reason to require map frame to exist.

@pijaro
Copy link
Contributor

pijaro commented Aug 6, 2024

As for the reference frame, I don't think this should be a requirement as well.

We have TF API and we can get any transformation in a tree we want. Why do we need to stick to one, specified reference frame? We can get a transform base_link -> target and then use that to move base_link the way we want.

@Fireronin
Copy link
Contributor Author

Tldr, this will introduce even more feature creep, currently there are like 4 cases for goal messages now it will be 5

@pijaro
Copy link
Contributor

pijaro commented Aug 6, 2024

I'm not sure what cases you are referring to exactly.

Let's make it work for all TF trees and with only the essential configuration needed.

If the code is starting to look bloated, then maybe some alternative approaches should be considered.

@pijaro
Copy link
Contributor

pijaro commented Aug 6, 2024

Generally, I have written a more detailed documentation https://github.com/RobotecAI/robotec-o3de-tools/blob/kr/pose-controll-better-documentation/doc/UserGuide/PoseControl.md

Is there a reason not to include the readme update here, in this PR? Why splitting it?

@Fireronin Fireronin requested a review from pijaro August 14, 2024 08:24
@Fireronin
Copy link
Contributor Author

@michalpelka Can you take a look one more time ?

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

Successfully merging this pull request may close these issues.

5 participants