JetsonHacks

Developing on NVIDIA® Jetson™ for AI on the Edge

Get Your Motor Running – VESC – Jetson RACECAR Build

After finishing the installation of the ROS packages on the Jetson RACECAR, we need to program the VESC, an electronic speed controller, for use in the Jetson RACECAR. Looky here:

Background

As discussed in Part 3 – ESC Motor Controller, the TRAXXAS steering servo and the drive motor Electronic Speed Controller (ESC) are controlled by PWM signals sent from an on board radio receiver.

For the Jetson RACECAR, we replace the stock TRAXXAS ESC with a Vedder Electronic Speed Controller (VESC). The major reason for the change is to gain full control at low speeds. The stock ESC puts the minimum vehicle speed at around 6 mph. Another reason is that the VESC is open source, which allows the curious to explore the motor controller implementation.

Architecturally, the VESC has a STM32 ARM Cortex processor. The STM32 runs ChibiOS, a real-time operating system. The default firmware flashed on the VESC-X is ‘Servo-in’, which allows a remote controller to set the motor speed. For the Jetson RACECAR application, the VESC servo port needs to be programmed as ‘Servo-out’, which allows commands to be sent to the robot steering servo.

Fortunately there is a compiled binary of the version of the VESC firmware that includes the Servo-out setting. We can flash the STM32 directly from the Jetson using a program called ‘bldc-tool’. BLDC is an acronym for BrushLess DC motor.

Note: There are also compiled versions of the bldc-tool for x86 machines, if you prefer that route.

Once the bldc-tool loads the servo-out firmware on to the VESC, we then load a configuration file which matches the VESC configuration to control a TRAXXAS Velineon 3500 motor.

Note: The actual VESC firmware is available in binary form in the bldc-tool firmwares directory. If you are interested in building the VESC firmware from source, you can compile it from the bldc firmware source tree on Github.

Installation

The VESC is wired to the Jetson using a micro USB to USB-A cable. The USB cable normally communicates motor speed and steering angles between the Jetson and the VESC. The TRAXXAS steering servo is wired to the VESC servo header. In this application, a 90 degree, 3 pin female header helps with the wiring.

VESC Wiring
USB input from Jetson on left, steering servo center. Front of robot is to the left.

The JetsonHacks account on Github contains a repository named installBLDC. To build the bldc-tool:

$ git clone https://github.com/jetsonhacks/installBLDC
$ cd installBLDC
$ ./installBLDC.sh

This will build the bldc-tool and download the RACECAR motor configuration files. The RACECAR motor configuration files are downloaded from the Github mit-racecar repository, and are stored in ~/hardware/vesc.

Before starting the bldc-tool, connect the VESC to the vehicle battery. Then:

$ cd ~/bldc-tool
$ ./BLDC_Tool

This will bring up the GUI to interact with the VESC. Before flashing the firmware, hit the ‘Connect’ button to communicate with the VESC. The VESC should be at ttyACM0 (more formally, /dev/ttyACM0). The current firmware revision will display in the lower right hand corner on connection.

Use the ‘Firmware’ tab to flash the firmware binary, the configuration can be loaded from the ‘Load XML’ button. Important Note: You must select the correct version of firmware to match the VESC that you are using, otherwise damage and other bad things can happen. In the video, we flashed the firmware ‘VESC_servout.bin’ for version 4.12 of the hardware.

The configuration file is located in ~/hardware/vesc. The configuration file shown in the video is ‘6.141_bldc_VESC_X_hw_30k_erpm.xml’ which is for the VESC-X. If you are using a regular VESC, you will probably want to use the configuration file ‘/6.141_bldc_old_hw_30k_erpm.xml’.

Note: You should use the updated bldc configurations, the configurations lower the min and max erpm values to avoid damaging the VESC when connected to the TRAXXAS motor.

Tele-operation

Once the firmware and configuration files are in place, the Jetson RACECAR is ready for teleoperation. The game controller used in the video is a Logitech Gamepad F710.

