Skip to content

MuShibo/mit_actuator_bridge

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SDK and Example for MIT motor control.

USB2CAN Hardware:Canable

-canable (cantact clone): http://canable.io/ (STM32F042C6)

-canable modified:https://github.com/makerbase-mks/CANable-MKS --selected

Dependency:

sudo apt-get install net-tools
sudo apt-get install can-utils
sudo apt-get install ros-noetic-can-msgs
sudo apt-get install ros-noetic-socketcan-bridge

Use of slcan in Linux Ubuntu

  1. Connect the MKS CANable V2.0 module to the ubuntu system, and send commands to query the device:
ls /dev/ttyACMx
  1. Map ttyACM0 to can0, and set the bit rate to 1000K:
sudo slcand -o -c -s8 /dev/ttyACM0 can0

The corresponding setting of the bit rate is : -s8 = 1M

  1. Enable CAN:
sudo ifconfig can0 up
  1. Configure the storage length of the transmission data buffer of txqueuelen:
sudo ifconfig can0 txqueuelen 1000
  1. can0 send data: Enable the motor. For example:ID:0x001,data:0xFFFFFFFFFFFFFFFC:
cansend can0 001#FFFFFFFFFFFFFFFC

Launch the launch file for the demo

roslaunch motor_control motor_test.launch

About

The ros package of actuator interface with usb2can hardware (simple demo).

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published