I have an ODroid-XU4 (running Ubuntu 16.04) that should control (simultaneously) pixhawk (running Ardupilot 3.5) which controls Y6 hexacopter. I can send MAVLink messages from ODroid to Pixhawk. My code is written in C++ and I don’t want to program in Python. I can run “sim_vehicle.py” and I can connect APM planner to MAVProxy via udp. I can send commands like “Takeoff” in MAVProxy.
Here are two points I don’t understand:
How can I test my code (which should run on ODroid) that sends commands to pixhawk? I mean I’d like to test if I connected ODroid to Pixhawk and send these navigation control commands, pixhawk will respond in the correct way.
How to configure the SITL to simulate Y6 hexacopter with a specific Arudpilot version? I mean, when I run MAVProxy (using sim_vehicle.py) it just simulates a default quadcopter but I’d like to configure the simulation environment to be exactly as my real setup (Y6 hexacopter and Ardupilot 3.5).
I’m so lost and don’t know where I can find these info. I read MAVProxy documentation and SITL documentation but didn’t find answers.
I’d really appreciate your help, even just hints to the right direction.
Thanks Peter for your answer. I checked sim_vehicle.py --help and found good knowledge there. Thanks for this tip
Regarding the second point, it’s confusing for me because in the code (on ODroid), I send mavlink messages to Pixhawk via UART. How should I send the same messages to sim_vehicle.py. Is it as simple as just sending the buffer via udp as in this link?
Thanks Stephen for your answer.
I didn’t know that sim_vehicle.py compiles the source code before simulating it. I thought it just simulates a specific version of ArduCopter.
I followed your instructions by setting git reset --hard Copter-3.4.5 and git reset --hard Copter-3.4.6. When I run sim_vehicle.py --vehicle=ArduCopter --frame=y6, it gave me errors. I removed ardupilot and re-cloned it and now it’s working.