Skip to content

ROS package that launches a node to control a DC motor connected to the BeagleBone

License

Notifications You must be signed in to change notification settings

vmayoral/bb_dc_motors

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

bb_dc_motors

ROS package that launches a node to control a DC motor connected to the BeagleBone.

Examples are provided both in python and C++:

  • The python file dc-motors.py launches a ROS node that reads from the topic imu_euler and controls the velocity of the motors with the x value of the imu_euler readings. The python code uses the Adafruit's BeagleBone IO Python Library.

  • pwm.h and pwm.cpp provide a C++ class that wraps the PWM sysfs interface of the Beaglebone (kernel 3.8). Using this code might probably lead to support in other systems. A script has been created to configure the sysfs. This example illustrates how to use the cPWM C++ class coded.


####HOW-TO Install the Adafruit's BB IO Python Library in the BeagleBone (using Angstrom) There's a conflict with python-nose that conflicts with the Easiest method of installation so if you want to get it in the BeagleBone and you are using Angstrom use the following instructions (the Manual method provided):

git clone git://github.com/adafruit/adafruit-beaglebone-io-python.git
#set the date and time
/usr/bin/ntpdate -b -s -u pool.ntp.org
#install dependency
opkg update && opkg install python-distutils
cd adafruit-beaglebone-io-python
python setup.py install

####dc_motors ROS node that reads the IMU values and modulates the motor speed using PWM according to the x-axis values of the IMU. It uses Beaglebone's EHRPWM pins P9_42 and P9_28.

#####Subscribed topics imu_euler (std_msgs:String)

About

ROS package that launches a node to control a DC motor connected to the BeagleBone

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages