Skip to content

Commit

Permalink
WIP #3: Test to drive one wheel
Browse files Browse the repository at this point in the history
  • Loading branch information
Jacob Gloudemans committed Jan 17, 2019
1 parent 22aac74 commit 041ff7b
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions motor_control/src/can_bus_interface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,14 @@ int main(int argc, char **argv) {
// Create a Talon object
ctre::phoenix::motorcontrol::can::TalonSRX fl(1);

// Wait for CAN bus set up to complete
ros::Duration setup_time(2);
setup_time.sleep();

// Drive wheel
fl.Set(ctre::phoenix::motorcontrol::ControlMode::PercentOutput, 20);

// Rate to loop at (in Hz)
ros::Rate loop_rate(1);

// Loop
Expand Down

0 comments on commit 041ff7b

Please sign in to comment.