Ask Your Question
1

Seeking clarity regarding frame of reference in which robot velocities are provided

asked 2022-02-02 02:57:26 -0500

electrophod gravatar image

I have a very simple doubt.

I have a robot with a body frame B attached very rigidly to it. I have a world frame W attached rigidly to the ground i.e. my inertial frame. When I publish a Twist message with some linear and angular velocity components, with respect to which frame are they published or considered?

From my knowledge, it is definitely not the world frame W because when I publish a positive in linear.x the robot just simply moves forward with respect to its instantaneous position. Is the answer something like with respect to the "instantaneous" body frame or something similar?

Seeking for clarity,

Thanks

edit retag flag offensive close merge delete

Comments

2

Just an observation: you seem to expect a generic answer, while in reality I believe it's very much possible for different Twist consumers to behave differently here. For some, the frame of reference may be the body-local frame, for others, an external one.

If you're observing behaviour of a specific component which made you ask this question, it would be good to mention that component, as it could help you getting (better) answers.

Note that the question would probably be different if you'd mentioned TwistStamped.

gvdhoorn gravatar image gvdhoorn  ( 2022-02-02 05:36:52 -0500 )edit

Thank you for your response. To clarify my question. I had ground robots in my mind while asking this question. We can take the Turtlebot3 for example.

electrophod gravatar image electrophod  ( 2022-02-02 19:41:37 -0500 )edit
1

Why would the question be completely different if I mentioned TwistStamped instead of Twist? I did not understand, please explain.

electrophod gravatar image electrophod  ( 2022-02-02 19:42:21 -0500 )edit
1
skpro19 gravatar image skpro19  ( 2022-02-03 11:08:29 -0500 )edit
2

See the second paragraph in @tryan's answer.

gvdhoorn gravatar image gvdhoorn  ( 2022-02-03 11:12:30 -0500 )edit
1

@gvdhoorn that was helpful. Thanks!

skpro19 gravatar image skpro19  ( 2022-02-03 11:13:28 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
2

answered 2022-02-02 22:02:45 -0500

tryan gravatar image

From what you describe, the short answer is that your Twist message is probably applied in the "'instantaneous' body frame" as you put it, but as @gvdhoorn mentioned, it's really up to the consumer to choose/assume the reference since there is no inherent frame in a simple Twist message. Velocities for a robot are commonly expressed in the base_link frame, which is rigidly attached to the robot base, but it would be equally valid--and sometimes desirable--to express them in another frame.

If it's a TwistStamped message instead, it has a header component, which includes a timestamp and a frame of reference. Then, the answer is more concrete since the supplied velocities are explicitly attached to a specific frame at a specific time. If you want someone to comment on what's happening in your case for certain, please provide more context.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

3 followers

Stats

Asked: 2022-02-02 02:57:26 -0500

Seen: 26 times

Last updated: Feb 02