Panda robot oscillates in gazebo after spawning
Hello, I'm following ROS_Control tutorial and adapting all the instructions for panda robot. I have generated the Gazebo compatible of URDF of panda from Moveit setup assistance and i'm editing it as per the ROS_Control_tutorial. Once the robot is spawned in gazebo it oscillates around its joint1 automatically(it moves back and forth and then rests on ground).
I have already tried below things but couldn't solve the issue:- 1. Set p-i-d gains to very low value and manipulated them accordingly 2. i have tried increasing the mass and inertial values in URDF file.
Below is the URDF file which i'm using:-
<?xml version="1.0" ?>
<!-- =================================================================================== -->
<!-- | This document was autogenerated by xacro from /opt/ros/kinetic/share/franka_description/robots/panda_arm_hand.urdf.xacro | -->
<!-- | EDITING THIS FILE BY HAND IS NOT RECOMMENDED | -->
<!-- =================================================================================== -->
<robot name="panda" xmlns:xacro="http://www.ros.org/wiki/xacro">
<!-- Used for fixing robot to Gazebo 'base_link' -->
<link name="world"/>
<joint name="fixed" type="fixed">
<parent link="world"/>
<child link="panda_link0"/>
</joint>
<link name="panda_link0">
<visual>
<geometry>
<mesh filename="package://franka_description/meshes/visual/link0.dae" />
</geometry>
</visual>
<collision>
<geometry>
<mesh filename="package://franka_description/meshes/collision/link0.stl" />
</geometry>
</collision>
<inertial>
<mass value="0.1" />
<inertia ixx="0.03" iyy="0.03" izz="0.03" ixy="0.0" ixz="0.0" iyz="0.0" />
</inertial>
</link>
<link name="panda_link1">
<visual>
<geometry>
<mesh filename="package://franka_description/meshes/visual/link1.dae" />
</geometry>
</visual>
<collision>
<geometry>
<mesh filename="package://franka_description/meshes/collision/link1.stl" />
</geometry>
</collision>
<inertial>
<mass value="0.1" />
<inertia ixx="0.03" iyy="0.03" izz="0.03" ixy="0.0" ixz="0.0" iyz="0.0" />
</inertial>
</link>
<joint name="panda_joint1" type="revolute">
<safety_controller k_position="100.0" k_velocity="40.0" soft_lower_limit="-2.8973" soft_upper_limit="2.8973" />
<origin rpy="0 0 0" xyz="0 0 0.333" />
<parent link="panda_link0" />
<child link="panda_link1" />
<axis xyz="0 0 1" />
<dynamics damping="0"/>
<dynamics friction="0"/>
<limit effort="87" lower="-2.8973" upper="2.8973" velocity="2.1750" />
</joint>
<link name="panda_link2">
<visual>
<geometry>
<mesh filename="package://franka_description/meshes/visual/link2.dae" />
</geometry>
</visual>
<collision>
<geometry>
<mesh filename="package://franka_description/meshes/collision/link2.stl" />
</geometry>
</collision>
<inertial>
<mass value="0.1" />
<inertia ixx="0.03" iyy="0.03" izz="0.03" ixy="0.0" ixz="0.0" iyz="0.0" />
</inertial>
</link>
<joint name="panda_joint2" type="revolute">
<safety_controller k_position="100.0" k_velocity="40.0" soft_lower_limit="-1.7628" soft_upper_limit="1.7628" />
<origin rpy="-1.57079632679 0 0" xyz="0 0 0" />
<parent link="panda_link1" />
<child link="panda_link2" />
<axis xyz="0 0 1" />
<dynamics damping="0"/>
<dynamics friction="0"/>
<limit effort="87" lower="-1.7628" upper="1.7628" velocity="2.1750" />
</joint>
<link name="panda_link3">
<visual>
<geometry>
<mesh filename="package://franka_description/meshes/visual/link3.dae" />
</geometry>
</visual>
<collision>
<geometry>
<mesh filename="package://franka_description/meshes/collision/link3.stl" />
</geometry>
</collision>
<inertial>
<mass value="0.1" />
<inertia ixx="0.03" iyy="0.03" izz="0.03" ixy="0.0" ixz="0.0" iyz="0.0" />
</inertial>
</link>
<joint name="panda_joint3" type="revolute ...
Are you able to control the robot arm using ros_control after it has spawned at all?
I get below error when i try to load my controller using roslaunch panda_contol panda_control.lanuch Could not load controller 'joint_state_controller' because the type was not specified. Did you load the controller configuration on the parameter server (namespace: '/panda/joint_state_controller')?
Okay, that's probably got a lot to do with it. Can you add your launch file and controller YAML to your question, that's probably where the error is.
@PeteBlackerThe3rd: i have added the two files. Can you please check it?
The launch file is loading a file called "config/panda_control.yaml" but in your question you describe the file as "Controller.yaml" If this file isn't called panda_control.yaml then that could be the problem there.