1.4. Dependencies
This software is built on the Robotic Operating System (ROS - Indigo) and on the Arduino IDE, which needs to be installed first. For further information how to install ROS see http://wiki.ros.org/indigo/Installation and for how to run the Arduino IDE directly in ROS see section 3.Installing the Software on http://wiki.ros.org/rosserial_arduino/Tutorials/Arduino%20IDE%20Setup
In order to install the motor controller, clone the latest version from the repository into your catkin workspace, compile the packages and upload to the Arduino Uno using ROS.
2.1.Download the Source Code
Move to the src-folder in your catkin-workspace:
$ cd ~/catkin_ws/src/
Clone the repository:
$ git clone https://github.com/AR2A/motor-controller-highpower-motorshield
2.2. Build the Packages
Travis Build Status:
Move to your catkin-workspace:
$ cd ~/catkin_ws/
Compile the packages:
$ catkin_make
If you can’t generate the custom messages, please run the following commands:
$ catkin_make arduino_motor_control_generate_messages
$ source devel/setup.bash
$ cd src/motor-controller-highpower-motorshield/arduino_motor_control/firmware/
$ rm -r ros_lib/
$ rosrun rosserial_arduino make_libraries.py .
$ cd ~/catkin_ws
$ catkin_make
2.3 Upload to the Arduino Uno
Now connect an Arduino Uno, confirm that it comes up as /dev/ttyACM1 (or change the firmware’s CMakeLists.txt accordingly), and program it:
$ catkin_make arduino_motor_control-upload
Move to your catkin-workspace:
$ cd ~/catkin_ws/
To add the workspace to your ROS environment you need to source the generated setup file:
$ source devel/setup.bash
You can launch the motor controller node with:
$ roslaunch motor_startup motor_startup.launch
4.1. Node: arduino_motor_control
This Node runs directly on the Arduino Uno, monitors the current power consumption, controls the motor and includes a heartbeat-service that calls a user-specific task if the arduino is disconnected from ROS.
4.1.1. Subscribed Topics
4.1.2. Published Topics
4.1.3. Services
4.2. Node: motor_control_heartbeat_client
This is the Heartbeat-Client and runs on the main ROS-System.
4.2.1 Needed Services
4.3. Node: motor_startup
Contains the launch file.
Please report bugs and request features using the Issue Tracker.