The Logitech F710 connects to the Jetson over a wireless USB dongle. The dongle should be plugged into the USB Hub which is connected to the Jetson. In order to connect to the Jetson, power the F710 on (using the center button labeled ‘Logitech’). You can press the ‘VIBRATION’ button to tell if the F710 is powered on. The ‘VIBRATION’ button should cause the game controller to rumble in your hand.

In order for the Jetson to recognize the F710, the small switch on the back of the game controller must be in the ‘D’ position. If the game controller is in the ‘X’ position, it will not be detected.

Once connected, the game controller should show up as /dev/input/js0

The F710 has two modes, selected by the button labeled ‘MODE’. The correct mode for the Jetson RACECAR is the one which the left joystick controls axis 0 and 1, and the right joystick controls axis 2 and 3. There is an LED next to the MODE button. If the LED is green, then it is in the wrong mode, the light should be off.

You can test a game controller to make sure it is working with the Jetson using the jstest program.

$ sudo jstest /dev/input/js0

Note: jstest is located in the joystick debian package. If it is missing you can install it:

$ sudo apt-get install joystick

Once the game pad works, you can teleoperate the robot. Make sure that the wheels are clear of any obstructions.

$ cd racercar-ws
$ source devel/setup.bash
$ roslaunch racecar teleop.launch

The robot has a deadman switch, the upper button (labeled LB) on the left horn of the game pad. Holding the deadman button, you can control the throttle with the left joystick, and the steering with the right joystick.

Conclusion

At this point, we have a working robot platform. We’ll have a couple of more articles on the Jetson RACECAR. As we go forward, we will build the final prototype hardware platform, which we are calling RACECAR/J.

Facebook
Twitter
LinkedIn
Reddit
Email
Print

