Ask Your Question
0

Velocity controll and PID tuneing

asked 2017-10-17 06:20:27 -0600

Westranger gravatar image

updated 2017-10-17 06:26:01 -0600

I'm currently building a simulation model for my robot and so far almost every thing works. I can move all my actuators. I'm currently stuck with the controlling the wheel velocity.

I have a joint

   <joint name="wheel_main_rotation" type="continuous">
      <parent link="wheel_main_suspension" />
      <child link="wheel_main" />
      <origin xyz="0 0 -0.1" rpy="0 0 0" />
      <axis xyz="0 1 0" />
      <limit effort="2000.0" velocity="1.0" />
   </joint>

with a transmission

   <transmission name="tran2">
      <type>transmission_interface/SimpleTransmission</type>
      <joint name="wheel_main_rotation">
         <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface>
      </joint>
      <actuator name="motor2">
         <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface>
         <mechanicalReduction>1</mechanicalReduction>
      </actuator>
   </transmission>

with the following controller config

  # velocity Controllers ---------------------------------------
  joint2_velocity_controller:
    type: effort_controllers/JointVelocityController
    joint: wheel_main_rotation
    pid: {p: 10000.0, i: 1.0, d: 1000.0}

and a rosnode which publishes the value 1.0 on the following topic

pub = rospy.Publisher('/my_robot_ns/joint2_velocity_controller/command', Float64, queue_size=10)

This approach works for all my revoloute and prismatic joints, but not for controlling the velocity of the main wheel. I actually doesn't move at all, no matter which value I publish.

edit:

the maximum velocity of my robot should be 1.0 m/sec

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2017-10-20 06:21:54 -0600

Westranger gravatar image

I found the solution. I needed to change the joint interface

   <transmission name="tran2">
      <type>transmission_interface/SimpleTransmission</type>
      <joint name="wheel_main_rotation">
         <hardwareInterface>hardware_interface/VelocityJointInterface</hardwareInterface>
      </joint>
      <actuator name="motor2">
         <hardwareInterface>hardware_interface/VelocityJointInterface</hardwareInterface>
         <mechanicalReduction>1</mechanicalReduction>
      </actuator>
   </transmission>

and in the config file the controller

  steer_velocity_controller:
    type: velocity_controllers/JointVelocityController
    joint: wheel_main_steer
    pid: {p: 10000.0, i: 1.0, d: 1000.0}
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: 2017-10-17 06:20:27 -0600

Seen: 551 times

Last updated: Oct 20 '17