Integrate Motor Controller with Odometry

From wikidb
Jump to: navigation, search

References

Execute

Terminal 1

 roscore

Terminal 2

 roslaunch floor_hugger motor_control.launch

Parameter to disable odometry

 <launch>
   <node pkg="phidgets" type="motor_control_hc" name="motor_control_hc" respawn="true" output="screen">
       <param name="odometry" value="disable" />
   </node>
 </launch>

Terminal 3

 rosrun floor_hugger to_position.py

Terminal 4

 roslaunch floor_hugger odometry.launch

Enabled Motor Controller Odometry

Enable odometry with "odom"

 <launch>
   <node pkg="phidgets" type="motor_control_hc" name="motor_control_hc" respawn="true" output="screen">
       <param name="odometry" value="odom" />
   </node>
 </launch>

Motor controller errors messages of this type:

 [ WARN] [1462401818.924243003]: Linear acceleration limit 167.613028/0.300000 reached
 [ WARN] [1462401819.190862871]: Angular velocity error 370.656911 degrees/sec = -0.149613 - -6.618796

Motor Controller PID Tuning

This is the first pass to get the motors to turn.

 <launch>
   <node 
       pkg="phidgets" 
       type="motor_control_hc" 
       name="motor_control_hc" 
       respawn="true" 
       output="screen">
       <param name="odometry" value="odom" />
       <param name="max_angular_error" value="100000" />
       <param name="max_linear_accel" value="100000" />
       <param name="linear_proportional" value="10" />
       <param name="linear_integral" value="0" />
       <param name="linear_derivative" value="0" />
       <param name="angular_proportional" value="0.5" />
       <param name="angular_integral" value="0" />
       <param name="angular_derivative" value="0" />
       <param name="speed" value="100" />
   </node>
 </launch>

Reference

  • PID Tuning See Manual Tuning and Ziegler–Nichols