ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

Calculate velocity of a moving frame from two different timestamp

asked 2015-06-01 09:34:22 -0500

Hi everyone, I have a moving frame (let's call it /moving) that is obviously moving w.r.t. some other frame (e.g. /world). With this setup, I can calculate the speed of the "moving frame" from two different timestamps in a trivial way like

listener.lookupTransform("moving","world", new_timestamp, t1)
listener.lookupTransform("moving","world", old_timestamp, t2)
delta_time = new_timestamp - old_timestamp
t3=t2.inverseTimes(t1) //the position displacement
translational_velocity = t3.getOrigin() / delta_time.toSec()

My question is: can I use the lookupTwist method to evaluate the DELTA speed between two different times (but same frame)? I mean,

listener->lookupTwist("moving","world", TIMESTAMP, ros::Duration(0.1), frame_speed);

gives the velocity w.r.t. the fixed frame, not the deltas.

Ideas? Thank you :-)

Augusto

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2015-06-01 16:38:38 -0500

tfoote gravatar image

It sounds like you want the change in velocity of the moving frame between times 1 and 2. in that case I think that calling lookuptwist of as you have at the two different times and then comparing them would give you the results you want.

edit flag offensive delete link more

Comments

Thank you tfoote, I tried your suggestion and seems it is all right. Let me verify it and then I'll post some lines of code! Bye, Augusto

Augusto Luis Ballardini gravatar image Augusto Luis Ballardini  ( 2015-06-24 12:53:21 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2015-06-01 09:34:22 -0500

Seen: 944 times

Last updated: Jun 01 '15