Ask Your Question
0

Controllers not working in Simulation

asked 2018-01-20 11:42:52 -0600

ARB gravatar image

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}
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2018-03-26 18:11:28 -0600

ARB gravatar image

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

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

2 followers

Stats

Asked: 2018-01-20 11:42:52 -0600

Seen: 248 times

Last updated: Mar 26 '18