Skip to content

Arduino code to run GM6020. The command values are sent via rosserial

License

Notifications You must be signed in to change notification settings

Qualot/GM6020_arduino_driver

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GM6020_arduino_driver

Arduino code to run DJI GM6020 Brushless motor https://www.robomaster.com/en-US/products/components/general/gm6020/info

The command values are sent via rosserial

Library setup

$cd GM6020_arduino_driver/lib/
$rosrun rosserial_arduino make_libraries.py .

Reference: http://wiki.ros.org/rosserial_arduino/Tutorials/Arduino%20IDE%20Setup

How to use

Terminal 1

$ roscore

Terminal 2

$ rosrun rosserial_python serial_node.py _port:=/dev/gm6020 _baud:=115200

Terminal 3

# data: [controlmode, amplitude, frequency, cycles]
$ rostopic pub /gm6020_control std_msgs/Float32MultiArray "data: [4, 0.42, 4.0, 10.0]" --once

Acknowledgement

The code's CAN configuration is based on https://qiita.com/kjkmr/items/717e8cd2aa2987cdcee0

About

Arduino code to run GM6020. The command values are sent via rosserial

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published