Community
cancel
Showing results for 
Search instead for 
Did you mean: 
荣刘
Beginner
1,472 Views

How to do the aero_fly_mission SITL simulation in gazebo and QGroundControl correctly?

Hi, I tried to simulate the mission plan part of intel-aero/sample-apps but some errors occurred. My steps are as follows.

Step 1

```

cd ~/src/Firmware

make posix_sitl_default gazebo

```

Step 2

open QGroundControl

Step 3

```

roslaunch mavros px4.launch fcu_url:="udp://:14540@127.0.0.1:14557"

```

Step 4

```

roslaunch aero_fly_mission aero_fly_mission.launch file:="home/kumaron/Plan"

```

And the errors are as follows.

```

kumaron@ubuntu:~$ roslaunch aero_fly_mission aero_fly_mission.launch file:="/home/kumaron/Plan"

... logging to /home/kumaron/.ros/log/05884c98-dda2-11e8-b9df-843a4b933d20/roslaunch-ubuntu-16916.log

Checking log directory for disk usage. This may take awhile.

Press Ctrl-C to interrupt

Done checking log file disk usage. Usage is <1GB.

started roslaunch server http://ubuntu:37473/

SUMMARY

========

PARAMETERS

* /rosdistro: kinetic

* /rosversion: 1.12.14

NODES

/

aero_fly_mission (aero_fly_mission/node)

ROS_MASTER_URI= http://localhost:11311

process[aero_fly_mission-1]: started with pid [16941]

[ERROR] [1541055166.822923790]: : read error

[ERROR] [1541055166.823026524]: Fatal: error in loading waypoints from the file /home/kumaron/Plan!!

[aero_fly_mission-1] process has died [pid 16941, exit code -6, cmd /home/kumaron/catkin_ws/devel/lib/aero_fly_mission/node /home/kumaron/Plan __name:=aero_fly_mission __log:=/home/kumaron/.ros/log/05884c98-dda2-11e8-b9df-843a4b933d20/aero_fly_mission-1.log].

log file: /home/kumaron/.ros/log/05884c98-dda2-11e8-b9df-843a4b933d20/aero_fly_mission-1*.log

all processes on machine have died, roslaunch will exit

shutting down processing monitor...

... shutting down processing monitor complete

done

```

How could I do the aero_fly_mission SITL simulation in gazebo and QGroundControl correctly? Thanks in advance!

0 Kudos
6 Replies
idata
Community Manager
63 Views

Hi Kumaron,

 

 

Thank you for your interest in the Intel Aero Ready to Fly Drone.

 

Did you follow these instructions?

 

https://github.com/intel-aero/sample-apps/tree/master/ros

 

 

Regards,

 

Alexandra
荣刘
Beginner
63 Views

Hi Alexandra,

Thank you for your reply, I followed the instructions.

https://github.com/intel-aero/sample-apps/tree/master/ros https://github.com/intel-aero/sample-apps/tree/master/ros

Actually I found that I missed one important annotation in aero_fly_mission_node.cpp

try

{

getWaypointsFromQGCPlan(argv[1], &wp_list);

}

catch (std::exception const& e)

{

// NOTE: QGC waypointplan (JSON) may contain 'params' valueas 'null';

// in that case we may get execption. Make sure to keep 'params' values to be 0.

ROS_ERROR("Fatal: error in loading waypoints from the file %s!!", argv[1]);

abort();

}

I found that QGC waypoint plan file contained 'params' values 'null'. After changing 'null' to 0, I could launch the aero_fly_mission.launch and the simulation worked.

Now I'm wondering if the Intel Aero Ready to Fly Drone takes off in the offboard mode, how could I send waypoints to the Intel Aero Ready to Fly Drone and let it execute the fly mission?

Thanks in advance!

Regards,

Kumaron

idata
Community Manager
63 Views

Hi Kumaron,

 

 

You can plan a mission in QGroundControl.

 

You can find instructions here:

 

https://docs.qgroundcontrol.com/en/PlanView/PlanView.html

 

 

Let me know if this helps.

 

 

Regards,

 

Alexandra
荣刘
Beginner
63 Views

Hi Alexandra,

Thank you for your reply.

Actually, I know how to plan a mission in QGroundControl. In the aero_fly_mission, the mission is executed in the mission mode. I want to execute the waypoint mission in the offboard mode. Should I switch offboard mode to the mission mode to execute the mission? Or is there a method to execute the mission directly in the offboard mode?

Regards,

Kumaron

idata
Community Manager
63 Views

Hi Kumaron,

 

 

Are you running the sample code or did you create your own code?

 

Can you tell the output of get_aero_version.py?

 

 

Regards,

 

Alexandra
荣刘
Beginner
63 Views

Hi Alexandra,

I am just running sample code on laptop to do simulation.

I'll study the offboard mode and mission mode further myself.

Thank you for your patience and reply!

Regards,

Kumaron

Reply