Quick API question

I have a quick question about the API setSpatialMotion.
Let’s say I want to set a transformation (Eigen::Isometry3d des_iso) and a spatial velocity (Eigen::Vector6d des_vel) of the root bodynode, and would like to set it using the following API:
dynamic_cast<dart::dynamics::FreeJoint* >(skeleton->getRootJoint())->setSpatialMotion(&des_iso, dart::dynamics::Frame::World(), &des_vel, dart::dynamics::Frame::World(), dart::dynamics::Frame::World(), nullptr, dart::dynamics::Frame::World(), dart::dynamics::Frame::World());

After I call this set function, I double check it if it is set correctly by comparing the value obtained by the following APIs:
std::cout << skeleton->getRootJoint()->getChildBodyNode()->getSpatialVelocity() << std::endl;
std::cout << dynamic_cast<dart::dynamics::FreeJoint* >(skeleton->getRootJoint())->getVelocities() << std::endl;

Why is it not setting with the desired values?

Thanks in advance!

It might help us understand the problem if you can provide the concrete numbers that you find to be incorrect.

But one possible explanation is that getSpatialVelocity() by default gives the spatial velocity in the coordinates of the body-fixed frame, not the coordinates of the world frame. To get it in the coordinates of the world frame, you’d have to pass it the wold frame like this: getSpatialVelocity(dart::dynamics::Frame::World()).