Pinocchio: Speeding Up Computation Time of Inverse Dynamics

Created on 6 Nov 2019  路  6Comments  路  Source: stack-of-tasks/pinocchio

Dear Pinocchio Authors,

I am using Pinocchio's RNEA inverse dynamics computation in a real-time control loop at 1000 Hz, which means 1ms control window. However, I measured the RNEA computation time itself is 0.5ms. Is there anyway to make it compute faster?

Best Regards,

Giovanni Sutanto

All 6 comments

Normal execution times are in the order of a few microseconds.
Are you sure you are compiling your project with the correct compilation flags? -O3 should give best performances

Oh yeah, you're right. Once I use Release mode and -O3 flag, the computation time goes down to 3 microseconds. Thanks a lot @gabrielebndn !

@gsutanto Just for information, what is the model of your robot? model.nq? model.nv?

Hi @jcarpent , model.nq=7, model.nv=7

You may have a look at the paper https://hal-laas.archives-ouvertes.fr/hal-01866228 which describes Pinocchio. And you will see some benchmarks on several robots.
You can expect to go below 1us for the RNEA. Can you run:

make bench
./benchmarks/timings

It will show the bench for a standard humanoid robot, but you can also do

./benchmarks/timings my_urdf_model.urdf

for your specific robot.

Thanks in advance for your reply.

Dear @jcarpent ,

I see. Thanks for the references. For now, this is fine for our need. If we need optimize further, we will refer to (and potentially re-open) this thread.

Thanks!

Best Regards,

Giovanni

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ahoarau picture ahoarau  路  12Comments

cmastalli picture cmastalli  路  7Comments

ddliu365 picture ddliu365  路  8Comments

alejandroastudillo picture alejandroastudillo  路  10Comments

GiulioRomualdi picture GiulioRomualdi  路  10Comments