Applying apply_joint_effort and apply_body_wrench
Hi again.
I'm simulating in Gazebo the R2D2 robot from this tutorial (although there is no link in this page, I dowloaded all the urdf tutorials stacks and there is a model called 07-physics.urdf with the correct physics of the robot).
I'm trying to apply some forces to the joints to interact with the robot using /apply_joint_effort and /apply_body_wrench.
First, I spawn the robot:
rosrun gazebo spawn_model -urdf -file 07-physics.urdf -model r2d2 -z 0.5
Next, I make a shell script that executes the next orders:
rosservice call /gazebo/apply_joint_effort '{joint_name: "left_back_wheel_joint", effort: -0.2, start_time: 0, duration: -1 }'
rosservice call /gazebo/apply_joint_effort '{joint_name: "left_front_wheel_joint", effort: -0.2, start_time: 0, duration: -1 }'
I obtained the following possible answers:
- The robot turns a little to the right before hitting the ground and go straight. (Most common).
- The robot is rotating to the right while moving in a "straight" direction.
- The robot dumps (also quite common xD).
I tried to change the start time (setting to 5, 10...) and the duration (setting to 50000, 500, 50...), but the response is always the same. I think that the correct answer would be that the robot will rotate on itself pivoting on the imaginary axis of the right wheels.
What I doing bad? Thanks!