by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Sep 09 2019 03:29

    tridge on master

    protocol: replace unsupported %… (compare)

  • Sep 09 2019 03:29
    tridge closed #17
  • Sep 08 2019 05:36
    bugobliterator opened #17
  • Aug 14 2019 03:51

    tridge on master

    Add override keyword to those m… (compare)

  • Aug 14 2019 03:51
    tridge closed #16
  • Aug 14 2019 01:37
    peterbarker opened #16
  • Aug 14 2019 01:33

    peterbarker on override-keywords

    Add override keyword to those m… (compare)

  • Jun 06 2019 00:11

    tridge on pr-header-conflict-ch

    (compare)

  • Jun 06 2019 00:11

    tridge on master

    marshal: fixed header conflict … (compare)

  • Apr 19 2019 12:42

    OXINARF on fix-python-37

    (compare)

  • Apr 19 2019 12:41

    OXINARF on pr-STM32H7-support

    (compare)

  • Apr 19 2019 12:38
    OXINARF closed #15
  • Apr 19 2019 12:38

    OXINARF on master

    stm32: support ChibiOS kernel m… dsdl_compiler: add missing sheb… dsdl_compiler: remove trailing … and 1 more (compare)

  • Apr 18 2019 18:30
    OXINARF opened #15
  • Apr 18 2019 18:30
    OXINARF review_requested #15
  • Apr 18 2019 18:22

    OXINARF on fix-python-37

    dsdl_compiler: add missing sheb… dsdl_compiler: remove trailing … dsdl_compiler: check for StopIt… (compare)

  • Feb 02 2019 02:03

    tridge on pr-STM32H7-support

    stm32: support ChibiOS kernel m… (compare)

  • Aug 12 2018 14:12

    OXINARF on ardupilot-2018-06-09

    (compare)

  • Aug 12 2018 13:55

    OXINARF on pr-chibios-update

    (compare)

  • Aug 12 2018 13:55

    OXINARF on allow-can2-without-can1

    (compare)

