ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

No p gain specified for pid error when try to spawn same 2 robots

asked 2021-07-27 04:22:09 -0500

pukki_pukki gravatar image

Hi, I'm trying to spawn 2 same robots in one gazebo launch file but I see this errors.

[ERROR] [1627377078.217109504, 9.487000000]: No p gain specified for pid.  Namespace: /panda2/gazebo_ros_control/pid_gains/panda_joint1
[ERROR] [1627377078.217679976, 9.487000000]: No p gain specified for pid.  Namespace: /panda2/gazebo_ros_control/pid_gains/panda_joint2

[ERROR] [1627377079.655710055, 10.303000000]: No p gain specified for pid.  Namespace: /panda1/gazebo_ros_control/pid_gains/panda_joint1
[ERROR] [1627377079.656238688, 10.303000000]: No p gain specified for pid.  Namespace: /panda1/gazebo_ros_control/pid_gains/panda_joint2

Here is my launch file

<launch>
  <group ns="/environment">
    <param name="table_description" textfile="$(find franka_gazebo)/robots/table.urdf" />
    <node name="spawn_table" pkg="gazebo_ros" type="spawn_model" args="-urdf -param table_description -x 0.65 -y 0.5 -model table_1"/>
  </group>
  <group ns="/panda1">
    <param name="/panda1/robot_description" command="$(find xacro)/xacro $(find franka_gazebo)/robots/panda_gripper.urdf.xacro"/>
    <!-- args'da -Y 0.5236 -->
    <node name="panda1" pkg="gazebo_ros" type="spawn_model" args="-param robot_description -urdf -model panda1_gripper"/>

    <rosparam command="load" file="$(find franka_gazebo)/config/joint_states.yaml" ns="panda1"/>
    <rosparam command="load" file="$(find franka_gazebo)/config/joint_commands.yaml" ns="panda1"/>
    <rosparam command="load" file="$(find franka_gazebo)/config/default.yaml"/>

    <node name="panda1_controller_spawner" pkg="controller_manager" type="spawner" args=
        "panda1/joint_state_controller
        panda1/joint1_position_controller
        panda1/joint2_position_controller
        panda1/joint3_position_controller
        panda1/joint4_position_controller
        panda1/joint5_position_controller
        panda1/joint6_position_controller
        panda1/joint7_position_controller
        panda1/joint8_position_controller
        panda1/joint9_position_controller
        panda1/joint10_position_controller
        panda1/gripper1_joint_position_controller
        panda1/gripper2_joint_position_controller"/>

    <node pkg="robot_state_publisher" type="robot_state_publisher" name="panda1_state_pub"/>
  </group>
  <group ns="/panda2">
    <param name="/panda2/robot_description" command="$(find xacro)/xacro $(find franka_gazebo)/robots/panda_gripper.urdf.xacro"/>

    <node name="panda2" pkg="gazebo_ros" type="spawn_model" args="-y 1.0 -param robot_description -urdf -model panda2_gripper"/>

    <rosparam command="load" file="$(find franka_gazebo)/config/joint_states.yaml" ns="panda2"/>
    <rosparam command="load" file="$(find franka_gazebo)/config/joint_commands.yaml" ns="panda2"/>
    <rosparam command="load" file="$(find franka_gazebo)/config/default.yaml"/>

    <node name="panda2_controller_spawner" pkg="controller_manager" type="spawner" args=
        "panda2/joint_state_controller
        panda2/joint1_position_controller
        panda2/joint2_position_controller
        panda2/joint3_position_controller
        panda2/joint4_position_controller
        panda2/joint5_position_controller
        panda2/joint6_position_controller
        panda2/joint7_position_controller
        panda2/joint8_position_controller
        panda2/joint9_position_controller
        panda2/joint10_position_controller
        panda2/gripper1_joint_position_controller
        panda2/gripper2_joint_position_controller"/>

    <node pkg="robot_state_publisher" type="robot_state_publisher" name="panda2_state_pub"/>
  </group>
  <!--<group ns="/environment">
    <param name="wound_description" textfile="$(find franka_gazebo)/robots/wound.urdf" />
    <node name="spawn_wound" pkg="gazebo_ros" type="spawn_model" args="-urdf -param wound_description -x 0.65 -y 0.0 -model wound_1"/>
  </group>-->
  <group ns="/environment">
    <param name="tissue_description" command="$(find xacro)/xacro --inorder $(find franka_gazebo)/robots/tissue.urdf.xacro" />
    <node name="spawn_tissue" pkg="gazebo_ros" type="spawn_model" args="-urdf -param tissue_description -x 0.8 -y -0.084 -model tissue_1" />
  </group>
  <group ns="/environment">
    <param name="holder_description" command="$(find xacro)/xacro --inorder $(find franka_gazebo)/robots/needle_holder.urdf.xacro" />
    <node name="spawn_holder" pkg="gazebo_ros" type="spawn_model" args="-urdf -param holder_description -x 0.8 -y -0.157 -model needle_holder" />
  </group>
  <group ns="/environment">
    <param name="needle_description" command="$(find xacro)/xacro --inorder $(find franka_gazebo)/robots/needle40mm.urdf.xacro" />
    <node name ...
(more)
edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
0

answered 2021-07-27 04:39:36 -0500

Ranjit Kathiriya gravatar image

Create a new YAML file: with this below code Let's say I am calling this YAML file a gazebo_ros_control_params.yaml.

gazebo_ros_control:
  pid_gains:
    joint_a1:
      p: 100.0
      i: 0.01
      d: 10.0
    joint_a2:
      p: 100.0
      i: 0.01
      d: 10.0
    joint_a3:
      p: 100.0
      i: 0.01
      d: 10.0
    joint_a4:
      p: 100.0
      i: 0.01
      d: 10.0
    joint_a5:
      p: 100.0
      i: 0.01
      d: 10.0
    joint_a6:
      p: 100.0
      i: 0.01
      d: 10.0

Add your join name instead of joint_a1 - joint_a6. Just have a look at this link https://github.com/ros-industrial/uni... for more detail.

Try to call this YAML file Just after you call your environment in the launch file.

For example: <rosparam file="$(find ai_robotic_gazebo)/config/gazebo_ros_control_params.yaml" command="load"/>

edit flag offensive delete link more

Comments

I have a file like this named config.yaml and I call this file in launch file with this code :

<rosparam command="load" file="$(find franka_gazebo)/config/default.yaml"/>
pukki_pukki gravatar image pukki_pukki  ( 2021-07-27 04:50:15 -0500 )edit

Did you try to add both robot's joins in this file? I think you have to make both files separate and call in the launch file?

Ranjit Kathiriya gravatar image Ranjit Kathiriya  ( 2021-07-27 04:59:52 -0500 )edit

I make 2 different yaml files for 2 same robots but again ı took this error.

pukki_pukki gravatar image pukki_pukki  ( 2021-07-29 07:46:05 -0500 )edit

Question Tools

Stats

Asked: 2021-07-27 04:22:09 -0500

Seen: 76 times

Last updated: Jul 27 '21