Difference between revisions of "Motor Controller Rewrite"

From wikidb
Jump to: navigation, search
(Test Execution)
(Test Execution)
Line 1: Line 1:
 +
= Build =
 +
 +
Additions to <tt>~/catkin_ws_indigo/src/phidgets_cat/CMakeList.txt</tt>
 +
 +
  # motor_control_hc_nav
 +
  add_executable(motor_control_hc_nav src/motor_control_hc_nav.cpp)
 +
  target_link_libraries(motor_control_hc_nav
 +
    ${catkin_LIBRARIES}
 +
    phidget21
 +
  )
 +
 
= Test Execution =
 
= Test Execution =
  

Revision as of 10:46, 20 September 2017

Build

Additions to ~/catkin_ws_indigo/src/phidgets_cat/CMakeList.txt

 # motor_control_hc_nav
 add_executable(motor_control_hc_nav src/motor_control_hc_nav.cpp)
 target_link_libraries(motor_control_hc_nav 
   ${catkin_LIBRARIES}
   phidget21
 )

Test Execution

Terminal 2

The motor_control_nav launch script executes the code associated with the motor_control_hc_nav.cpp code in the phidgets_cat package.

 roslaunch floor_hugger motor_control_nav.launch

Terminal 3

 roslaunch floor_hugger odometry.launch

Terminal 4

Take the place of the navigation stack by publishing a cmd_vel message of type Twist. It has linear.x value of 0.20 m/sec and an angular.z value of 0.1 radians/sec.

 roscd floor_hugger/test/
 python motors_go_full.py 0.20 0.1
 motors_go_full.py <linear.x> <angular.z>

Terminal 5

Monitor resulting motor status with one of the following

 rostopic echo odom
 rqt_plot /cmd_vel/linear/x /odom/twist/twist/linear/x /odom/twist/twist/linear/y