-
Notifications
You must be signed in to change notification settings - Fork 106
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
make vesc_driver work with latest VESC firmware 3.38 #13
base: master
Are you sure you want to change the base?
Conversation
(copy datatypes.h and update vesc_packet.cpp with new layout) also use /dev/ttyACM0 by default, since that is what TX2 uses
Would love to see this work out! Using the TX2 here at F1/10 with the VESC on firmware 2.18 and am often getting the "failed to connect to the VESC" error: https://mit-racecar.github.io/2017/01/01/faq/ |
Thanks - sorry for the delay. On travel but will review when I return this weekend. |
No hurry. This pull request will make it work with VESC firmware 3.38 but it won't work with firmware 2.18 anymore. If needed/wanted, perhaps we can make it work with both firmwares, or create a branch for old/new?
"failed to connect to the VESC" may be due to different assigned USB (/dev/ttyUSB0/1/2 or /dev/ttyACM0/1/2)? Also, you need to add some delay if this connection failure happens at boot time, when the USB may not be fully initialized, when you start your racecar/vesc service. I added 20 seconds sleep to my racecar.service file and it works much better (under /lib/systemd/system or /etc/systemd/system)
|
I think it would be fine to make it work with 3.38 and not 2.18. It is pretty trivial to upgrade to 3.38 using BLDC Tool or VESC tool. Sometimes the VESC works on 2.18 and sometimes I get the "failed to connect to VESC" error. I unplug power and unplug usb, which sometimes solves the problem, most of the time doesn't. I am using the VESC with a USB hub, so perhaps that may be the issue? Using the serial Github library per the f1tenth.org instructions: https://github.com/wjwwood/serial. |
@erwincoumans It seems the FOCBOX ESC is shipping with the 2.18 firmware. While I agree that it is easy to upgrade the firmware, I think it is important to support shipping hardware without additional steps. I think the long-term goal is to support multiple firmware versions. I'll work on incorporating such functionality with other improvements to to driver (such as documentation). But for now, would you consider submitting the pull request to the fw338 branch? |
If you do happen to push to the new branch Erwin, i would like to ask if you could add the byte-locations for the last packets as well? Perhaps it could be a possibility of sorting the file based on byte location as well.
Change into;
|
@erwincoumans Will this work without any changes to the configuration files at hardware/vesc? @mboulet Maytech VESCs ship with firmware 3.30 as of today. UPDATE: I tested the code in the PR with HW 4.12 and FW 3.40. It works fine. |
Hi all, I have HW 4.12 and FW 3.40, but I can't get it to work. I cloned this repo, then I made the changes to datatypes.h and vesc_packet.cpp, but it still does not work for me. It does build successfully, but when I run I get this: |
When you say you cloned 'this repo', which repo do you mean? You just need to clone @erwincoumans 's repository which is https://github.com/erwincoumans/vesc. Then you don't need to make any changes to any of the files. I am also using HW 4.12 and FW 3.40. It works well for me. |
@MrDadaGuy ROS test video: https://github.com/raess1/Vesc-ROS-FW-3.33 BTW: We based the modification on FW3.33, since we could not get the encoder (AS5048A) via SPI & HW pins to work on newer versions. :( Cheers |
Hi @MrDadaGuy , I had the issue before and it was because the battery was not charged properly (you can get a better analysis with the help of the BLDC tool --> Realtime Data --> Activate sampling). Good luck! |
@MarcusFutterlieb I've been having the same issues with this PR (FW3.40) but I don't think its battery related. I've got a 48V powersupply running on mains, and even using the VESC tool has these issues which cause dropouts. There isn't any voltage sag on the supply, and I don't really get any visible errors other than the link drop. For me, I'm able to run for anywhere between a few seconds/minutes and then eventually this happens and the connection is lost -> shutdown. |
Hi, all I have the issue like this : rocess[vesc/vesc_driver-15]: started with pid [2823] I get it run in tx2 with hardware is 4.12 and firmware is 3.40 |
PLEASE HELP!!! I am facing the same issue of Out-of-sync error. I'm working on designing a fleet of F1/10 cars for my project. The first two cars were designed using the FOCBox and VESC 6 MKII. These cars are running perfectly fine. The 3rd, 4th and 5th car are designed using the VESC 6+. These 3 cars have given me trouble with the Out-of-sync error. I tried numerous alternatives to get rid of the error but none of them worked. The company changing the version of the VESCs pretty fast has also been a matter of concern but using VESC 6+ for the remaining cars is the only option I have with me now. P.S
Any help would be appreciated. Thank you. |
Fellows, hello from San Diego, CA. I hope this is the right place to post this. Is there work to make vesc_driver for the latest firmware? Firmware V4.x (4.2)? The VESC Tools along with the latest firmware has some really nice feature to detect the motor parameters. I imagine it is going just to make better. Thank you, |
Have you solved your issues? |
Unfortunately Nopes my friend. Let me know if you get any leads. Thanks in advance. |
I wasn't able to get my VESC 4.12 working with the latest firmware, so I had to reflash my VESC to firmware version 3.01. Not sure why but I stopped trying to figure it out. I was using the FLIPSKY VESC found on Amazon for reference. |
Not sure this is the right place to discuss this. I have been playing with it since yesterday afternoon. I like the new VESC Tool to detect the motor parameters. It seems when an older firmware (V3.x) is loaded in the VESC HW V4.12, an one is is using the latest VESC Tool, the cool FOC motor detection wont work. The latest version of i.e., VESC Tool 2.05, has firmware 5.1 on it. But, I can't find firmware 5.1 VESC_servoout.bin. Yes, I selected Show non-default firmware. Go figure ... I had a copy of VESC Tool 2.03 that has firmware 4.2 with VESC_servoout. One can get a VESC HW V4.12 out of Banggoo these days for less than US$60. That makes it nice for a classroom environment where one needs to buy dozens of these. I wish we could have a release of the vesc_driver (ROS) for each major release of the VESC firmware. It would help. I know we are all busy. Not sure anyone is listening... Thanks, |
I asked for help on jetsonhacks.com as well but no reply as such. The link is below https://www.jetsonhacks.com/2017/06/01/get-your-motor-running-vesc-jetson-racecar-build/ |
For all, sorry to hijack this thread. Gitbhub went away with the personal messages. @sourajitdas e-mail sent. I wonder if you work with Professor Rahul Mangharam at UPenn. Jim from JetsonHacks is a super cool guy. I am sure there is something in the way for him not replying. Maybe he missed the post. |
Did I say it was my last post above? How about one more? VESC HW4.12. I uploaded firmware V4.2 VESC_servoout.bin to the VESC HW 4.12 Need to use this repository to build the vesc_driver into the ROS cd ~/projects/f110/f110_ws/src/f110_system No errors during the catkin_make ... A quick test with your robot framework with the joystick should do it source devel/setup.bash Another terminal tab I had to adjust the axis of my joystick I changed the axis to map the jstest I ran |
I am having the same issue. Would love to know if you ever found a solution. |
(copy datatypes.h and update vesc_packet.cpp with new layout)
also use /dev/ttyACM0 by default, since that is what TX2 uses
This fixes Issue #11