0
$\begingroup$

Rosanswers logo

Hi,

I tried to spawn multiple controllers in Gazebo.Related launch file and config files are attached here. I am able to see the topic names ,but when i publish the values through command line,respective joints are not moving in Simulation.

Launch file:

 <rosparam file="$(find marvin_description)/config/marvin.yaml" command="load"/>
  <rosparam file="$(find marvin_description)/config/jaco.yaml" command="load"/>
  <node name="controller_spawner" pkg="controller_manager" type="spawner" respawn="false"
    output="screen" ns="/marvin"  args="linear_actuator_controller joint_state_controller ptu_pan_controller ptu_tilt_controller jaco2_controller jaco2_gripper_controller"/>

Config .yaml file:

 marvin:
      # Publish all joint states -----------------------------------
       joint_state_controller:
        type: joint_state_controller/JointStateController
        publish_rate: 50  
      
      # Position Controllers  ---------------------------------------
      linear_actuator_controller:
            type: position_controllers/JointPositionController
            joint: marvin_linear_actuator_joint
            pid: {p: 100.0, i: 0.01, d: 1.0}
      ptu_pan_controller:
        type: position_controllers/JointPositionController
        joint: ptu_pan
        pid: {p: 100.0, i: 0.01, d: 10.0}
      ptu_tilt_controller:
        type: position_controllers/JointPositionController
        joint: ptu_tilt
        pid: {p: 100.0, i: 0.01, d: 10.0}

jaco.yaml

marvin:
  jaco2_controller:
    type: effort_controllers/JointTrajectoryController

    joints:
        - jaco2_joint_1
        - jaco2_joint_2
        - jaco2_joint_3
        - jaco2_joint_4
        - jaco2_joint_5
        - jaco2_joint_6

    gains:
        jaco2_joint_1: {p:  500.0, d: 50.0}
        jaco2_joint_2: {p:  800.0, d: 50.0}
        jaco2_joint_3: {p:  350.0, d: 30.0}
        jaco2_joint_4: {p:  300.0, d:  3.0}
        jaco2_joint_5: {p:  500.0, d:  3.0}
        jaco2_joint_6: {p:  200.0, d: 30.0}

    constraints:
        goal_time: 5.0
        jaco2_joint_1:
            goal: 0.05
            trajectory: 0.10
        jaco2_joint_2:
            goal: 0.05
            trajectory: 0.10
        jaco2_joint_3:
            goal: 0.05
            trajectory: 0.10
        jaco2_joint_4:
            goal: 0.05
            trajectory: 0.10
        jaco2_joint_5:
            goal: 0.05
            trajectory: 0.10
        jaco2_joint_6:
            goal: 0.05
            trajectory: 0.10

  jaco2_gripper_controller:
    type: effort_controllers/JointTrajectoryController

    joints:
        - jaco2_joint_finger_1
        - jaco2_joint_finger_2
          
    gains:
        jaco2_joint_finger_1: {p: 100.0, d: 1.0}
        jaco2_joint_finger_2: {p: 100.0, d: 1.0}

Originally posted by ARB on ROS Answers with karma: 51 on 2018-01-20

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

libgazebo_ros_control plugin was in the urdf at two places..controllers started working after removing one


Originally posted by ARB with karma: 51 on 2018-03-26

This answer was ACCEPTED on the original site

Post score: 0

$\endgroup$

Your Answer

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