[ros-users] Is gazebo/apply_joint_effort cumulative?

John Hsu johnhsu at willowgarage.com
Sat Jan 29 01:44:22 UTC 2011


Hi Jim,

I've answered inline

On Thu, Jan 27, 2011 at 10:37 AM, Jim Rothrock <
jim.rothrock at wunderkammerlab.com> wrote:

> 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?
>

yes, the forces applied are cumulative.  I've updated the wiki to reflect
so.

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.
>

which release are you running?  I see the clear_joint_forces service calls
in both cturtle<https://code.ros.org/svn/ros-pkg/stacks/simulator_gazebo/tags/cturtle/gazebo/src/gazeboros.cpp>and
unstable<https://code.ros.org/svn/ros-pkg/stacks/simulator_gazebo/tags/unstable/gazebo/src/gazeboros.cpp>(diamondback
alpha) files.

Thanks,
John


>
> --
> Jim Rothrock | Wunderkammer Laboratory
> jim.rothrock at wunderkammerlab.com
>
> _______________________________________________
> ros-users mailing list
> ros-users at code.ros.org
> https://code.ros.org/mailman/listinfo/ros-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ros.org/pipermail/ros-users/attachments/20110128/81b4ba85/attachment-0003.html>


More information about the ros-users mailing list