mit-racecar / vesc

71 stars 106 forks source link

(Minor) datatypes.h changed with new VESC hardware #11

Open jendrikjoe opened 6 years ago

jendrikjoe commented 6 years ago

Dear MIT-Team,

first of all thanks for the great repo. I am currently working with it to build a racecar on my own. During that process my servo output was not working. I figured, that with the new firmwares the datatypes.h changed and as well the command byte for the servo command. Just as a heads up for everyone trying to do the same thing I do, replacing the datatypes.h with the new one from https://github.com/vedderb/bldc/blob/master/datatypes.h and commenting out the #include "ch.h" and the CAN command typedef, as done here: https://github.com/RollingGecko/VescUartControl/blob/master/datatypes.h solves the issue :)

Cheers,

Jendrik

CapitalZe commented 6 years ago

Thanks!

hirovi commented 6 years ago

@jendrikjoe Legend!! Thank you!!

raess1 commented 6 years ago

Is this why one get all kind of strange values on the sensor/core topic? I also get error dutycycle out of range

jendrikjoe commented 6 years ago

Happy to be of help! @raess1 It might be the issue. The order of the sensor values changed in the new datatypes.h :)

raess1 commented 6 years ago

@jendrikjoe thanks! I am using this package https://github.com/roaldlemmens/morph_hw Any ideas on how to change this there? It uses the this VESC driver also. It was working fine before the FW update

jendrikjoe commented 6 years ago

@raess1 you probably have to change the interface to the VESC, but I don't know where this happens in the project :)

raess1 commented 6 years ago

@jendrikjoe It didn't solve the problem. After updating the VESC to FW 3.33 the from 2.18 the driver does not work anymore. Looking at the sensor/core topic they are all messed up. So the Bytes in vesc_packet.cpp should be changes. Anyone got ides which bytes belongs to which?

raess1 commented 6 years ago

Edit (my problem solved with) Remapping of bytes in https://github.com/raess1/vesc/blob/master/vesc_driver/src/vesc_packet.cpp

nyxrobotics commented 6 years ago

@raess1 Haven't you changed vesc_packet.h ?

subodh-malgonde commented 6 years ago

@jendrikjoe Thanks for posting this fix! 👍 Did you need to make any changes to the configuration files at hardware/vesc?

I compared the XML files of the default configuration setup by the firmware 3.40 (latest VESC firmware uploaded via the VESC Tool) and the configuration used by mit-racecar. There are some new XML tags. Eg. foc_sat_comp, m_ntc_motor_beta, motor_loss_torque etc

jendrikjoe commented 6 years ago

Hey @subodh-malgonde,

sorry for the long silence. I am currently not up-to-date with this project. (No time to tinker with my racecar :( ) I definitely changed the configuration file. I used the VESC tool to measure the parameters. Have to redo this process at one point though as my old parameters don't work anymore ;) Sorry for not being more helpful,

Jendrik

subodh-malgonde commented 6 years ago

Thanks for getting back! I used only some parameters from the configurations files at hardware/vesc like min/max current etc. I let the VESC Tool detect parameters for the motor (I used the FOC mode). It works well.

MrDadaGuy commented 5 years ago

Dear MIT-Team,

first of all thanks for the great repo. I am currently working with it to build a racecar on my own. During that process my servo output was not working. I figured, that with the new firmwares the datatypes.h changed and as well the command byte for the servo command. Just as a heads up for everyone trying to do the same thing I do, replacing the datatypes.h with the new one from https://github.com/vedderb/bldc/blob/master/datatypes.h and commenting out the #include "ch.h" and the CAN command typedef, as done here: https://github.com/RollingGecko/VescUartControl/blob/master/datatypes.h solves the issue :)

Cheers,

Jendrik

Jendrik, thanks so much for your comment above, this got my project working!

For anyone else that is struggling with this, this is the CAN command typedef you want to comment out:

typedef struct {
    int id;
    systime_t rx_time;
    float rpm;
    float current;
    float duty;
} can_status_msg;
suprnrdy commented 5 years ago

Has anyone tried running on Firmware 3.57 or above?

mbudris commented 5 years ago

Has anyone tried running on Firmware 3.57 or above?

yes, works fine for me

suprnrdy commented 4 years ago

I'm having issues where the servo control isn't working and when putting the vehicle in drive or reverse the wheels jump on and off. When I run the test in vesc-tool it runs smoothly though. I've tried tweaking the configurations but that's not making any difference.

sourajitdas commented 4 years ago

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

  1. I flashed the Jetson using JetPack 3.3
  2. I use VESC Tool 2.2 and firmware 4.1 I cloned the repository of the MIT Racecar project. I followed Jim's tutorials for most of the car setup. I even updated the drivers for the VESC 6 from the MIT Racecar repository.

Any help would be appreciated. Thank you.