137 Responses

    1. Currently we’re working with suppliers for the custom parts such as the deck platforms, wiring, and a version of the VESC that has the proper bullet connectors. We’ve been through a couple of revisions, getting closer. The idea is that you’ll be able to buy the custom, long tent pole items as a kit. This should cut down the amount of time needed to wrangle the long lead time items. There also won’t be a need to do soldering. There are options beyond that, such as a kit of everything needed to build the robot and a fully functioning robot. Once the parts have been specified, we’ll be able to create a BOM. Thanks for reading!

  1. Hello Jim,

    Thanks for all the time and effort you’re putting into these. I’m following along with every article and currently working on my own RACECAR build. I’ve found that the VESC-X can take a while to obtain, so i’m thinking of just buying the original VESC and using that (as you did in your earlier prototype). Will i have any trouble following along with this video installing the software and drivers on the older VESC model?

    Thanks,
    Ryan

    1. Hi Ryan,
      The software is the same, the only difference in the install is that you should select a different VESC configuration file from the MIT RACECAR repository: 6.141_bldc_old_hw_30k_erpm.xml
      I hope you can share your build with us! Thanks for reading!

      1. How did you know you were flashing the proper firmware version? I’ve been looking through the BLDC firmware github, but that’s mostly information about compiling my own firmware from source (as you pointed out). I’d just like to know what VESC models match up with which firmwares provided with the BLDC tool install. Are you sure the firmware you used will work on the original VESC model?

        1. Not quite sure what the question is. If you look in the firmware directory of the BLDC tool:
          https://github.com/vedderb/bldc-tool/tree/master/firmwares
          There are versions that match with each version of the VESC hardware. The VESC-X, for example, is hw 4.12, so I looked in the hw_410_411_412 directory. There is a default version, which works with any of the 4.10 to 4.12 models. There is a version for what looks like a resistor substitution. There’s one for the servo-out. The normal setting for the VESC is Servo in, as the long boarders use wifi/bt controllers to control the motor speed. Servo out is for controlling a servo from the VESC. I don’t know what the 2811 version does, but I’m sure it’s in the forums somewhere. So am I sure? Nope. If I was making a moon shot, then I would research more deeply. But an educated guess after reading the VESC forum leads me to believe that works. When I flashed a VESC, it works. Is it absolutely 100% correct. Dunno.

          1. Just my two cent here. I once built my own Ambilight device. I used RGB addressable LED strip, where you have full control for every pixel in that strip. They came with variety of IC chips. One of them is ws2811. Mine was ws2812b.
            I think Vedder add those .bin because he can connect the nunchuk and the ws2812 LEDs directly without any external microcontroller and with a minimal amount of external components.

  2. I’m currently doing the work for a company i’m interning for, i’ll run it by and if it’s okay with them i would love to share! We’re still early in the build now but as we get closer to a working car (provided i get the proper permissions) i’d be happy to share our progress with you What is the best way to get in touch with you? Via youtube/article comments or the “Contact Us” portion of your website?

  3. Great project. How are the game pad commands routed from TX1 to VESC? Does the bldc-tool have game pad support, or do you have a custom communication over USB for this?

    1. Hi Erwin,
      The Logitech Gamepad F710 has a wireless dongle that plugs into the USB hub. It’s pretty painless. An alternative is to use a Bluetooth controller and pair it to the Bluetooth onboard the Jetson. The Jetson reads the Gamepad controller as input, and the outputs to the VESC over USB throttle and steering commands. Thanks for reading!

  4. Thanks! How is the USB communication done exactly? Using libusb sending the VESC commands directly? Is there a pointer to this part of the code?

  5. Also, is there a pointer to the C source code diff/changes to make VESC firmware servo output instead of input?

      1. Thanks. In a nutshell, you need to recompile bldc firmware using SERVO_OUT_ENABLE 1 in conf_general.h .

        In addition, you need to replace the resistor in R5 to a lower value, say 100 Ohm.

        1. In the cars that I have built, there haven’t been any issues using the servo with the stock resistor value. MIT has not recommended any changes, they’ve built several cars. However, that doesn’t mean changing out the resistor is a bad idea.

  6. Hello,

    I don’t see the ttyACM0 port through BLDC tool for some reason and cannot connect to VESC. It does work on ubuntu 16.04 and Windows on my laptop but not on my TX2 (I work through ssh with X forwarding if that is of any relevance, and I added my user to the dialout group). Maybe you have an idea, or at least could post the output of “lsmod” command run on your TX2 here?

    Alex

    1. The stock NVIDIA Jetson TX2 on version L4T 27.1 does not have ACM support enabled by default. You will need to modify the stock kernel to add that module, or build it into the kernel itself. The next version of L4T is scheduled to be released soon, I do not know whether ACM support was added.
      As I recall, the configuration is:
      USB Modem (CDC ACM) support
      Abstract Control Model (CDC ACM)
      If it’s any consolation, it took me a while to figure out what the screw was going on. Good luck!

      1. Thanks a lot! That explains. I saw your video on updating the kernel but somehow missed what was the reason for updating it. I’ll try to update the kernel.

        1. Hi Alex,
          The kernel rebuild was just for instructions on how to do rebuild onboard the Jetson TX2. I was using the VESC for the first time on the TX2 last week, and discovered the issue. Simple enough to fix, but a little frustrating that something that standard was missing out of the kernel build.

          1. Thanks for your answer. I have successfully built a new kernel with cdc-acm support enable with the script you provided and was able to connect the VESC. However, I encountered another problem — TX2 does not detect the game pad (the same as in your video). I suspect it’s a driver issue again, maybe you have a solution for this one as well? There is very little information about these things out there, and your website is pretty much the only source. Thanks for running it!

          2. Hi Alex,
            You’re welcome. I’m glad you got the VESC to work!
            The Jetson TX2 needs to have the JOYSTICK modules built into the kernel image for the Logitech Gamepad to work.
            I think it’s JOYDEV and CONFIG_INPUT_JOYSTICK
            Make sure to build them as part of the image, you may encounter issues if they are added as modules. If you’re using make xconfig, you can do a Find on JOYSTICK and both should come up, though they will have a more descriptive name. Next, click on the option. The first option is to build it as a module, the second is to build it into the image. Make sure to save it after editing, build the new kernel, then install it. Good luck!

            1. Any Update on this Case? I have the same issue with my jetson tx2. I am not able to connect with the gamepad Logitech F710 controller. The sudo jstest /dev/input/js0 is not successful although i run sudo apt-get install successfully.

  7. Hi,

    I am trying to run a Traxxas Velineon 3500 Motor and VESC-X combo. Could you please confirm that by “updated bldc configurations” you meant the “6.141_bldc_VESC_X_hw_30k_erpm.xml” file? I loaded this config file and the BLDC-Tool failed to detect the motor.

    Below is a quote from above.

    “You should use the updated bldc configurations, the configurations lower the min and max erpm values to avoid damaging the VESC when connected to the TRAXXAS motor.”

    Thanks!

    1. Hi Chuck,
      That is the correct file. What version of L4T are you running? If you are running L4T 28.1 (JetPack 3.1), then you need to build the ACM module so that ttyACM is available.

      1. I am running L4T 28.1 ( JetPack 3.1 ). I had to build the ACM module for the VESC and the CP210X module for the RPLIDAR. Thanks so much for your super fast response Jim!

  8. Hi Kangalow,

    Thanks for all your work!

    I have set everything up and everything works perfectly except for one thing.
    There is no steering control. With jstest I can execute and observe the servo command values from the F170 and when I plug the Servo in the wheels line up straight, but it seems nothing is being communicated from Focbox to the servo itself.

    Any ideas?

    Cheers!

  9. My car currently does not have the IMU and LIDAR. Can I run the tele-operation?

    When I ran “roslaunch racecar teleop.launch”, it complained could not find IMU and LIDAR. When I tried the gamepad, the car did not give any response.

    1. Does the joystick actually connect to the car? Did you run the joystick test mentioned in the article?
      The IMU and LIDAR probably don’t make a difference, though you may have to check the UDEV rules to make sure the VESC is seen.

  10. I went through this before I got my IMU and LIDAR.

    You can simply comment out the LIDAR and IMU in the teleop launch file, it should suffice.

    Also be sure to echo the /joy topic, just to make sure its communicating.

    Have fun!

    1. When I type

      rostopic echo /joy

      I got the following print-out:

      header:
      seq: 13267
      stamp:
      secs: 1525586625
      nsecs: 853562656
      frame_id: ”
      axes: [-0.0, -0.0, -0.0, -0.0, -0.0, -0.0]
      buttons: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]

      When I ran the joystick, I can see “nsecs”, “axes”, and “buttons” changes.
      However, the car did not give any response

    2. I tried running teleop without the IMU and Lidar. I commented out the argumennts in the launch file, but now Im getting: ERROR: cannot launch node of type [vesc_ackermann/ackermann_to_vesc_node]: can’t locate node [ackermann_to_vesc_node] in package [vesc_ackermann]
      Am I commenting the right things in the right places or is there more that I need to do?

  11. whilst everything is (or at least should be running from your perspective), that is once you’ve run teleop.launch, you can open a new terminal and type:
    $ rostopic list

    This will show a list of active topics. I believe it is the /joy topic (it may be somehting else, it’s been a while and I’m not 100%. You can perform some deductive reasoning to figure out which one.

    You then can enter:

    $ rostopic echo /joy

    or replace joy with whatever topic should be communicating the data from the joypad to the ackermann nodes.

    If you see a string of values as you meddle with the joypad, then you know its connected and communicating.
    You can do the same thing for nodes:

    $ rosnode list

    then

    $ rosnode info /X

    X being the node you wish to investigate.

    Have fun!

  12. I just read your prior comment.

    You did it correctly. Now press buttons on the joypad whilst echoing and see if it gives any data variables.

    1. hi N:

      Thanks a lot for your comments.

      I think the joystick is communicting with the Jetson TX2 since I could see “nsecs”, “axes”, and “buttons” changes.
      However, the car still did not response. Do you know what I should check?

      Is there a way we send directly movement signal to VESC? for Example, can we use BLDC tool to force the car to move?

      1. I found actually that I could use Gamepad to control the steering. That means the Gamepad is working fine. But the motor did not have any response. I also measured the output voltage between the three output wires from VESC, the reading is about 3.5v. I am now suspecting that my car’s motor is bad.

        The original VESC has three input wires with blue, yellow, and white color. But FOCBOX output wires are all black. Could you please let me know how you connect the 3 wires?

        1. What is the voltage of the battery you are using? It should be at least 8V.

          Do the wheels turn when you use the game pad controller?

          The wires can be connected from the VESC in any manner. If the motor runs in the opposite direction than desired, switch any two of the wires.

            1. The VESC is programmed for a 8.0V cutoff. If the battery voltage drops below 8.0V then the VESC will not send current to the motor, and the motor will not run.
              A properly charged battery is well over 9V.
              I do not know what you mean by “Do we really need 8V for this car?”
              Here is the manufacturers recommendations: https://traxxas.com/products/models/electric/6804Rslash4x4platinum
              If you want to run outside of those parameters, you will need to modify the vehicle accordingly.

              1. I used another battery which showed about 9v after charge. However, the motor still did not move. I could hear some click sound, but the wheels did not roll. I have put a video on youtube: https://www.youtube.com/watch?v=O0eDD4SOHlM. I could steer the car in the first half of the video. In the second half, I was trying the control the motor.

                  1. Yes.

                    I found the issue. I loaded the wrong config file to VESC. After I loaded the correct one, the car can be controlled by the gamepad.

                    Thank all of you for your help.

                    1. Hi,My vesc has a same question as your vesc.Can u tell me how to deal with this question?What is the correct files ?

  13. Good to know you got it working!

    On a side note, does anyone know of any autonomous algorithms I can run on this?

    I’ve tried tweaking nav2d, navigation_stack and also, most recently, the Formula1Epoch that is found on the nvidia github.
    I’m not having much luck and would really like to see it functioning autonomously.

    The Formula1Epoch seems like the most promising, with almost everything in alignment with the JetsonHacks iteration, but algorithmic output just doesn’t seem to be happening.

    Any input or guidance would be hugely appreciated!

    Cheers!

    1. I am not there yet so I do not know how to answer you questions. However, I have one question which should be easy to answer… (I do not know ROS yet)

      I would like to build a ros node that

      1. Read some numbers from a file
      2. Use the numbers as steering and acceleration, broadcasting them
      3. VESC node received these numbers and drive the car

      Could you please give me some directions that I can start to learn and work on?

  14. Hi
    The hardware of my vesc is 4.12 and the firmware of my vesc is 2.18.Now I follow the tutorial in this article,using “6.141_bldc_VESC_X_hw_30k_erpm.xml” file.But the moto does not run.My car and moto are the same as jetson’s racecar.I don’t know why.Should I detect my moto through bldc_tool in the first?
    Thanks very much!

      1. My voltage of my racecar battery which connect my vesc is 40C 11.1v and 5000mah.And I have another battery which connect nvidia tx2,the voltage of this battery is 12v.
        Should I change the parameter in “6.141_bldc_VESC_X_hw_30k_erpm.xml” file?

        Thanks for your reply :)

          1. My vesc can control my moto sometimes,but it is not very stable.I can ensure the actual voltage of the battery higher than 8V.I use my joystick to control vesc,sometimes my moto can run for a little time, and sometimes the vesc flash red flights 4 times.So I do not know why :(.
            Thanks for your reply!:)

            1. The 4 red lights flashing usually means that the VESC has a hardware error issue. The 4 red lights also flash when the unit first boots up, so it could also be a loose connection. Does the steering work?

              1. Yeah,I can use the vesc to control servo.And I just changed another vesc,it also can not control the moto,but when I use my joystick,the green lights will flash.I think this is a symbol of receiving message,right?
                So Should I change the xml files?

                  1. No,I only switch on the one button to control my moto and another button to control my servo.I use the ligitech joystick to control those things.

                    1. The robot has a deadman switch, the upper button (labeled LB) on the left horn of the game pad. Holding the deadman button, you can control the throttle with the left joystick, and the steering with the right joystick.

                      Also, the game controller must be in the correct mode. Please refer to the article.

          1. And I want to know how to distinguish VESC and VESC-X.The hardware of my vesc is 4.12 and the firmware of my vesc is 2.18.
            Thanks!

  15. Hi,

    I’m building a Racecar and I have to buy a VESC for it. I’m quite confused because there are several manufacturers and different versions of the hardware. Do you have an advice on which VESC to buy, considering that shipping time to Europe is a concern for our project? VESC from Maytech seems widely available, are they appropriate for the racecar? I’ve seen also VESC from Focbox, but with less availability and slightly higher price.

    Thanks for your help!

  16. I have the exact same Logitech F710 Gamepad, but I’m getting different results from this video.

    The video shows the X-AXIS of the right joystick controlling the Steering, but on my system the Y-AXIS of the right joystick controls the steering. It’s a little hard to steer when the up/down motion controls the steering.

    Any thoughts as to where I went wrong?

    Here is how I have things setup
    Mode is set so the green light is off
    The switch on the gamepad is set to D

    Here is the results of JSTEST

    Axis 0 -> Left Joystick X-AXIS
    Axis 1 -> Left Joystick Y-AXIS
    Axis 2 -> Right Joystick X-AXIS
    Axis 3 -> Right Joystick Y-AXIS
    Axis 4 -> GamePad X (binary on/off as expected)
    Axis 5 -> GamePad Y (binary on/off as expected)

  17. Hi all. I try to make the VESC work with the Velineon 3500 motor of the Traxxas Slash. I can’t get it detected by VESC Tool. It spins three times, and then it says “Detection failed”. I first loaded the configuration file 6.141_bldc_old_hw_30k_erpm.xml, and then launched the motor detection in BLDC mode. Amongst all the attempts, it managed to detect the motor once, but then when I tried to control the motor, it was shaking instead of spinning.

    Any idea?

    Thanks.

    1. I also tried with bldc_tool instead of the new Vesc Tool. Same result: bad detection.

      One more info: my VESC is a 4.12 hardware.

    2. I have not seen the Velineon motor work with the bldc tool. I just use it to flash the firmware and set the configuration. After that, it works fine with the Jetson. Thanks for reading!

  18. The BLDC tool detection works better if the motor is not driving the wheels: you can release one screw and rotate the motor so it runs freely, then do the detection and move the motor back and fix the screw.

    1. Interesting. Come to think of it in the videos that I have seen of the bldc tool in action, the motors are generally not connected to a load. That is, the motors are just free spinning.

  19. That is odd, I could run the detection just fine, both in BLDC and FOC mode, with and without sensors. I added an option for the AS5407 magnetic encoder, with magnet glued onto the axis at the back of the motor for better startup and position control to drive at ultra low speed. See this low-speed video: https://www.youtube.com/watch?v=LiCFY123Jw0

    1. Thanks for your reply. Do you remember which parameters you used for sensorless detection? Maybe I need to change something (intensity, duty cycle, rpm, or other)?

  20. After some more attempts, I’ve managed to get the motor detected by the VESC! I had first to upload the XML configuration from MIT project to the motor, upload this configuration to the VESC and then run detection. It doesn’t work every time, but sometimes it does.

    But after that, when I use the arrow keys, the motor shakes instead of spinning. Did I miss something?

    I’ve made two videos: first one is successful detection (still shakes at the end, I don’t know if it is the expected behaviour), second one is an attempt to spin the motor with the arrow keys from VESC Tools.

    https://youtu.be/uQFosANFAZU
    https://youtu.be/QUz_8-39aqw

    Thanks again for your help.

    1. Just to let you know: I’ve finally managed to get my motor running with the VESC. I had to change the hardware. My first VESC was probably faulty.

      The motor runs well in FOC mode. I still have some difficulties making it spin smoothly in BLDC mode.

  21. Hi,

    I would like to thank you all. With the help of JetsonHacks community, we have won the Toulouse Robot Race yesterday (no obstacles category), and got a second place in the obstacles category.

    Our racecar did not have any lidar or telemeter. It relied only on its camera for detecting the track and obstacles. It also used a gyroscope and tachometer from the VESC.

    Here is a short video:

    https://www.youtube.com/watch?v=4TJIzghwa3o

    Thanks again.

  22. Hi, Many thanks for this tutorial, I have almost got everything setup. Can I use ps3 joystick instead of Logitech Gamepad F71? I am using ps3joy ros node, seems vesc is not doing anything although I get signals of the joystick keys. I was wondering maybe I need to remap keys or maybe it is not possible at all?

    1. You’re welcome. I don’t have any experience with the PS3 joystick. You can check with jstest to see if you are getting input:

      $ sudo jstest /dev/input/js0

      There is a ‘dead man’ trigger, which you may need to remap on the PS3 to match the F710. On the F710 it is ‘LB’, which I believe maps to button 4 in jstest.

      1. Thanks for your reply after remapping a deadman button I could get some signal on servo, still struggling with the motor running. would you suggest that F710 is much more smooth and out of the box for running the motor? my goal is to drive the car around a test track while collecting steering and speed data

          1. I checked the voltage on the car battery it is 7.7V, however, I could not run the motor still. I am not sure whether the problem arises because of joystick or ampere that runs via FOCBOX Vesc. any tips to diagnosis this problem is appreciated!

            1. Did you charge the battery? What is the battery voltage after charging? The battery voltage needs to be over 8V. Anything less than that the VESC will not send any current to the motor.

  23. To charge the bettary you need to push the “blue” button on the charger. After that you should be able to hear some sound. If you don it press the blue button, it will not charge.

  24. Hey

    I’ve managed to install the car and get it running on the teleop, but after a while it freaks out and shows the following error :

    terminate called after throwing an instance of ‘serial::IOException’
    what(): IO Exception (5): Input/output error, file /tmp/binarydeb/ros-kinetic-serial-1.2.1/src/impl/unix.cc, line 485.
    [vesc/vesc_driver-13] process has died [pid 28388, exit code -6, cmd /home/nvidia/racecar-ws/devel/lib/vesc_driver/vesc_driver_node __name:=vesc_driver __log:=/root/.ros/log/c58cda54-464d-11e9-aec9-00044ba8419b/vesc-vesc_driver-13.log].

    I had a look at the log file but all it’s saying is it’s clipping the speed command value:

    [ INFO] [1552563547.845644272]: Connected to VESC with firmware version 2.18
    [ INFO] [1552563551.622814527]: speed command value (7049.816865) above maximum limit (6000.000000), clipping.
    [ INFO] [1552563552.323373624]: speed command value (-4172.123539) below minimum limit (-4000.000000), clipping.
    [ INFO] [1552563561.967574130]: servo command value (0.860712) above maximum limit (0.850000), clipping.
    [ INFO] [1552563568.029527979]: speed command value (-6348.315284) below minimum limit (-4000.000000), clipping.

    Any help would be appreciated.

    Thanks

    1. Did you ever solve this. I am having the same issue and I’m not making much progress. The one thought I have is I think i’m missing a motor sensor. I’m using a VESC 6 mkv

  25. Hi Kangalow,

    Thankyou for all the videos and tutorials.I have the telops working for most part. The throttle on the joystick works fine. The car doesn’t respond to steering control commands from the joystick. The joytest tool shows for steering control commands.
    Any help is appreciated. I believe some one else ran into this issue earlier. I am not sure if they resolved the issue.

    THanks

  26. Hi.
    My VESC Firmawre Version 3.53, Hardware: 410. and using DC Motor, VESC Tool is recently version, I think.
    I download the software from https://github.com/vedderb.
    I can change the some option for DC Motor. so, I can control the DC Motor FWD, REV.
    but I cannot servo motor(for handle).
    so, could you help me how to fix it? I would like to change VESC Firmawre Version 2.18.
    please help me.
    thanks.

    1. I do not know how to help you. This article is about 4.12 version hardware, I do not know if Version 2.18 is compatible with 4.10 hardware. You can try flashing the software as described as above to see if it works, but I do not have experience with that.

    2. How did you connect vesc to dc motor (3pin vs 2pin)? And what did you do (in vesc tool) after uploading firmware to get the dc motor running?

  27. Hi.
    when I handle the command by joy.
    I got below massage.
    [ERROR] [1554817562.339195836]: Unkown payload type.
    [ERROR] [1554817562.339296355]: Out-of-sync with VESC, discarding 9 bytes.
    [ERROR] [1554817562.359728914]: Invalid end-of-frame character
    [ERROR] [1554817562.359829120]: Out-of-sync with VESC, unknown data leading valid frame. Discarding 1 bytes.
    Could you help me how to fix it?
    thanks.

          1. From your comment you appear to be having issues. However, you have not listed what the issues might be, which version of L4T you are using, which Jetson you are using, what vesc software you are running on the Jetson and so on. That makes it difficult to diagnose your error.

          2. I had the same problem. for me it was because of a conflict on VESC and IMU. for some reasons, imu data was on wrong /dev/ttyACM . just find imu is connected to which ttyACM* and then change the yaml file to the correct one.

            1. PLEASE HELP!!! I am having the same issue of out-of-sync error.

              I am developing a fleet of F1/10 cars for my project. I developed the first two cars using FOCBox and VESC 6 MKII. They are working completely fine. The third, fourth and fifth car I’m designing use VESC 6+. The last 3 cars have troubled me with the above error. I have tried all possible ways to get rid of the error but none of them seem to work. I have also been troubled because of the different versions of VESC since the company changes the version very fast but I have no option than using VESC 6+.

              P.S.
              1. I flashed the Jetson TX2’s with JetPack 3.3
              2. I use VESC Tool 2.2 and the firmware version is 4.1
              3. I cloned the repositories of the MIT Racecar project.
              Most of the steps were carried out taking help from Jim’s videos and tutorials. I would also be happy to discuss on email at sourajit19-at-gmail.
              Any help would be appreciated. Thank you.

  28. Hello, can I use Titan 550 (inbuilt Brushed DC motor in Traxxas Ford Fiesta) with Vesc for this project? Will there be a configuration file for the motor?

      1. Thanks for the reply. My other issue is that VESC package (ROS package in MIT Racecar GitHub page)gives the odometry data. How would I get the odometry if I’m using a dc motor or stock ESC (with PWM driver)?

        1. There are several ways. You can put magnetic encoders on the wheels. I seem to recall that Traxxas makes a “RPM Monitor” which is a hall effects sensor which is in the drivetrain. All in all, it’s a project that you’ll have to explore. Good luck!

      2. Can I use some other bldc motor (non Traxxas with same shaft size and similar specs) with traxxas car and VESC for this project?

        1. The VESC is very flexible, you should be able to use whatever BLDC motor you chose. However, the articles here are for a very specific configuration, and you will need to configure the VESC to meet your needs. Good luck on your project!

  29. My VESC has hw-4.12, fw-3.40 and I’m using vesc tool. Is it fine if I upload your motor configurations with firmware 3.40. Will it work fine?

  30. Hello Jim, I have a problem with ODOM(rostopic) and I think it is related to VESC firmware changes. the values in odom topic is sth like this and pos: X value keeps changing(starts from zero and keeps increasing gradually 0.1/sec) whithout any controller touch and car is on a stand.
    header:
    seq: 852
    stamp:
    secs: 1583629943
    nsecs: 662398512
    frame_id: “odom”
    child_frame_id: “base_link”
    pose:
    pose:
    position:
    x: 0.166137379267
    y: 0.0
    z: 0.0
    orientation:
    x: 0.0
    y: 0.0
    z: 0.0
    w: 1.0
    covariance: [0.2, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.2, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.4]
    twist:
    twist:
    linear:
    x: 0.0136540962289
    y: 0.0
    z: 0.0
    angular:
    x: 0.0
    y: 0.0
    z: -0.0
    covariance: [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]

    my guess is that it is beacuse of some changes in Vesc 6+ firmware(it is version 4.12)
    maybe some modification should be done.(sth similar to this PR(https://github.com/mit-racecar/vesc/pull/13) Do u have any guess? I need somekind of perfect Odom! I had the same problem with shipped firmware and the one I flashed through this video) Is it possible to check it through VESC tool?

    1. Please send your questions to RACECAR/J for support if you have purchased a product from them. I do not know how you installed the software for the VESC from this note. You are attaching this question to an earlier version of the VESC installation.

Leave a Reply

Your email address will not be published. Required fields are marked *

Disclaimer

Some links here are affiliate links. If you purchase through these links I will receive a small commission at no additional cost to you. As an Amazon Associate, I earn from qualifying purchases.

Books, Ideas & Other Curiosities