Configuring Ardupilot for UAVCAN

Hello,thank u for your sharing.I am a new man for UAVCAN ,and I have some problem about how does the Ardupilot node broadcast its message in the APM program. now I can open the CAN port and make my PC receive some 1HZ data through a CAN-USB equipment from my pixhawk.what should I do to continue my study.THANK U!

How about making a CANbus SLCAN to see messages on the bus? or an adapter for I2C M8N GPS to work UAVCAN?

https://www.rcgroups.com/forums/showpost.php?p=38060727&postcount=12

I have used my own can adapter to see the message on the can bus ,and there’s some data .But What I want to know is the method to make my Pixhawk send a message which is defined by me.

—Original—

Work through what @kd0aij is doing here: https://github.com/ArduPilot/ardupilot/pull/7208
and here: https://github.com/ArduPilot/ardupilot/pull/7167

Also the UAVCAN specifications and examples are on www.uavcan.org. Especially Libcanard,
http://uavcan.org/Implementations/Libcanard/

The bug was fixed. Parameter list in wiki is OK now.

Thanks very much for putting this together Mike! And to all the devs working on CAN! I am sure this will save MANY people a lot of work. Including me in the future.

I’ll put this on the test list for the dev frame for 2018.

I am enthusiastic Coby because I think it offers so much to Ardupilot users.

  1. Simpler, cleaner more reliable wiring with the same standardized connectors for all components.
  2. Possible for a totally redundant wiring scheme.
  3. An integrated troubleshooting tool that can “see” whats going on, even with a fully assembled aircraft without taking it apart.

Agree on all points. Will be really nice when we have CAN everywhere (or as much as makes sense).

Sorry, lazy question, but will we be able to run one bus for sensors and one for actuators (servos, ESC’s)?

There really is no need to use the two buses that way. Remember CANbus devices are smart devices. So the bus is equal opportunity. The second bus is designed for redundancy. Which means you can have two devices with one being the backup for the primary.

OK. Look forward to seeing how this all goes. Have some friends who design/build a commercial product that separates the buses between actuators and sensors. My understanding is it was for possible noise on the actuator bus but I have no idea if that’s really required.

The bus carries CANbus messages not analog data. So it should not matter what is on the bus. The surges caused by strong currents in the actuators should be entirely isolated from the CANbus.

1 Like

It is possible to separate traffic between buses.
Current implementation supports both separation and redundancy.
There is sense in both approaches depending on the application.

1 Like

Just to elaborate for any future readers as EShamarv states you can separate traffic. CANBus is a message based system and it is not optimized for large amounts of continuous data. So although you are not concerned about inducing analog noise onto a bus due to large current swings in an actuator, the friends may want to separate the traffic so control messages are on one bus and actuator activity on another.

Hello friends
I have just read this very interesting discussion. The potential of the uavcan protocol is truly incredible! Unfortunately I have already assembled my hexacopter on which I wanted to add peripherals but I have exhausted all the available ports. In your opinion, is it possible to enable uavcan and connect additional peripherals to it by coexisting with traditional ones? i have a pixhawk4 with Arducopter 3.6.11.
Thank you friends
@mike

Yes you can use UAVCAN for say rangefinder and I2C for compass just fine if you like.

Thank’s for your reply @mike
currently I have configured the gimbal (Storm32) and the led module (mavlink module) on serial 2 (Telem 2). Could I move them to CAN1 and free serial 2 (Telem 2) for a secondary GPS?
Thank you

Yes you can do that but it is not as simple as plugging the devices into CAN1. There is a considerable number of parameters that need to be set in the flight controller to activate CAN. There is lots of information here on Ardupilot.org:
https://discuss.ardupilot.org/c/hardware-discussion/uavcan-devices/146
There are two different implementations of UAVCAN for Ardupilot. One by Tridge he calls AP_Periph and the other by OlliW called UC4H (the designer of the STorM32 gimbal controller) his info is here:
http://www.olliw.eu/2017/uavcan-for-hobbyists/

The STorM32 gimbal controller is best connected using Betacopter in native serial tunneling mode.

1 Like

Thank’s @mike
This is a very interesting new possibility :slight_smile:

Hi Sir,
I bought US-D1 Rangefinder. It is having CAN Protocol 2.0 sections A and B. Can we integrate this US-D1 Into our Pixhawk.

Thank you, sir
Mohan