Problem with viewing custom Mavlink message in Mission Planner

668 views
Skip to first unread message

Nikita P

unread,
Sep 25, 2016, 12:35:37 PM9/25/16
to drones-discuss
Hello, Im trying to send info from sensors via Mavlink message to Mission Planner.

So what have I done:
1. I wrote custom message in ~/ardupilot/modules/mavlink/message_definitions/v1.0

        <message id="227" name="ENGINE_INFO">
            <description>Engine Info</description>
            <field name="aero_term1" type="float">Thermopara1</field>
            <field name="aero_term2" type="float">Thermopara2</field>
            <field name="aero_term3" type="float">Thermopara3</field>
            <field name="aero_voltage" type="float">Voltage</field>
            <field name="aero_rpm" type="float">RPM</field>

2. After compilation I can see command to send 
  
    mavlink_msg_engine_info_send(chan,term1,term2,term3,volt1,rpm1);

 Which I placed in GCS_Mavlink.cpp

3. I have made new cpp file with my code which I stored in ArduPlane folder to send.

  I can see my info in hal.console via 

            hal.console->printf("term1: %f, term2: %f, term3: %f, volt1: %f, rpm1: %f\n",term1, term2, term3, volt1, rpm1);

But MissionPlanner says: INFO MissionPlanner.MAVLinkINterface - unknown packet type 227;

What should I do?

Best regards, Nikita

Tom Pittenger

unread,
Sep 25, 2016, 12:42:23 PM9/25/16
to drones-discuss
You've added a custom message and sent it, but mission planner doesn't know how to decode it. Add the same xml stuff on the mission planner side and compile it: https://github.com/ArduPilot/MissionPlanner/tree/master/ExtLibs/Mavlink/message_definitions

--
You received this message because you are subscribed to the Google Groups "drones-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to drones-discuss+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Nikita P

unread,
Sep 27, 2016, 8:10:54 AM9/27/16
to drones-discuss, t...@airphrame.com
Thanks for the answer.
Wiki page "Building Mission Planner with Visual Studio" have wrong info about Visual Studio 2013; I almost lost one day setting VS2013 with this project; until I found project is tied to VS2015.

I have added info about my msg in ExtLibs\Mavlink\message_definitions\ardupilotmega.xml
Firstly I tried to compile only Mavlink module, after that I took MAVLink.dll (88 Kb) from ExtLibs\Mavlink\bin\Debug folder and copied it to installed Mission Planner. After that I didnt see any messages about unknown message in debug console, but I cant see any info in "Status" tab in "Flight Data" or in "Config\Tuning".

After that I tried to compile full Mission Planner. The size of MAVLink.dll was 86 Kb; and I received new errors in Debug Console:
0.00,0.00,0.00,0,50, - thats is full transferred message
term1: 0.000000, term2: 0.000000, term3: 0.000000, volt1: 0.000000, rpm1: 50.00000 - that is my variables after parsing of received msg
INFO MissionPlanner.MAVLinkInterface - Mavlink Bad Packet (Len Fail) len 28 pkno 227
INFO MissionPlanner.MAVLinkInterface - mav 1-1 seqno 21 exp 20 pkts lost 1
INFO MissionPlanner.MAVLinkInterface - Mavlink Bad Packet (Len Fail) len 28 pkno 227
INFO MissionPlanner.MAVLinkInterface - mav 1-1 seqno 45 exp 44 pkts lost 1

Thanks in advance, Nikita.



воскресенье, 25 сентября 2016 г., 21:42:23 UTC+5 пользователь Tom Pittenger написал:
To unsubscribe from this group and stop receiving emails from it, send an email to drones-discus...@googlegroups.com.

Hamish Willee

unread,
Sep 28, 2016, 6:17:37 PM9/28/16
to drones-discuss, t...@airphrame.com
Hi Nikita P

Can you please add more information about the error in the documents (and how you would fix it) in the wiki issue tracker: https://github.com/ArduPilot/ardupilot_wiki/issues/559

Cheers
H
Reply all
Reply to author
Forward
0 new messages