The method if you want develop your own ROV2 Applications

Hi

I’m bong work on KAERI.

as you know from my ex-question i am making some inspection robot.

and i m here to share some imformations to whom in like my situations.

if you want to embed MAVLINK protocols to your application.

first you must download MAVLINK header files.

from here MAVLink Micro Air Vehicle Protocol · GitHub

you can find out there have several categories.
(
to give hint - c_library is pre-maked header files and it can be use easliy on c++ or Qt environment
- and Mavlink category is the one to make your own environment. (ex. python, java etc)
)

after download as your taste, Mavlink can be used if include these header file. (mavlink.h)

yes, it is too massive to understand all of this protocol.

i just let you move ROV2 on your codes.

to make move robot you must send heartbeat MSG,.

and command packet.

it is easy to make heartbeat MSG,. just like this.

use mavlink_msg_heartbeat_pack().
detail usage here (http://mavlink.org/messages/common)

heartbeat msg must send every 100msec, 500msec or 1sec(recommend).

if you can send heartbeat next step is send commands.

i use to make my commnad mavlink_msg_manual_pack() like this.

the last variable is to send not just x,y,z,r values also some extra modes.

like in joystick X,Y,A,B,LB,RB(stabilized flight mode, manual flight mode, CAM down, up… etc)

here is the matched value for function.


(if you want to make camera down just flag up the ‘9th’ bit from LSB that is 512.
like this ,
mavlink_msg_manual_control_pack(Control_PC_ID, Control_PC_COMID, &msg, ROV2_ID, 0, 0, 0, 0, 0x0200);
so you can send several control by one packet
)

there are demo video clip on my youtube channel please visit.

thank you and if you have any questions feel free to ask me.

Very good.