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

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

Open
jendrikjoe opened this Issue Dec 27, 2017 · 12 comments

Comments

Projects
None yet
6 participants
@jendrikjoe

jendrikjoe commented Dec 27, 2017

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

This comment has been minimized.

CapitalZe commented May 1, 2018

Thanks!

@hirovi

This comment has been minimized.

hirovi commented May 1, 2018

@jendrikjoe Legend!! Thank you!!

@raess1

This comment has been minimized.

raess1 commented May 6, 2018

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

@jendrikjoe

This comment has been minimized.

jendrikjoe commented May 6, 2018

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

@raess1

This comment has been minimized.

raess1 commented May 6, 2018

@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

This comment has been minimized.

jendrikjoe commented May 6, 2018

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

@raess1

This comment has been minimized.

raess1 commented May 6, 2018

@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

This comment has been minimized.

raess1 commented May 6, 2018

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

@nyxrobotics

This comment has been minimized.

nyxrobotics commented Jun 8, 2018

@raess1 Haven't you changed vesc_packet.h ?

nyxrobotics added a commit to sbgisen/vesc that referenced this issue Jun 13, 2018

Apply to VESC6-FirmWare3.38
[vesc_packet.cpp]
VESC6に合わせてパケットの書式を修正
(mit-racecar#11)
[datatypes.h]
①使っているファームウエアのバージョンに合わせて下記リンクからdatatypes.hを持ってくる
https://github.com/vedderb/bldc/blob/master/datatypes.h
②そのままではコンパイルエラーが出るので。冒頭の「#include "ch.h"」を以下のように修正する
//#include "ch.h"←コメントアウト
typedef uint32_t systime_t; ←追加
@subodh-malgonde

This comment has been minimized.

subodh-malgonde commented Sep 18, 2018

@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

This comment has been minimized.

jendrikjoe commented Oct 23, 2018

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

This comment has been minimized.

subodh-malgonde commented Oct 25, 2018

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment