ros-naoqi / nao_robot

BSD 3-Clause "New" or "Revised" License
53 stars 60 forks source link

knowing current stiffness of the robot #8

Closed k-okada closed 9 years ago

k-okada commented 9 years ago

Hi, I found pose_controller subscribes joint_stiffness and that will call ALMotionProxy::setStiffnesses, but it seems we do not have the ROS interface of knowing current stiffness using ALMotionProxy::getStiffnesses. Is there any reason ?

if we'll implement this, which topic name do you recommend, stiffness_states?

http://doc.aldebaran.com/1-14/naoqi/motion/control-stiffness-api.html#ALMotionProxy::getStiffnesses__AL::ALValueCR

jdyb commented 9 years ago

I have considered adding this myself as well. But does it not belong in naoqi_bridge/naoqi_driver? (naoqi_joint_stiffness.py/cpp perhaps?) That way it is available to all robots.

k-okada commented 9 years ago

Yes, that's nice direction, and I found that current naoqi_joint_states.py is not just publish joint_states, but also publish imu or other topics, so I added to publish joint_stiffness too

see https://github.com/ros-naoqi/naoqi_bridge/pull/23

Karsten1987 commented 9 years ago

Just a few comments on that:

If I understood your idea, then it ought to be inside naoqi_bridge. The idea of this package would be to provide robot agnostic features and packages which can be freely configured per robot using rosparams.

Regarding joint_states.py, it publishes joint_states, TF, odom and IMU. I would prefer if we could incorporate the joint_stiffness into the effort component of the joint_states topic since it's a fraction of the motor's maximal current. At the same time we could extract the IMU into a dedicated node to keep it clean.

any ideas on that?

jdyb commented 9 years ago

We have moved to naoqi_bridge, se the linked pr (this could probably be closed). Note that the original pr only conserned the stiffness of the joints, not the applied effort. In this case, stiffness (ALMotionProxy::get/set-Stiffness) is the maximum current allowed for a specific joint. I dont think we want stiffness in the joint_states topic, but rather the torque derived from the electric current value from naoqi.

vrabaud commented 9 years ago

moving to naoqi_bridge as mentioned above