Skip to content
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

Support for SimpleFOC / I2C commander? #11

Open
samuk opened this issue May 26, 2022 · 6 comments
Open

Support for SimpleFOC / I2C commander? #11

samuk opened this issue May 26, 2022 · 6 comments

Comments

@samuk
Copy link

samuk commented May 26, 2022

Hi I'm interested in running I2C commander which communicates with SimpleFOC driver boards.

Code something like this would need to be added to your firmware. If I figure it out would you accept a pull request? Or is it a bit niche to be included?

There are a number of drivers that support it, from low to high power

@samuk
Copy link
Author

samuk commented May 27, 2022

Also noting this exists: https://github.com/Factor-Robotics/odrive_ros2_control which might be a more mainstream way of supporting BLDC motors

@grassjelly
Copy link
Member

Hey @samuk . Thanks for the proposed PR. PRs are always welcome. You could take a look at how drivers are abstracted here: https://github.com/linorobot/linorobot2_hardware/blob/master/firmware/lib/motor/motor_interface.h and how to make a new macro for your driver https://github.com/linorobot/linorobot2_hardware/blob/master/firmware/lib/motor/motor_interface.h . Looking forward

@samuk
Copy link
Author

samuk commented Aug 14, 2022

Using the code here: https://github.com/samuk/linorobot2_hardware

I'm getting these errors https://pastebin.com/aSwiMDed

@samuk
Copy link
Author

samuk commented Aug 19, 2022

Even when compiling for teensy41 (rather than esp32) I get this error.

To replicate

`cd firmware
cp platformio.ini platformio.ini.old
rm platformio.ini
wget https://raw.githubusercontent.com/rosmo-robot/linorobot2_hardware/galactic/firmware/platformio.ini
cd /lib/motor 
cp default_motor.h default_motor.h.old
rm default_motor.h
wget https://raw.githubusercontent.com/rosmo-robot/linorobot2_hardware/galactic/firmware/lib/motor/default_motor.h
cp motor.h motor.h.old
rm motor.h
wget https://raw.githubusercontent.com/rosmo-robot/linorobot2_hardware/galactic/firmware/lib/motor/motor.h`

@samuk
Copy link
Author

samuk commented Sep 28, 2022

I think this is a conflict between SimpleFOC code and Linorobot2 code. I'm not sure it's resolvable.

@samuk
Copy link
Author

samuk commented Jan 26, 2023

Some suggestions:
just add something like "lino_" in front of all the conflicts.. i.e., rename Encoder to LinoEncoder. The other issues seem to be that the function doesn't exist (analogwritefrequency), which you probably could just comment out because you won't be using it with the FOC anyway.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants