Ask Your Question
0

Drive rc car using the commercial ESC

asked 2019-02-14 00:37:34 -0500

Asit gravatar image

ROS : Melodic OS : Ubuntu 18.04 RC Car : ZD Racing 10427s

I am trying to build my first automated rc car. I am currently designing the actuation module that will take the "geometry/twist" msgs and drive the vehicle.

I am trying to reuse the ESC that came with the RC Car, so I am searching for ROS package to do that. I read somewhere that an arduino is needed.

Any suggestion would be helpful...

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
3

answered 2019-02-14 01:49:28 -0500

ahendrix gravatar image

Hobby ESC take the same kind of signal as a hobby servo: a 1-2 millisecond pulse, where the pulse length sets the speed and direction. Pulses shorter than about 1.5mS are one direction; pulses longer than 1.5mS are the other.

You can generate the servo drive signal with an arduino running rosserial: http://wiki.ros.org/rosserial_arduino... (and it's relatively easy to extend that demo to control two servo outputs; one for your ESC and one for steering).

There are probably libraries for the Raspberry Pi that will generate a similar signal.

I've done this kind of conversion before, and there are a few things to watch out for:

  • Depending on your ESC, there may be a small deadband around the 1.5mS, or that 1.5mS may drift a little bit. This can make it difficult to drive slowly, and difficult to properly send a stop command.
  • Some ESCs have forward/reverse/brake modes. If possible, try to put your ESC into forward/reverse mode instead.
  • Most ESCs will have a 5-6V OUTPUT on the servo connector instead of needing a 5V supply voltage. If you measure this voltage and hook it up to the right voltage supply on your arduino, you can use it to supply power for your arduino or other circuitry.
  • The stock ESC in most hobby RC cars is tuned to go FAST, and getting it to go slowly can be a challenge.

After using the stock ESC in my robot for about a year, I eventually converted it to a brushed 55T rock crawler motor and a Pololu motor controller with direct PWM and direction inputs.

edit flag offensive delete link more

Comments

So if I understand correctly... I can use either an arduino or a motor controller (like Pololu)... But is there a ROS package already available for this....??

Asit gravatar image Asit  ( 2019-02-14 22:37:56 -0500 )edit

How to convert the twist msg to pwm ??

https://answers.ros.org/question/3157...

Asit gravatar image Asit  ( 2019-02-20 00:55:25 -0500 )edit
0

answered 2019-02-14 15:45:20 -0500

ChriMo gravatar image

Hi,

in my projects, I use an Arduino and a simple ros python driver for external ESC driven motors.

https://github.com/mockbot/MockBot/bl...

Additionally, check donkeycar

http://www.donkeycar.com/ , they use I2C connected interfaces to control ESC and motors.

Happy karting

Cheers

Chrimo

edit flag offensive delete link more

Comments

How do you convert twist msg to pwm ?? https://answers.ros.org/question/3157...

Asit gravatar image Asit  ( 2019-02-20 00:55:45 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2019-02-14 00:37:34 -0500

Seen: 355 times

Last updated: Feb 14 '19