PX4-Autopilot icon indicating copy to clipboard operation
PX4-Autopilot copied to clipboard

Addition of CanOpen driver.

Open jmailloux opened this issue 2 years ago • 5 comments
trafficstars

Solved Problem

PX4 currently does not support CanOpen protocol stack. This means PX4 based devices can't communicate with devices on the CAN bus that talk CanOpen.

Fixes #{Github issue ID}

Solution

  • Added a driver for CanOpen leveraging:
  • https://github.com/CANopenNode/CANopenNode
  • https://github.com/CANopenNode/CANopenDemo

Changelog Entry

For release notes:

Feature/Bugfix XYZ
New parameter: XYZ_Z
Documentation: Need to clarify page ... / done, read docs.px4.io/...

Alternatives

Could have a translater on the CAN bus that translates UAVCAN to CanOpen, but that requires hardware changes and can be quite messy.

Test coverage

  • Have this code running on an electric boat that talks to motor controller, BMS, and a variety of sensors over CanOpen.
  • Also, ran tests in can_open_demo
  • Tested on Pixhawk 4 hardware and Pixhawk6C hardware.

Context

canopen test pixhawk4.txt

jmailloux avatar Jun 14 '23 15:06 jmailloux

I don't think we want to include this by default. You can make a new defconfig specifically for CANopen.

AlexKlimaj avatar Jun 14 '23 15:06 AlexKlimaj

I don't think we want to include this by default. You can make a new defconfig specifically for CANopen.

Yes. That makes sense. I can do that. Wasn't sure how best to handle that. Should I just do that for the hardware I've tested? Also, how should I handle the nuttX defconfig changes to enable the CAN drivers? I assume you won't want that by default either.

jmailloux avatar Jun 14 '23 16:06 jmailloux

@jmailloux is this still being worked on to be pushed through?

LetMeSeeThatCode avatar Feb 13 '24 10:02 LetMeSeeThatCode

I'm happy to keep working on this, but I need someone to review it.

jmailloux avatar Feb 13 '24 22:02 jmailloux

@dagar Hi Daniel, would it be possible to get this reviewed? (I saw that it was stale by 8 months awaiting a review).

LetMeSeeThatCode avatar Feb 14 '24 10:02 LetMeSeeThatCode