-
Notifications
You must be signed in to change notification settings - Fork 1
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
Not reading Subscribed ImuData #3
Comments
Just as a check I put a couple serial prints in the driver proper and it is receiving messages. |
@fabolhak |
From the sources you provided everything looks fine to me. If you would provide the full source code for the Subscriber as well as Publisher I could have a second look at it. Unfortunately, I currently don't have access to hardware. Therefore, I can not test it :(. If your budget allows it, I would also recommend buying the Zubax Babel. It is very handy for debugging UAVCAN communication. |
@fabolhak Right now I am trying to see what's actually coming in versus what is going out. For the sideslip case its working no problem whats being sent is what's being received. For the ImuData message that's another case. I will keep you posted on that one if you don't mind. Anyway, here is the publisher sketch. I will definitely check out the Zubax Babel. Thanks |
@fabolhak
Which I believe is the correct format and what should be sent. Using the second teensy as a sniffer, this is what I am seeing:
It looks like it loosing packets that should be transferred. See the message that I referenced. Thanks |
Hello Mike, unfortunately, I can not find any problems with your code at a first glance. However, I can give you two bits of advice: Maybe you want to check out the official definition of an IMU message and see if that works (we wrote our own custom message type to save some bytes we don't use): Working with the raw CAN messages can sometimes be confusing. Maybe I could be helpful to write a CAN message decoder. I did that some time ago for our own CAN sniffer. Maybe it is useful for you too: However, I general it is not a good sign that some message types get transferred correctly and some others not. It should not make a difference. This could mean that the driver implementation is not stable. |
Thanks, this will be very useful going forward. Anyway, you must be reading my mind. I just got it working a little while ago but I had to change the flexcan driver. I updated to this version: https://forum.pjrc.com/threads/45017-Fix-for-FlexCAN-library-provided-with-Teensyduino?highlight=nmea2000 but had to make a few minor modifications to make it equivalent to what was there. If you are interested I can post the changed files. Once I updated the driver it worked like a charm and printed out the euler angles since that was all I was asking for as a test :) Now I am working on another test message (Fix.hpp) just to be sure but ran into another issue that I think is my own doing. Publisher not working - CPU is like 330000 percent so I must have messed something up |
Just wanted to let you know found the error. All is good. Driver works fine. |
@fabolhak I am attaching the updated flexcan library files if you would like to use them. |
Hello Mike, Anyways, as long as it works for both of us, everything is fine :). |
I will keep both changes in mind just in case. I am running primarily on a Teensy 3.5 and 3.6. Just did a few tests on the Teensy 3.2. |
Hi all.
Know this may be premature with the examples sketches but wanted to see if I could get it working with the Arduino style library I put together. I modified the teensy_body_control example to only publish ImuData from the phoenix custom message (yes I ran it through the compiler to generate the .hpp file). This seemed to be working. Using a custom message sniffer on a second Teensy 3.5 I was able to see the following messages come across, not sure if they are correct yet:
So at least I know something is getting sent. I then created a subscriber only sketch, and this is where I get fuzzy on the right format. But any way it seems that the subscriber node gets fired but no messages get printed in the callback and it appears the callback never gets fired. Really would like to get this example working.
Here are the two associated files:
Main sketch
Subscriber.cpp file:
The text was updated successfully, but these errors were encountered: