Best practices for pose/vector transformations

asked 2015-11-25 11:43:28 -0600

Georacer gravatar image

Hello everyone!

This is more of a discussion than a question needing a specific answer. I couldn't find a similar question, so here:

I've written a flight simulator with critical performance constraints: I need it to run as fast as possible.

I need to transform various vectors from one frame to another in each time step.

I use tf::Transform objects to accomplish this a seen here and here, for example. I fill the body_to_mount fields with the required tf data and use multiplication (as here) to transform my data.

I do this because I get the feeling that using tf::TransformListener::rotateVector methods often in my code will slow down my loop time, as the method has to reach out the tf tree, parse it and retrieve the data each time.

What do you think? Am I being paranoid?

Thanks in advance!

edit retag flag offensive close merge delete

Comments

I do this because I get the feeling [..]

Feelings are nice, hard data is nicer. What have you observed when profiling your critical path?

gvdhoorn gravatar image gvdhoorn  ( 2015-11-26 02:20:28 -0600 )edit

No hard data yet. I'll try something and get back to you when I have some. I just asked in case this was a well-known practice.

Georacer gravatar image Georacer  ( 2015-11-26 04:51:15 -0600 )edit