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

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

Comments

^wont work for tuning pid Error of No p gain specified still exist.

Dickson gravatar image Dickson  ( 2019-12-17 00:05:29 -0600 )edit

I have the same error with velocity_controllers saying No p gain specified. Did you manage to solve it?

jaiswalharsh gravatar image jaiswalharsh  ( 2020-07-29 16:42:49 -0600 )edit

Question Tools

2 followers

Stats

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

Seen: 1,522 times

Last updated: Oct 20 '17