[ros-users] Is gazebo/apply_joint_effort cumulative?

トップ ページ
添付ファイル:
Eメールのメッセージ
+ (text/plain)
このメッセージを削除
このメッセージに返信
著者: User discussions
日付:  
To: ros-users
題目: [ros-users] Is gazebo/apply_joint_effort cumulative?
I am applying a torque to an axle like this:

apply_effort = rospy.ServiceProxy("gazebo/apply_joint_effort",
ApplyJointEffort)
apply_effort("axle", 0.01, rospy.Time(), rospy.Duration(-1))
rospy.sleep(0.05)
apply_effort("axle", 0, rospy.Time(), rospy.Duration(-1))

I expected the axle's angular velocity to accelerate for 0.05 seconds,
then remain constant. In reality, the axle continues to accelerate. It
appears that apply_joint_effort is cumulative, and my code actually
needs to be like this:

apply_effort("axle", 0.01, rospy.Time(), rospy.Duration(-1))
rospy.sleep(0.05)
apply_effort("axle", -0.01, rospy.Time(), rospy.Duration(-1)) # Cancel
previous torque.

Is my understanding correct?

I tried to use gazebo/clear_joint_forces instead of applying a -0.01
effort, but it appears that clear_joint_forces is no longer in ROS, even
though it is in the Gazebo package documentation in the ROS wiki.

--
Jim Rothrock | Wunderkammer Laboratory