sethjones348
@sethjones348
What is my best approach if I want to integrate a pixhawk running ardupilot into a CANBUS vehicle system in which all of the ECUs only know the SAE j1939 protocol? Should I just write custom translation code from UAVCAN to j1939 and add it to the ardupilot software that I have running?
Buzz
@davidbuzz
google says that SAEj1939 - this is typically used in automotive, so is your vehicle a car or truck or tractor? irrespective of that, without more information about what you are trying to achieve, we can only guess wildly. perhaps you have an aircraft where the ECU of the engine is using SAEj1939... or perhaps you have an aircraft with a propulsive electric DC motor controller that is using that protocol ( like maybe https://www.axiomatic.com/TDAX100050.pdf ), or maybe you are flying a multirotor with a bunch of these sorts of thing..... however it is, the answer will be different depending on what you are doing, and how much u absolutely have to integrate it.
Nik Langrind
@langrind
In working on prototype projects in the past, I have put arbitrary CAN devices on the same bus. I am doing an ArduPilot-based project now, and am uncertain how to support a CAN bus with heterogeneous nodes that don't support UAVCAN. It seems to me that there should be a mode of the ArduPilot CAN code that allows different message handlers to register for receive traffic distinguished by source-id or some other field. Does anyone see value in having a configurable mode in AP's CAN code that provides such a mux/demux layer for CAN?
auturgy
@auturgy
@tridge ^^
sethjones348
@sethjones348
@davidbuzz I work on an R&D team for my company. We have a generic track-driven robot platform (think like the size of a riding lawnmower) that uses hydraulic traction motors. The traction motors are driven by a CAN controller operating with J1939 and specific CAN messages for throttle and steering. That's about as much as I can disclose of the specific application
Andrew Tridgell
@tridge
@langrind maybe, how would we configure this? and with multi-frame traffic can we be sure we won't get packets mis-interpreted?
Buzz
@davidbuzz
@sethjones348 - regarding your SAEj1939 hardware, it seems to me that if you have an existing bus, with a 'master' controller of some sort on it that is able to address all the other devices using 1939, ie a complete end-to-end system, like as found in a typical car, then given it/s essentially CAN at the hardware layer, it would be quite possible to add ardupilot hardware to this existing bus (Pixhawk2 or Cube etc has dual CAN hardware, so that's also a bonus), and in theory 'capture' first then write a software extension to be able to read (listen to existing bus devices communicating) and/or maybe write enough of a subset of command/s to send instructions/s to these devices..... however i'd suggest that unless your manufacturer documents the specific bits and bytes of every packet in your bus(rare but happens), it'll be reverse-engineering and a lot of guess-work. However, if you don't have a 'master' and the ardupilot hardware is going to be the 'master', then it will be nearly impossible without documentation from the endpoint/s manufacturer (and still include guess work).
... but that's just my opinion.... its entirely possible that your vehicle only has 1 type of hardware, and it only has 1 or 2 command packets (eg turn left X degrees, or turn right X, or turn at X speed for X ms ), and you could maybe best-case use the same basic command with all three motors (left track motor, right track motor , throttle position 'motor') and just different IDs on the network... who knows.
Nik Langrind
@langrind
One way to configure it would be to introduce a new value of CAN_Dx_PROTOCOL to indicate generic CAN. The generic CAN Mux would then have arbitrary clients which would have their config (or be hardcoded) and would register with the CAN Mux at run-time, specifying source-ids of interest. The generic can mux's loop would dispatch frames to clients according those source IDs, and call periodically into the clients' transmit routines. In this model, UAVCAN co-existence is not possible.
Nik Langrind
@langrind
Another way to do it would be to have UAVCAN "host" the generic CAN Mux in its loop, which is not what I was thinking of, but now seems like a cool idea. Is this where "multi-frame" packets might be misinterpreted? I'm not familiar with multiframe, all the CAN protocols I've worked with have had single-frame messages. Before trying the UAVCAN-generic-CAN coexistence idea, I would have to dispel my UAVCAN ignorance, I only just started learning about it.
reubenfinch
@reubenfinch
Is there any desire to have a simple CAN output whereby the user chooses a CAN ID to start at and then each of the Servo/ESC signals are output as two bytes. Thus for each 8 byte CAN frame there could be a maximum of 4 Servos/ESCs per message. So with a maximum of 16 servos there would be a maximum of 4 CAN frames. This would allow far easier integration than complicated UAVCAN/ToshibaCAN/KDECAN.
jungx148
@jungx148
@adalta87 I'm also struggling to control gremsy s1 using nvidia tx2..
Launchpad-McQ
@Launchpad-McQ
Hi! Ive been doing some testing with uavcan to output to vesc. It is working fine, except that the motor spins as soon as I connect the vesc to the pixhawk and pixhawk not even armed(throttle on zero, but should make no difference). I Ive search through most of the documentation, but cant find what parameter to adjust.
anyone who can tell me which parameter to adjust?
Buzz
@davidbuzz
anyone used CANBUS or UAVCAN under SITL? i saw a pr for it from the GSoC 2018 , but it doesn't seem to ahve been merged. ArduPilot/ardupilot#8509 thoughts ?
Buzz
@davidbuzz
I seem to be having issues enabling the parameter CAN_P1_DEBUG ( https://ardupilot.org/copter/docs/parameters.html#can-p1-debug-level-of-debug-for-can-devices ) ... as it doesn't seem to exist in any binary I tried. such as copter4.0.4 or copter 'latest' as of 5 minutes ago.... is there something I need to do to unhide this param, or compile my own version..?
mavproxy "param show *CAN*" doesn't show even though the other CAN params are showing
Buzz
@davidbuzz
... never matter... I discovered its hidden behind a #define in AP_BoardConfig_CAN.h that defaults to 0, so I've built my own binary .
Launchpad-McQ
@Launchpad-McQ
Is there any parameter to adjust like pwm_min, pwm_max, and pwm_trim, but for esc connected over UAVCAN?
Samuel Tabor
@samuelctabor
I'm experiencing some issues with SLCAN on CubeOrange. When on the full carrier board, I can successfully discover an mRo F303 node when connected to the CAN 2 port, but not when connected to CAN 1. On the mini carrier board, I can't discover it connected to CAN 2. However, I have successfully set it up with a MS4525D0 airspeed sensor and that works in all cases
Same result with UAVCAN Gui Tool
I'm using the latest ArduPlane beta
Buzz
@davidbuzz
question about CAN_P1_DRIVER Vs CAN_P2_DRIVER that the documentation doesn't make clear... in the case where the two physical ports are both on UAVCAN, but on different CAN bus's, should it be CAN_P2_DRIVER=1 or CAN_P2_DRIVER=2 ? https://ardupilot.org/copter/docs/common-canbus-setup-advanced.html#common-canbus-setup-advanced
it seems most people set both of them to '1' and most also want both can ports 'on the same bus', but i'm not 'most'.
Launchpad-McQ
@Launchpad-McQ
I am running arduplane 4.0.5 and trying to use UAVCAN with a vesc 6 plus. when I set the output for channel it just spins up to maximum and isnt responding to the throttle. (It worked on an earlier ardupilot version, but that version didnt seem to have uavcan telemetry support)
Launchpad-McQ
@Launchpad-McQ
I think on the earlier version there was only the
CAN_D1_UC_SRV_BM
parameter and not the
CAN_D1_UC_ESC_BM
parameter.
was something changed within the UAVCAN protocol which wasnt updated on vesc?
moluav
@moluav
@tridge UAVCAN GPS has the processing capability, and there is also a magnetic compass inside, so can the magnetic compass be calibrated inside UAVCAN GPS? This eliminates the need to hold the drone for calibration when calibrating the compass.
Andrew Tridgell
@tridge
@moluav no, the calibration depends on the environment, you can't calibrate the compass without it being inside the vehicle
moluav
@moluav
@tridge What if there is no external interference in the place where I install the compass?
Mark Whitehorn
@kd0aij
then there would be no need to calibrate at all :)
moluav
@moluav
The magnetic compass has errors when it leaves the factory. Calibration is also required when crossing regions.
sethjones348
@sethjones348
@davidbuzz I apologize for the delayed response but I am appreciative of the time you took to address my situation. My focus will be more on this project for the next couple of months than it has been. Our system is more like the complete end-to-end system you described, with a "master" controller that addresses other devices using j1939. We also do have access to documentation for the specific bits and bytes of every packet in the bus. With this in mind, we will likely attempt to add the pixhawk to the existing bus. Would the "capturing" described and the software logic to read and write commands/instructions be implemented in its own "AP_J1939" library in the codebase? Thanks!
Malcolm Churn
@ukmook
@tridge tested latest master as pulled from an hour ago, I can get 2 rangefinders one on fc and one on node but can’t get 2 on node using serial, don’t know whether I should be able to but thought I would report my findings.
Andrew Tridgell
@tridge
@ukmook no, we don't support multiple rangefinders on one node yet in AP_Periph
we could add that if there is need for it
Malcolm Churn
@ukmook
@tridge ok thanks just thought I would try
Jan
@swanepoeljan
Hi all, I have tried my hand at writing a libcanard based test program that sends a NodeStatus message every 750ms and can also respond to a GetNodeInfo message. I tested it with UAVCAN GUI tool and it works nicely so far. To make it do something more interesting I added the transmission of uavcan.equipment.power.BatteryInfo and then just hard-coded some fake battery voltage and current readings. Also tested this with UAVCAN GUI and it works.
Problem is that when I hookup my node to my FC with fw 4.0.4 and set battery type to UAVCAN it does not seem to work. To try and debug I toggled a led on my node when it receives NodeStatus from the FC. After power-up it seems like it receives about 5 to 10 messages (flashes) and then nothing more. When I use SLCAN on Mission Planner then I can see my Node and the led keeps flashing (receiving NodeStatus) until I disconnect it.
I know it's hard to say without seeing the code but maybe anybody have some advice were the issue could possibly be?
UAVCANGUI_BatteryInfo.png
Jan
@swanepoeljan
As an additional test I added the MagneticFieldStrength message and it shows up but still no BatteryInfo messages. Could somebody maybe confirm that BatteryInfo does indeed work? I see the code is there in AP_BatteryMonitor_UAVCAN and from my limited knowledge I guess it's okay?
MP_Inspector_Mag.png
Jan
@swanepoeljan
Okay, I can confirm it works! My issues was in the way I handled the dynamic arrays, forgot to add the length bits...
Fredrik Hedberg
@fhedberg
I've just gotten a KDE-UAS125UVC ESC that I'm having weird issues with when trying to set up. Having enabled UAVCAN on can1 and KDECAN on can2 on a BlackCube, once I plug the ESC into can2, can1 stops working and the Here2 GPS fails. When snooping traffic via SLCAN on can1, all UAVCAN activity stop immediately, only to start working again after disconnecting the ESC from can2. Any advice?
James O
@joshanne
image.png

Hi All, I have a question re. examples/UAVCAN_sniffer...
I currently have access to a a cube, which is able to run uavcan_gui_tool bus monitor and dump the traffic that way. But I was hoping to run UAVCAN_sniffer, which appears to be able to produce a serial stream of message names and counts.
Strangely, all I appear to see is the system time being printed.

Have I misunderstood the purpose of UAVCAN_sniffer? or am I using it incorrectly?
Thanks

A snippet of the output from the UAVCAN_sniffer example
UAVCAN: init done
2016508
3016393
Successfully mounted SDCard (slowdown=0)
4016395
5016648
6016455
7016806
8016589
Andrew Tridgell
@tridge
I suspect it isn't seeing any packets. I used it yesterday and worked for me
You know cubeblack has can1 and can2 swapped on carrier labels?
James O
@joshanne

That's odd - the uavcan_gui_tool image (above) is from the same cube connected to the same CAN network above - so I know there is messages on the network.

I wasn't aware the cube black has the labels swapped. I've got a cube orange - I haven't seen the swapped labels in any cubepilot documentation for the orange.

I just tried UAVCAN_sniffer again, checking connection on both CAN labels, and still only have the system time being printed. Swapping back to running plane on the cube orange, and checking uavcan_gui_tool I can still see the can node.

image.png