0
$\begingroup$

Gazebo Answers logo

Hey,

I am quite new working with ROS and gazebo. I am trying to get the Franka Emika Panda working in gazebo. I am using the offical franka_ros repository: https://github.com/frankaemika/franka_ros. I modified the urdf files where I got inspired from the repository of erdalpekel: https://github.com/erdalpekel/panda_simulation.

I am facing the following problem: I start an empty world in gazebo in paused mode and spawn the robot. I don't have any controllers added for this. Now I manually change the gravity value in the gazebo gui to 0.0. Then I start the simulation. What happens is that my robot starts moving around like crazy. I guess it should be completely stable when gravity isn't applied.

I am using revolute and prismatic joints and integrated the gazebo_ros_control plugin. I already made the following investigation:

When the safety_controller-tag is commented out and the values for limit effort and velocity are higher than the orginal (from franka_ros repository), the robot is almost stable. The finger joints are moving and all the other joints are moving a tiny little bit, but it's almost not noticable. I have no idea why these parameters are affecting the movement of the robot when gravity is turned off.

I am battling this issue for quite a while now and don't have any ideas anymore. Maybe I am missing an important detail. So any kind of advice is much appreciated.

Thilo

P.S. I am using Ubuntu 18.04 in VirtualBox, Ros Melodic and Gazebo 9.16.0


Originally posted by th123 on Gazebo Answers with karma: 11 on 2021-01-23

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Gazebo Answers logo

I finally found a solution for my problem!

So, I defined the joint limits in my urdf file. By default Gazebo spawns the robot with inital joint positions of zero. But for one of the joints the lower limit is -3.0718 and the upper limit is -0.0698, so the initial joint position of zero isn't in that range. And that's the reason why the robot starts moving around even if gravity is turned off.

My solution was to add the following command to the spawn node in the launch file: -J [joint_name] [inital_joint_position_value] with a value that is within the range of the joint limits. Also the exact value of one of the limits didn't work, it has to be within the range of the limits! When the simulation starts, this joint "jumps" to the definied initial position and the robot remains stable. I don't know if that is the best solution for my problem, but it works for me right now.

<node name="spawn_urdf" pkg="gazebo_ros" type="spawn_model" respawn="false" output="screen" args="-param robot_description -urdf -model panda -J joint_4 -0.9" />

Originally posted by th123 with karma: 11 on 2021-02-02

This answer was ACCEPTED on the original site

Post score: 0


Original comments

Comment by rickstaa on 2021-12-10:
For future reference. A more stable simulation can be found in v0.8.0 of the franka_ros package. This version at the time of writing still contains a small drift, but @frankaemika is working on a solution, see https://github.com/frankaemika/franka_ros/issues/160.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.