Use Teensy3.2+TB6612 driver board to control dc motor with encoder on ROS

Status
Not open for further replies.

CrzWade

New member
The title described what I want to do. My system is Ubuntu 16.04.
I can use the Arduino Mega to control dc motor with encoder on ROS. But when I want to transfer to use Teensy3.2 to realize same function, something wrong and I can't debug it.
I want to launch the communication between the PC and Teensy3.2. So I ran this command:rosrun rosserial_python serial_node.py _port:=/dev/ttyACM2
After that , error occurs as following:

[ERROR] [1544323854.904434]: Unable to sync with device; possible link problem or link software version mismatch such as hydro rosserial_python with groovy Arduino

I use Arduino IDE with Teensyduino plugged in. I think the problem is due to my configuration of code. The following is the start part of my code.
Does somebody know how to figure out this problem or somebody know how to set up the code in detail?

#define USE_TEENSY_HW_SERIAL
#include <ros.h>
#include <avr/io.h>
//#include <avr/interrupt.h>
#include <std_msgs/Int32.h>
#include <motor_controller_msgs/Feedback.h>
#include <motor_controller_msgs/PIDgains.h>
#include <motor_controller_msgs/Calibrate.h>
#include <TB6612PID.h>
 
Dear community,
I have gotten stuck in this problem for a week.
Maybe I should transfer it to another new question:
How to set up the code on Arduino IDE for Teensy3.2 board in order to connect to ROS?
I searched the ROS wiki, it only has the configuration for Arduino Mega board. And I also searched the error on google, but I still can't figure it out.
Does anyone have some experience on this kind of project? This is a very basic level question.

Thanks!
 
Status
Not open for further replies.
Back
Top