Best practices for base_controller node or hardware interface

asked 2019-03-05 16:14:26 -0600

SystemDi gravatar image

updated 2019-05-15 03:10:35 -0600

Tom Moore gravatar image

Hello. I finished my robot in simulation. It's diff drive robot. Now I want make a real robot and I need to write package for communicate with robot hardware. For this I must:

1) Write code for my microcontroller

2) Write base_controller node - middle-were betwen AMCL and microcontrollers code what will can take velocity command from nav stack and send it into microcontroller and publish odom data to nav stack

3) Write launch file for start rosserial, base controller node eth ...

I need simple code example for this.

I look on differential_drive package but many projects like turtlebot3 or linorobot don't use it ..

In linorobot use robot_localization pkg but TurtleBot3 dont use it ..

I must use hardware_interface class or not??

I don't uderstand what is Best practices for it.

Better answer for me its simple code example with launch files, base_controller node and microcontroller script eth. Thanks

edit retag flag offensive close merge delete

Comments

Hi, what kind of hardware do you have or want to use ?

The easiest way is an USB connected Arduino Nano and 2 PWM connected DC motor.

ROS---USB--->Arduino---PWM--->DC-Motor

If you give me more details about your har, I can tell you more details about my diff_drive robots using this simple concept

ChriMo gravatar image ChriMo  ( 2019-03-05 16:24:30 -0600 )edit

Hello. In my case I have two DC motors with quadrature encoders. Microcontroller - Arduino Mega or Teensy 3.0, MPU9250, lidar xv-11 eth. Arduino nano have too little interrupt pins for encoders.

SystemDi gravatar image SystemDi  ( 2019-03-05 23:40:45 -0600 )edit