-
Notifications
You must be signed in to change notification settings - Fork 13.6k
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
Support of multi uav simulation in SITL #7235
Conversation
@Randa-Almadhoun can you please check if the changes proposed by @mzahana work in our test scenarios ? (you will have to update sitl_gazebo as discuss above) |
@TarekTaha I tested it in our test scenarios and it is working. |
@TarekTaha @mzahana Thank you so much for the contribution! Could you also please contribute the required documentation for http://dev.px4.io (PX4/Devguide)? |
@LorenzMeier Will do. |
@LorenzMeier A PR of documentation is submitted, |
Instead of manually setting the ROS_PACKAGE_PATH, the px4 package is setup to just work in a catkin workspace. In fact, this is how we do unit testing. Try out the commands below if interested. mkdir -p ~/catkin_px4/src
cd ~/catkin_px4/src
ln -s ~/src/Firmware px4
ln -s ~/src/Firmware/Tools/sitl_gazebo mavlink_sitl_gazebo
cd ~/catkin_px4
catkin init
catkin build |
@jgoppert That makes more sense to me. I just was not sure that it will compile as a catkin package. Thanks. |
@mzahana I'm trying to make this work for planes, but they don't have .xacro files, just sdf. Can you advise on how to make this multi uav sim work for multiple planes?? |
In this case the generalizatiom that this PR privides wont work any more.
You will have to provide a seperare sdf file for each vehicle you use. You
will need to modifiy the two launch files which are used in this PR in
order to point to each sdf file. Each sdf file will need to include unique
```mavlink_udp_port```
…On May 17, 2017 6:43 PM, "paan2097" ***@***.***> wrote:
@mzahana <https://github.com/mzahana> I'm trying to make this work for
planes, but they don't have .xacro files, just sdf. Can you advise on how
to make this multi uav sim work for multiple planes??
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#7235 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AIZT68lqfzi7rQM93QZu-CFmYjg4ygpLks5r6yPLgaJpZM4NaL82>
.
|
@paan2097 you can refer to this package https://github.com/kuri-kustar/kuri_mbzirc_sim from which the original generalization by mzahana came from. you can also test the uavs using one of the nodes provided in the same package. |
Sdf is just xml. We should make a python script that finds the mavlink plugin element and rewrites the UDP port. Would be pretty easy. |
@mzahana Hey so Im on ubuntu 16.04 so I had to install ros-kinetic. Before making changes for plane usage, I tried to get the default config working first. After following the devguide on multi-vehicle simulation, this is my output after running roslaunch px4 multi_uav_mavros_sitl.launch: patrick@patrick-VirtualBox:~/src/Firmware$ roslaunch px4 multi_uav_mavros_sitl.launch Usage: xacro.py [options] xacro.py: error: expected exactly one input file as argument Param xml is Here is the log file: [roslaunch][INFO] 2017-05-18 10:38:56,386: Checking log directory for disk usage. This may take awhile. Param xml is Param xml is [rospy.core][INFO] 2017-05-18 10:38:56,726: signal_shutdown [atexit] |
Did you clone px4 repo with submodules?
Do you have xacro package installed using ```apt-get``` ?
I am not really sure if this will work on ros-kinetic. This was tested on
indigo.
…On May 18, 2017 6:49 PM, "paan2097" ***@***.***> wrote:
@mzahana <https://github.com/mzahana> Hey so Im on ubuntu 16.04 so I had
to install ros-kinetic. Before making changes for plane usage, I tried to
get the default config working first. After following the devguide on
multi-vehicle simulation, this is my output after running roslaunch px4
multi_uav_mavros_sitl.launch:
***@***.***:~/src/Firmware$ roslaunch px4
multi_uav_mavros_sitl.launch
... logging to /home/patrick/.ros/log/7c648ece-3be8-11e7-a9cd-
0800274501b3/roslaunch-patrick-VirtualBox-7672.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.
Usage: xacro.py [options]
xacro.py: error: expected exactly one input file as argument
while processing /home/patrick/src/Firmware/launch/single_vehcile_spawn.
launch:
Invalid tag: Cannot load command parameter [iris_1_sdf]: command
[/opt/ros/kinetic/share/xacro/xacro.py /home/patrick/src/Firmware/
Tools/sitl_gazebo/models/rotors_description/urdf/iris_base.xacro
rotors_description_dir:=/home/patrick/src/Firmware/Tools/
sitl_gazebo/models/rotors_description mavlink_udp_port:=14560 >
iris_1.urdf ; 'gz sdf -p iris_1.urdf'] returned with code [2].
Param xml is
The traceback for the exception was written to the log file
Here is the log file:
[roslaunch][INFO] 2017-05-18 10:38:56,386: Checking log directory for disk
usage. This may take awhile.
Press Ctrl-C to interrupt
[roslaunch][INFO] 2017-05-18 10:38:56,389: Done checking log file disk
usage. Usage is <1GB.
[roslaunch][INFO] 2017-05-18 10:38:56,389: roslaunch starting with args
['/opt/ros/kinetic/bin/roslaunch', 'px4', 'multi_uav_mavros_sitl.launch']
[roslaunch][INFO] 2017-05-18 10:38:56,389: roslaunch env is
{'MANDATORY_PATH': '/usr/share/gconf/ubuntu.mandatory.path',
'ROS_DISTRO': 'kinetic', 'ROS_LOG_FILENAME': '/home/patrick/.ros/log/
7c648ece-3be8-11e7-a9cd-0800274501b3/roslaunch-patrick-VirtualBox-7672.log',
'XDG_GREETER_DATA_DIR': '/var/lib/lightdm-data/patrick',
'GNOME_DESKTOP_SESSION_ID': 'this-is-deprecated', 'PKG_CONFIG_PATH':
'/opt/ros/kinetic/lib/pkgconfig', 'UPSTART_EVENTS': 'xsession started',
'XDG_CURRENT_DESKTOP': 'Unity', 'LESSOPEN': '| /usr/bin/lesspipe %s',
'XDG_SESSION_TYPE': 'x11', 'ROSLISP_PACKAGE_DIRECTORIES': '',
'QT_IM_MODULE': 'ibus', 'LOGNAME': 'patrick', 'WINDOWID': '52428810',
'PATH': '/opt/ros/kinetic/bin:/home/patrick/ninja:/home/patrick/
gcc-arm-none-eabi-5_4-2016q2/bin:/home/patrick/bin:/home/
patrick/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:
/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin', 'XDG_VTNR':
'7', 'GNOME_KEYRING_CONTROL': '', 'CMAKE_PREFIX_PATH': '/opt/ros/kinetic',
'LD_LIBRARY_PATH': '/opt/ros/kinetic/lib:/home/patrick/src/Firmware/Tools/
sitl_gazebo/Build/msgs/:/home/patrick/src/Firmware/build_
posix_sitl_default/build_gazebo', 'LANG': 'en_US.UTF-8', 'TERM':
'xterm-256color', 'SHELL': '/bin/bash', 'XDG_SESSION_PATH':
'/org/freedesktop/DisplayManager/Session0', 'XAUTHORITY':
'/home/patrick/.Xauthority', 'LANGUAGE': 'en_US', 'SESSION_MANAGER':
'local/patrick-VirtualBox:@/tmp/.ICE-unix/1580,unix/
patrick-VirtualBox:/tmp/.ICE-unix/1580', 'SHLVL': '1',
'QT_LINUX_ACCESSIBILITY_ALWAYS_ON': '1', 'QT_QPA_PLATFORMTHEME':
'appmenu-qt5', 'QT_ACCESSIBILITY': '1', 'DISPLAY': ':0',
'UPSTART_INSTANCE': '', 'CLUTTER_IM_MODULE': 'xim', 'SESSION': 'ubuntu',
'LIBGL_ALWAYS_SOFTWARE': '1', 'SESSIONTYPE': 'gnome-session', 'XMODIFIERS':
***@***.*** <https://github.com/im>=ibus', 'ROS_ETC_DIR':
'/opt/ros/kinetic/etc/ros', 'GPG_AGENT_INFO': '/home/patrick/.gnupg/S.gpg-agent:0:1',
'HOME': '/home/patrick', 'QT4_IM_MODULE': 'xim', 'GTK2_MODULES':
'overlay-scrollbar', 'XDG_SESSION_DESKTOP': 'ubuntu', 'COMPIZ_BIN_PATH':
'/usr/bin/', 'XDG_RUNTIME_DIR': '/run/user/1000', 'INSTANCE': '',
'PYTHONPATH': '/opt/ros/kinetic/lib/python2.7/dist-packages',
'COMPIZ_CONFIG_PROFILE': 'ubuntu-lowgfx', 'SSH_AUTH_SOCK':
'/run/user/1000/keyring/ssh', 'VTE_VERSION': '4205', 'ROS_ROOT':
'/opt/ros/kinetic/share/ros', 'GDMSESSION': 'ubuntu', 'IM_CONFIG_PHASE':
'1', 'UPSTART_JOB': 'unity7', 'LESSCLOSE': '/usr/bin/lesspipe %s %s',
'GNOME_KEYRING_PID': '', 'XDG_SEAT_PATH': '/org/freedesktop/DisplayManager/Seat0',
'ROS_PACKAGE_PATH': '/opt/ros/kinetic/share:/home/
patrick/src/Firmware:/home/patrick/src/Firmware/Tools/sitl_gazebo',
'GAZEBO_MODEL_PATH': ':/home/patrick/src/Firmware/Tools/sitl_gazebo/models',
'XDG_SESSION_ID': 'c2', 'DBUS_SESSION_BUS_ADDRESS':
'unix:abstract=/tmp/dbus-CyCHzc9SKx', '_': '/opt/ros/kinetic/bin/roslaunch',
'DEFAULTS_PATH': '/usr/share/gconf/ubuntu.default.path', 'GTK_IM_MODULE':
'ibus', 'DESKTOP_SESSION': 'ubuntu', 'UPSTART_SESSION':
'unix:abstract=/com/ubuntu/upstart-session/1000/1357', 'XDG_CONFIG_DIRS':
'/etc/xdg/xdg-ubuntu:/usr/share/upstart/xdg:/etc/xdg', 'GTK_MODULES':
'gail:atk-bridge:unity-gtk-module', 'XDG_SEAT': 'seat0', 'OLDPWD':
'/home/patrick', 'GDM_LANG': 'en_US', 'GAZEBO_PLUGIN_PATH':
'/home/patrick/src/Firmware/build_posix_sitl_default/build_gazebo:',
'XDG_DATA_DIRS': '/usr/share/ubuntu:/usr/share/
gnome:/usr/local/share/:/usr/share/:/var/lib/snapd/desktop', 'PWD':
'/home/patrick/src/Firmware', 'JOB': 'unity-settings-daemon',
'ROS_MASTER_URI': 'http://localhost:11311', 'XDG_MENU_PREFIX': 'gnome-',
'LS_COLORS': 'rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=
40;33;01:cd=40;33;01:or=40;31;01:mi=00:su=37;41:sg=30;43:ca=
30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:
*.arc=01;31:*.arj=01;31:*.taz=01;31:*.lha=01;31:*.lz4=01;31:*.lzh=01;31:
*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.tzo=01;31:*.t7z=01;31:*.zip=01;31:
*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.lrz=01;31:*.lz=01;31:
*.lzo=01;31:*.xz=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:
*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:
*.sar=01;31:*.rar=01;31:*.alz=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:
*.7z=01;31:*.rz=01;31:*.cab=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:
*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:
*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:
*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:
*.mkv=01;35:*.webm=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:
*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:
*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:
*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:
*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.m4a=00;36:
*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:
*.ra=00;36:*.wav=00;36:*.oga=00;36:*.opus=00;36:*.spx=00;36:*.xspf=00;36:',
'USER': 'patrick'}
[roslaunch][INFO] 2017-05-18 10:38:56,389: starting in server mode
[roslaunch.parent][INFO] 2017-05-18 10:38:56,390: starting roslaunch
parent run
[roslaunch][INFO] 2017-05-18 10:38:56,390: loading roscore config file
/opt/ros/kinetic/etc/ros/roscore.xml
[roslaunch][INFO] 2017-05-18 10:38:56,520: Added core node of type
[rosout/rosout] in namespace [/]
[roslaunch.config][INFO] 2017-05-18 10:38:56,520: loading config file
/home/patrick/src/Firmware/launch/multi_uav_mavros_sitl.launch
[roslaunch][INFO] 2017-05-18 10:38:56,545: Added node of type
[gazebo_ros/gzserver] in namespace [/]
[roslaunch][INFO] 2017-05-18 10:38:56,546: Added node of type
[gazebo_ros/gzclient] in namespace [/]
[roslaunch][ERROR] 2017-05-18 10:38:56,725: while processing
/home/patrick/src/Firmware/launch/single_vehcile_spawn.launch:
Invalid tag: Cannot load command parameter [iris_1_sdf]: command
[/opt/ros/kinetic/share/xacro/xacro.py /home/patrick/src/Firmware/
Tools/sitl_gazebo/models/rotors_description/urdf/iris_base.xacro
rotors_description_dir:=/home/patrick/src/Firmware/Tools/
sitl_gazebo/models/rotors_description mavlink_udp_port:=14560 >
iris_1.urdf ; 'gz sdf -p iris_1.urdf'] returned with code [2].
Param xml is
[roslaunch][ERROR] 2017-05-18 10:38:56,725: The traceback for the
exception was written to the log file
[roslaunch][ERROR] 2017-05-18 10:38:56,725: Traceback (most recent call
last):
File "/opt/ros/kinetic/lib/python2.7/dist-packages/roslaunch/*init*.py",
line 307, in main
p.start()
File "/opt/ros/kinetic/lib/python2.7/dist-packages/roslaunch/parent.py",
line 268, in start
self._start_infrastructure()
File "/opt/ros/kinetic/lib/python2.7/dist-packages/roslaunch/parent.py",
line 217, in _start_infrastructure
self._load_config()
File "/opt/ros/kinetic/lib/python2.7/dist-packages/roslaunch/parent.py",
line 132, in _load_config
roslaunch_strs=self.roslaunch_strs, verbose=self.verbose)
File "/opt/ros/kinetic/lib/python2.7/dist-packages/roslaunch/config.py",
line 453, in load_config_default
raise RLException(e)
RLException: while processing /home/patrick/src/Firmware/
launch/single_vehcile_spawn.launch:
Invalid tag: Cannot load command parameter [iris_1_sdf]: command
[/opt/ros/kinetic/share/xacro/xacro.py /home/patrick/src/Firmware/
Tools/sitl_gazebo/models/rotors_description/urdf/iris_base.xacro
rotors_description_dir:=/home/patrick/src/Firmware/Tools/
sitl_gazebo/models/rotors_description mavlink_udp_port:=14560 >
iris_1.urdf ; 'gz sdf -p iris_1.urdf'] returned with code [2].
Param xml is
[rospy.core][INFO] 2017-05-18 10:38:56,726: signal_shutdown [atexit]
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#7235 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AIZT68sKZe3rVzDpyc12nI8nbhTfir9nks5r7HaEgaJpZM4NaL82>
.
|
I had the same issue on kinetic. Are you guys opposed to my python sdf rewriter proposal, would it help if I wrote the script? |
The Python script is a nice idea, and actually I thought about it but got
lazy. As long as one can use one sdf file for multi uav of the same type,
it should be fine. Also, it would be more convienent to specifiy the
different ports in the launch file, to avoid providing this in multiple
files outside the main launch file.
…On May 18, 2017 8:14 PM, "James Goppert" ***@***.***> wrote:
I had the same issue on kinetic. Are you guys opposed to my python sdf
rewriter proposal, would it help if I wrote the script?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#7235 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AIZT6w0VqThI-EZw_XBllINULL0nlqASks5r7IpzgaJpZM4NaL82>
.
|
@mzahana I'm going to alter the two launch files to point to separate plane SDF files. I want to run this without ROS, as I am going to use dronekit to control the planes, one via offboard control. Can you please advice on initial steps for getting this running without ROS, but a multi plane sitl with dronekit? |
I also have this issue. When I launch the single_vehicle_spawn.launch. The system reports the following error: xacro.py: error: expected exactly one input file as argument Param xml is Do you know how to solve this issue? @mzahana I work on ubuntu 14.04, ros-jade and gazebo7 |
A more critical problem. When I launch the gazebo ,iris model and px4 node via the launch files, it seems that the px4 didn't receive any data from gazebo. It always report by the px4 node that: therefore, i cannot receive any data from quad or control the quad. Could you help me? @mzahana By the way,My px4 firmware version is 1.6.5. |
I can confirm that this issue also exists on Ubuntu 16.04 and ROS Kinetic:
Any help on how to solve this would be appreciated. |
Can you please try the following? 1- Go to the folder where you cloned the PX4 Frimware.
by
5- Try to launch the simulation again,
|
@paan2097 Sorry for the very late reply, I got super busy! I have not worked woth SITL outside ROS. However, the SITL app communicates vi a port that is defined in a configuration file that basically defines the PX4 params for your simulated vehicle. For example, see this. If you are able to make dronekit to communicate to that port, then you can connect to the PX4 SITL app. |
@mzahana Thanks for the reply, I got the multi plane SITL up using gazebo months ago. |
How do I control the drones in the multi-vehicle simulation? With the basic make posix_sitl_default gazebo launch I was able to issue commands at a px4> prompt or I could launch QGroundcontrol and control the drone that way. Launching with roslaunch px4 multi_uav_mavros_sitl.launch does not let me do either of those. QGroundcontrol is "waiting for a connection" and I'm assuming I don't have a PX4 prompt because of this error during launch? My eventual goal is to have on drone flying in a pattern autonomously or hovering, while I control the main drone like I normally would in PX4/QGroundcontrol. |
@dakotasanchez You need to read the comments above, the ones linked from here, the dev guide, and so on... You are far from your goal as you haven't set the ROS_PACKAGE_PATH, resulting in the error you've shared. |
@lamping7 Yes I have read the comments above, related github issues, the dev guide (to a level of probably on 90% understanding), and set the ROS_PACKAGE_PATH already. I encountered my issue after doing all of this. |
That error is the result of either not building what is required or not setting the path. |
@lamping7 Well I am using |
make posix_sitl_default sitl_gazebo |
@dakotasanchez Please follow the instruction on this updated page If everything done correctly you can control all UAVs by Qgroundcontrol. |
@dakotasanchez FYI, the changes mentioned above #7235 (comment) only just went in in the last couple of days (PX4/PX4-Devguide#461), so these should work, even if you found them flawed previously. |
Hi, I started a gazebo world with four iris in it, and they are named iris, iris_0, iris_1, iris_2. The first line above did well and iris_1 uses port 14560 and connects gazebo and binds the name without error. The second line has trouble. For iris_2, I tried port 14560, 14562, 14564, etc, and none of them works. The files iris_1 and iris_2 are modified for this purpose, and I specified the port with the following line: Could someone please tell me how to proceed. Many thanks! |
By the way, if I use ROS, then the above experiment with the same iris_1 and iris_2 work well (e.g., roslaunch multi_uav_mavros_sitl.launch) and I can control each individual SITL using their corresponding companion computer with or without QGroundControl. |
#12292 |
Where do you specify the TCP Port of the simulation using the latest multi_uav_mavros_sitl.launch file? And generally, you say a |
There are two sides (in general) to launching this simulation. One is the ROS + Gazebo and the other is the PX4 part. As the other issue above hints at, you need to setup the ports manually for SDFs. You then need the ports to match in the launch file. The second part is setting up the PX4 end. You need the startup file ports to match. You should read PX4/PX4-Devguide#398 to understand this part. I'm not going to explain how to create a xacro. You can use the iris as an example and submit a PR for it if you get it done. Also, look at the "additional resources" section here -> https://dev.px4.io/en/simulation/multi-vehicle-simulation.html |
Thank you for your response! I read the resources you gave and it helped.. a bit :) This is my custom-launch file: <?xml version="1.0" encoding="UTF-8"?>
<launch>
<!-- vehicle model and world -->
<arg name="est" default="ekf2"/>
<arg name="world" default="$(find mavlink_sitl_gazebo)/worlds/empty.world"/>
<!-- gazebo configs -->
<arg name="gui" default="true"/>
<arg name="debug" default="false"/>
<arg name="verbose" default="false"/>
<arg name="paused" default="false"/>
<arg name="respawn_gazebo" default="true"/>
<!-- Gazebo sim -->
<include file="$(find gazebo_ros)/launch/empty_world.launch">
<arg name="gui" value="$(arg gui)"/>
<arg name="world_name" value="$(arg world)"/>
<arg name="debug" value="$(arg debug)"/>
<arg name="verbose" value="$(arg verbose)"/>
<arg name="paused" value="$(arg paused)"/>
<arg name="respawn_gazebo" value="$(arg respawn_gazebo)"/>
</include>
<!-- PX4 configs -->
<arg name="interactive" default="true"/>
<!-- UAV0 -->
<group ns="uav0">
<arg name="vehicle" default="plane"/>
<arg name="sdf" default="$(find mavlink_sitl_gazebo)/models/$(arg vehicle)/plane0.sdf"/>
<!-- MAVROS and vehicle configs -->
<arg name="ID" value="0"/>
<arg name="fcu_url" default="udp://:14540@localhost:14580"/>
<env name="PX4_SIM_MODEL" value="$(arg vehicle)" />
<env name="PX4_ESTIMATOR" value="$(arg est)" />
<!-- vehicle pose -->
<arg name="x" default="0"/>
<arg name="y" default="0"/>
<arg name="z" default="0"/>
<arg name="R" default="0"/>
<arg name="P" default="0"/>
<arg name="Y" default="0"/>
<!-- PX4 SITL -->
<arg unless="$(arg interactive)" name="px4_command_arg1" value=""/>
<arg if="$(arg interactive)" name="px4_command_arg1" value="-d"/>
<node name="sitl_$(arg ID)" pkg="px4" type="px4" output="screen"
args="$(find px4)/ROMFS/px4fmu_common -s etc/init.d-posix/rcS -i $(arg ID) $(arg px4_command_arg1)">
</node>
<node name="$(arg vehicle)_$(arg ID)_spawn" pkg="gazebo_ros" type="spawn_model" output="screen"
args="-sdf -file $(arg sdf) -model $(arg vehicle)_$(arg ID) -x $(arg x) -y $(arg y) -z $(arg z) -R $(arg R) -P $(arg P) -Y $(arg Y)"/>
<!-- MAVROS -->
<include file="$(find mavros)/launch/px4.launch">
<arg name="gcs_url" value=""/>
<arg name="fcu_url" value="$(arg fcu_url)"/>
<arg name="tgt_system" value="$(eval 1 + arg('ID'))"/>
<arg name="tgt_component" value="1"/>
<arg name="respawn_mavros" value="true"/>
</include>
</group>
<!-- UAV1 -->
<group ns="uav1">
<arg name="vehicle" default="plane"/>
<arg name="sdf" default="$(find mavlink_sitl_gazebo)/models/$(arg vehicle)/plane1.sdf"/>
<!-- MAVROS and vehicle configs -->
<arg name="ID" value="1"/>
<arg name="fcu_url" default="udp://:14541@localhost:14581"/>
<env name="PX4_SIM_MODEL" value="$(arg vehicle)" />
<env name="PX4_ESTIMATOR" value="$(arg est)" />
<!-- vehicle pose -->
<arg name="x" default="0"/>
<arg name="y" default="2"/>
<arg name="z" default="0"/>
<arg name="R" default="0"/>
<arg name="P" default="0"/>
<arg name="Y" default="0"/>
<!-- PX4 SITL -->
<arg unless="$(arg interactive)" name="px4_command_arg1" value=""/>
<arg if="$(arg interactive)" name="px4_command_arg1" value="-d"/>
<node name="sitl_$(arg ID)" pkg="px4" type="px4" output="screen"
args="$(find px4)/ROMFS/px4fmu_common -s etc/init.d-posix/rcS -i $(arg ID) $(arg px4_command_arg1)">
</node>
<node name="$(arg vehicle)_$(arg ID)_spawn" pkg="gazebo_ros" type="spawn_model" output="screen"
args="-sdf -file $(arg sdf) -model $(arg vehicle)_$(arg ID) -x $(arg x) -y $(arg y) -z $(arg z) -R $(arg R) -P $(arg P) -Y $(arg Y)"/>
<!-- MAVROS -->
<include file="$(find mavros)/launch/px4.launch">
<arg name="gcs_url" value=""/>
<arg name="fcu_url" value="$(arg fcu_url)"/>
<arg name="tgt_system" value="$(eval 1 + arg('ID'))"/>
<arg name="tgt_component" value="1"/>
<arg name="respawn_mavros" value="false"/>
</include>
</group>
</launch>
This is a snippet of the SDF of the plane: <plugin name='mavlink_interface' filename='libgazebo_mavlink_interface.so'>
<robotNamespace></robotNamespace>
<imuSubTopic>/imu</imuSubTopic>
<gpsSubTopic>/gps</gpsSubTopic>
<magSubTopic>/mag</magSubTopic>
<baroSubTopic>/baro</baroSubTopic>
<mavlink_addr>INADDR_ANY</mavlink_addr>
<mavlink_udp_port>14560</mavlink_udp_port>
<serialEnabled>false</serialEnabled>
<serialDevice>/dev/ttyACM0</serialDevice>
<baudRate>921600</baudRate>
<qgc_addr>INADDR_ANY</qgc_addr>
<qgc_udp_port>14570</qgc_udp_port>
<sdk_addr>INADDR_ANY</sdk_addr>
<sdk_udp_port>14540</sdk_udp_port>
<hil_mode>false</hil_mode>
<hil_state_level>false</hil_state_level>
<enable_lockstep>true</enable_lockstep>
<use_tcp>true</use_tcp
[...] This is the #!/bin/sh
# PX4 commands need the 'px4-' prefix in bash.
# (px4-alias.sh is expected to be in the PATH)
# shellcheck disable=SC1091
. px4-alias.sh
SCRIPT_DIR="$(CDPATH='' cd -- "$(dirname -- "$0")" && pwd)"
#
# Main SITL startup script
#
# check for ekf2 replay
# shellcheck disable=SC2154
if [ "$replay_mode" = "ekf2" ]
then
sh etc/init.d-posix/rc.replay
exit 0
fi
# initialize script variables
set AUX_MODE none
set IO_PRESENT no
set LOG_FILE bootlog.txt
set MAV_TYPE none
set MIXER none
set MIXER_AUX none
set MIXER_FILE none
set OUTPUT_MODE sim
set PWM_OUT none
set SDCARD_MIXERS_PATH etc/mixers
set USE_IO no
set VEHICLE_TYPE none
set LOGGER_BUF 1000
set RUN_MINIMAL_SHELL no
# Use the variable set by sitl_run.sh to choose the model settings.
if [ "$PX4_SIM_MODEL" = "shell" ]; then
set RUN_MINIMAL_SHELL yes
else
# Find the matching Autostart ID (file name has the form: [0-9]+_${PX4_SIM_MODEL})
# TODO: unify with rc.autostart generation
# shellcheck disable=SC2012
REQUESTED_AUTOSTART=$(ls "$SCRIPT_DIR" | sed -n 's/^\([0-9][0-9]*\)_'${PX4_SIM_MODEL}'$/\1/p')
if [ -z "$REQUESTED_AUTOSTART" ]; then
echo "Error: Unknown model '$PX4_SIM_MODEL'"
exit 1
fi
fi
# clear bootlog
[ -f $LOG_FILE ] && rm $LOG_FILE
uorb start
if [ -f eeprom/parameters ]
then
param load
fi
# exit early when the minimal shell is requested
[ $RUN_MINIMAL_SHELL = yes ] && exit 0
# Use environment variable PX4_ESTIMATOR to choose estimator.
if [ "$PX4_ESTIMATOR" = "q" ]; then
param set SYS_MC_EST_GROUP 3
elif [ "$PX4_ESTIMATOR" = "ekf2" ]; then
param set SYS_MC_EST_GROUP 2
elif [ "$PX4_ESTIMATOR" = "lpe" ]; then
param set SYS_MC_EST_GROUP 1
elif [ "$PX4_ESTIMATOR" = "inav" ]; then
param set SYS_MC_EST_GROUP 0
fi
if param compare SYS_AUTOSTART $REQUESTED_AUTOSTART
then
set AUTOCNF no
else
set AUTOCNF yes
fi
# multi-instance setup
# shellcheck disable=SC2154
param set MAV_SYS_ID $((px4_instance+1))
simulator_tcp_port=$((4560+px4_instance))
udp_offboard_port_local=$((14580+px4_instance))
udp_offboard_port_remote=$((14540+px4_instance))
udp_gcs_port_local=$((14570+px4_instance))
if [ $AUTOCNF = yes ]
then
param set SYS_AUTOSTART $REQUESTED_AUTOSTART
param set BAT_N_CELLS 3
param set CAL_ACC0_ID 1311244
param set CAL_ACC_PRIME 1311244
param set CAL_GYRO0_ID 2294028
param set CAL_GYRO_PRIME 2294028
param set CAL_MAG0_ID 197388
param set CAL_MAG_PRIME 197388
param set CAL_BARO_PRIME 6620172
param set CBRK_AIRSPD_CHK 0
param set COM_DISARM_LAND 0.1
param set COM_OBL_ACT 2
param set COM_OBL_RC_ACT 0
param set COM_OF_LOSS_T 5
param set COM_RC_IN_MODE 1
param set EKF2_AID_MASK 1
param set EKF2_ANGERR_INIT 0.01
param set EKF2_HGT_MODE 0
param set EKF2_GBIAS_INIT 0.01
# Speedup SITL startup
param set EKF2_REQ_GPS_H 0.5
# LPE: GPS only mode
param set LPE_FUSION 145
param set MIS_TAKEOFF_ALT 2.5
param set MC_PITCH_P 6
param set MC_PITCHRATE_P 0.2
param set MC_ROLL_P 6
param set MC_ROLLRATE_P 0.2
param set MPC_ALT_MODE 0
param set MPC_HOLD_MAX_Z 2
param set MPC_Z_VEL_I 0.15
param set MPC_Z_VEL_P 0.6
param set MPC_XY_P 0.8
param set MPC_XY_VEL_P 0.2
param set MPC_XY_VEL_I 0.02
param set MPC_XY_VEL_D 0.016
param set MPC_JERK_MIN 10
param set MPC_JERK_MAX 20
param set MPC_ACC_HOR_MAX 3
param set NAV_ACC_RAD 2
param set NAV_DLL_ACT 2
param set RTL_DESCEND_ALT 5
param set RTL_LAND_DELAY 5
param set RTL_RETURN_ALT 30
# By default log from boot until first disarm.
param set SDLOG_MODE 1
# enable default, estimator replay and vision/avoidance logging profiles
param set SDLOG_PROFILE 131
param set SDLOG_DIRS_MAX 7
param set SENS_BOARD_ROT 0
param set SENS_BOARD_X_OFF 0.000001
param set SENS_DPRES_OFF 0.001
param set SYS_RESTART_TYPE 2
param set WEST_EN 0
fi
# Adapt timeout parameters if simulation runs faster or slower than realtime.
if [ ! -z $PX4_SIM_SPEED_FACTOR ]; then
COM_DL_LOSS_T_LONGER=$((PX4_SIM_SPEED_FACTOR * 10))
echo "COM_DL_LOSS_T set to $COM_DL_LOSS_T_LONGER"
param set COM_DL_LOSS_T $COM_DL_LOSS_T_LONGER
COM_RC_LOSS_T_LONGER=$((PX4_SIM_SPEED_FACTOR * 1))
echo "COM_RC_LOSS_T set to $COM_RC_LOSS_T_LONGER"
param set COM_RC_LOSS_T $COM_RC_LOSS_T_LONGER
COM_OF_LOSS_T_LONGER=$((PX4_SIM_SPEED_FACTOR * 10))
echo "COM_OF_LOSS_T set to $COM_OF_LOSS_T_LONGER"
param set COM_OF_LOSS_T $COM_OF_LOSS_T_LONGER
fi
# Autostart ID
autostart_file=''
for f in etc/init.d-posix/"$(param show -q SYS_AUTOSTART)"_*
do
filename=$(basename "$f")
case "$filename" in
*\.*)
# ignore files that contain a dot (e.g. <vehicle>.post)
;;
*)
autostart_file="$f"
;;
esac
done
if [ ! -e "$autostart_file" ]; then
echo "Error: no autostart file found ($autostart_file)"
exit 1
fi
sh "$autostart_file"
dataman start
replay tryapplyparams
simulator start -c $simulator_tcp_port
tone_alarm start
gpssim start
sensors start
commander start
navigator start
if param compare WEST_EN 1
then
wind_estimator start
fi
if ! param compare MNT_MODE_IN -1
then
vmount start
fi
if param greater TRIG_MODE 0
then
camera_trigger start
camera_feedback start
fi
# Configure vehicle type specific parameters.
# Note: rc.vehicle_setup is the entry point for rc.interface,
# rc.fw_apps, rc.mc_apps, rc.rover_apps, and rc.vtol_apps.
#
sh etc/init.d/rc.vehicle_setup
# GCS link
mavlink start -x -u $udp_gcs_port_local -r 4000000
mavlink stream -r 50 -s POSITION_TARGET_LOCAL_NED -u $udp_gcs_port_local
mavlink stream -r 50 -s LOCAL_POSITION_NED -u $udp_gcs_port_local
mavlink stream -r 50 -s GLOBAL_POSITION_INT -u $udp_gcs_port_local
mavlink stream -r 50 -s ATTITUDE -u $udp_gcs_port_local
mavlink stream -r 50 -s ATTITUDE_QUATERNION -u $udp_gcs_port_local
mavlink stream -r 50 -s ATTITUDE_TARGET -u $udp_gcs_port_local
mavlink stream -r 50 -s SERVO_OUTPUT_RAW_0 -u $udp_gcs_port_local
mavlink stream -r 20 -s RC_CHANNELS -u $udp_gcs_port_local
mavlink stream -r 10 -s OPTICAL_FLOW_RAD -u $udp_gcs_port_local
# API/Offboard link
mavlink start -x -u $udp_offboard_port_local -r 4000000 -m onboard -o $udp_offboard_port_remote
# execute autostart post script if any
[ -e "$autostart_file".post ] && sh "$autostart_file".post
# Run script to start logging
sh etc/init.d/rc.logging
mavlink boot_complete
replay trystart Here are the SS's of GCS and Gazebo: And here is the output I get: ensasr@ensarspc:~/src/Firmware$ roslaunch px4 multi_plane_mavros_sitl.launch
... logging to /home/ensasr/.ros/log/f35a3bac-90df-11e9-82e6-5800e3df8d01/roslaunch-ensarspc-10440.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://ensarspc:44403/
SUMMARY
========
CLEAR PARAMETERS
* /uav0/mavros/
* /uav1/mavros/
PARAMETERS
* /gazebo/enable_ros_network: True
* /rosdistro: melodic
* /rosversion: 1.14.3
* /uav0/mavros/cmd/use_comp_id_system_control: False
* /uav0/mavros/conn/heartbeat_rate: 1.0
* /uav0/mavros/conn/system_time_rate: 1.0
* /uav0/mavros/conn/timeout: 10.0
* /uav0/mavros/conn/timesync_rate: 10.0
* /uav0/mavros/distance_sensor/hrlv_ez4_pub/field_of_view: 0.0
* /uav0/mavros/distance_sensor/hrlv_ez4_pub/frame_id: hrlv_ez4_sonar
* /uav0/mavros/distance_sensor/hrlv_ez4_pub/id: 0
* /uav0/mavros/distance_sensor/hrlv_ez4_pub/orientation: PITCH_270
* /uav0/mavros/distance_sensor/hrlv_ez4_pub/send_tf: True
* /uav0/mavros/distance_sensor/hrlv_ez4_pub/sensor_position/x: 0.0
* /uav0/mavros/distance_sensor/hrlv_ez4_pub/sensor_position/y: 0.0
* /uav0/mavros/distance_sensor/hrlv_ez4_pub/sensor_position/z: -0.1
* /uav0/mavros/distance_sensor/laser_1_sub/id: 3
* /uav0/mavros/distance_sensor/laser_1_sub/orientation: PITCH_270
* /uav0/mavros/distance_sensor/laser_1_sub/subscriber: True
* /uav0/mavros/distance_sensor/lidarlite_pub/field_of_view: 0.0
* /uav0/mavros/distance_sensor/lidarlite_pub/frame_id: lidarlite_laser
* /uav0/mavros/distance_sensor/lidarlite_pub/id: 1
* /uav0/mavros/distance_sensor/lidarlite_pub/orientation: PITCH_270
* /uav0/mavros/distance_sensor/lidarlite_pub/send_tf: True
* /uav0/mavros/distance_sensor/lidarlite_pub/sensor_position/x: 0.0
* /uav0/mavros/distance_sensor/lidarlite_pub/sensor_position/y: 0.0
* /uav0/mavros/distance_sensor/lidarlite_pub/sensor_position/z: -0.1
* /uav0/mavros/distance_sensor/sonar_1_sub/id: 2
* /uav0/mavros/distance_sensor/sonar_1_sub/orientation: PITCH_270
* /uav0/mavros/distance_sensor/sonar_1_sub/subscriber: True
* /uav0/mavros/fake_gps/eph: 2.0
* /uav0/mavros/fake_gps/epv: 2.0
* /uav0/mavros/fake_gps/fix_type: 3
* /uav0/mavros/fake_gps/geo_origin/alt: 408.0
* /uav0/mavros/fake_gps/geo_origin/lat: 47.3667
* /uav0/mavros/fake_gps/geo_origin/lon: 8.55
* /uav0/mavros/fake_gps/gps_rate: 5.0
* /uav0/mavros/fake_gps/mocap_transform: True
* /uav0/mavros/fake_gps/satellites_visible: 5
* /uav0/mavros/fake_gps/tf/child_frame_id: fix
* /uav0/mavros/fake_gps/tf/frame_id: map
* /uav0/mavros/fake_gps/tf/listen: False
* /uav0/mavros/fake_gps/tf/rate_limit: 10.0
* /uav0/mavros/fake_gps/tf/send: False
* /uav0/mavros/fake_gps/use_mocap: True
* /uav0/mavros/fake_gps/use_vision: False
* /uav0/mavros/fcu_protocol: v2.0
* /uav0/mavros/fcu_url: udp://:14540@loca...
* /uav0/mavros/gcs_url:
* /uav0/mavros/global_position/child_frame_id: base_link
* /uav0/mavros/global_position/frame_id: map
* /uav0/mavros/global_position/gps_uere: 1.0
* /uav0/mavros/global_position/rot_covariance: 99999.0
* /uav0/mavros/global_position/tf/child_frame_id: base_link
* /uav0/mavros/global_position/tf/frame_id: map
* /uav0/mavros/global_position/tf/global_frame_id: earth
* /uav0/mavros/global_position/tf/send: False
* /uav0/mavros/global_position/use_relative_alt: True
* /uav0/mavros/image/frame_id: px4flow
* /uav0/mavros/imu/angular_velocity_stdev: 0.000349065850399
* /uav0/mavros/imu/frame_id: base_link
* /uav0/mavros/imu/linear_acceleration_stdev: 0.0003
* /uav0/mavros/imu/magnetic_stdev: 0.0
* /uav0/mavros/imu/orientation_stdev: 1.0
* /uav0/mavros/landing_target/camera/fov_x: 2.0071286398
* /uav0/mavros/landing_target/camera/fov_y: 2.0071286398
* /uav0/mavros/landing_target/image/height: 480
* /uav0/mavros/landing_target/image/width: 640
* /uav0/mavros/landing_target/land_target_type: VISION_FIDUCIAL
* /uav0/mavros/landing_target/listen_lt: False
* /uav0/mavros/landing_target/mav_frame: LOCAL_NED
* /uav0/mavros/landing_target/target_size/x: 0.3
* /uav0/mavros/landing_target/target_size/y: 0.3
* /uav0/mavros/landing_target/tf/child_frame_id: camera_center
* /uav0/mavros/landing_target/tf/frame_id: landing_target
* /uav0/mavros/landing_target/tf/listen: False
* /uav0/mavros/landing_target/tf/rate_limit: 10.0
* /uav0/mavros/landing_target/tf/send: True
* /uav0/mavros/local_position/frame_id: map
* /uav0/mavros/local_position/tf/child_frame_id: base_link
* /uav0/mavros/local_position/tf/frame_id: map
* /uav0/mavros/local_position/tf/send: False
* /uav0/mavros/local_position/tf/send_fcu: False
* /uav0/mavros/mission/pull_after_gcs: True
* /uav0/mavros/mocap/use_pose: True
* /uav0/mavros/mocap/use_tf: False
* /uav0/mavros/odometry/in/child_frame_id: base_link
* /uav0/mavros/odometry/in/frame_id: odom
* /uav0/mavros/odometry/in/frame_tf/body_frame_orientation: flu
* /uav0/mavros/odometry/in/frame_tf/local_frame: local_origin_ned
* /uav0/mavros/odometry/out/frame_tf/body_frame_orientation: frd
* /uav0/mavros/odometry/out/frame_tf/local_frame: vision_ned
* /uav0/mavros/plugin_blacklist: ['safety_area', '...
* /uav0/mavros/plugin_whitelist: []
* /uav0/mavros/px4flow/frame_id: px4flow
* /uav0/mavros/px4flow/ranger_fov: 0.118682389136
* /uav0/mavros/px4flow/ranger_max_range: 5.0
* /uav0/mavros/px4flow/ranger_min_range: 0.3
* /uav0/mavros/safety_area/p1/x: 1.0
* /uav0/mavros/safety_area/p1/y: 1.0
* /uav0/mavros/safety_area/p1/z: 1.0
* /uav0/mavros/safety_area/p2/x: -1.0
* /uav0/mavros/safety_area/p2/y: -1.0
* /uav0/mavros/safety_area/p2/z: -1.0
* /uav0/mavros/setpoint_accel/send_force: False
* /uav0/mavros/setpoint_attitude/reverse_thrust: False
* /uav0/mavros/setpoint_attitude/tf/child_frame_id: target_attitude
* /uav0/mavros/setpoint_attitude/tf/frame_id: map
* /uav0/mavros/setpoint_attitude/tf/listen: False
* /uav0/mavros/setpoint_attitude/tf/rate_limit: 50.0
* /uav0/mavros/setpoint_attitude/use_quaternion: False
* /uav0/mavros/setpoint_position/mav_frame: LOCAL_NED
* /uav0/mavros/setpoint_position/tf/child_frame_id: target_position
* /uav0/mavros/setpoint_position/tf/frame_id: map
* /uav0/mavros/setpoint_position/tf/listen: False
* /uav0/mavros/setpoint_position/tf/rate_limit: 50.0
* /uav0/mavros/setpoint_raw/thrust_scaling: 1.0
* /uav0/mavros/setpoint_velocity/mav_frame: LOCAL_NED
* /uav0/mavros/startup_px4_usb_quirk: True
* /uav0/mavros/sys/disable_diag: False
* /uav0/mavros/sys/min_voltage: 10.0
* /uav0/mavros/target_component_id: 1
* /uav0/mavros/target_system_id: 1
* /uav0/mavros/tdr_radio/low_rssi: 40
* /uav0/mavros/time/time_ref_source: fcu
* /uav0/mavros/time/timesync_avg_alpha: 0.6
* /uav0/mavros/time/timesync_mode: MAVLINK
* /uav0/mavros/vibration/frame_id: base_link
* /uav0/mavros/vision_pose/tf/child_frame_id: vision_estimate
* /uav0/mavros/vision_pose/tf/frame_id: map
* /uav0/mavros/vision_pose/tf/listen: False
* /uav0/mavros/vision_pose/tf/rate_limit: 10.0
* /uav0/mavros/vision_speed/listen_twist: True
* /uav0/mavros/vision_speed/twist_cov: True
* /uav0/mavros/wheel_odometry/child_frame_id: base_link
* /uav0/mavros/wheel_odometry/count: 2
* /uav0/mavros/wheel_odometry/frame_id: map
* /uav0/mavros/wheel_odometry/send_raw: True
* /uav0/mavros/wheel_odometry/send_twist: False
* /uav0/mavros/wheel_odometry/tf/child_frame_id: base_link
* /uav0/mavros/wheel_odometry/tf/frame_id: map
* /uav0/mavros/wheel_odometry/tf/send: True
* /uav0/mavros/wheel_odometry/use_rpm: False
* /uav0/mavros/wheel_odometry/vel_error: 0.1
* /uav0/mavros/wheel_odometry/wheel0/radius: 0.05
* /uav0/mavros/wheel_odometry/wheel0/x: 0.0
* /uav0/mavros/wheel_odometry/wheel0/y: -0.15
* /uav0/mavros/wheel_odometry/wheel1/radius: 0.05
* /uav0/mavros/wheel_odometry/wheel1/x: 0.0
* /uav0/mavros/wheel_odometry/wheel1/y: 0.15
* /uav1/mavros/cmd/use_comp_id_system_control: False
* /uav1/mavros/conn/heartbeat_rate: 1.0
* /uav1/mavros/conn/system_time_rate: 1.0
* /uav1/mavros/conn/timeout: 10.0
* /uav1/mavros/conn/timesync_rate: 10.0
* /uav1/mavros/distance_sensor/hrlv_ez4_pub/field_of_view: 0.0
* /uav1/mavros/distance_sensor/hrlv_ez4_pub/frame_id: hrlv_ez4_sonar
* /uav1/mavros/distance_sensor/hrlv_ez4_pub/id: 0
* /uav1/mavros/distance_sensor/hrlv_ez4_pub/orientation: PITCH_270
* /uav1/mavros/distance_sensor/hrlv_ez4_pub/send_tf: True
* /uav1/mavros/distance_sensor/hrlv_ez4_pub/sensor_position/x: 0.0
* /uav1/mavros/distance_sensor/hrlv_ez4_pub/sensor_position/y: 0.0
* /uav1/mavros/distance_sensor/hrlv_ez4_pub/sensor_position/z: -0.1
* /uav1/mavros/distance_sensor/laser_1_sub/id: 3
* /uav1/mavros/distance_sensor/laser_1_sub/orientation: PITCH_270
* /uav1/mavros/distance_sensor/laser_1_sub/subscriber: True
* /uav1/mavros/distance_sensor/lidarlite_pub/field_of_view: 0.0
* /uav1/mavros/distance_sensor/lidarlite_pub/frame_id: lidarlite_laser
* /uav1/mavros/distance_sensor/lidarlite_pub/id: 1
* /uav1/mavros/distance_sensor/lidarlite_pub/orientation: PITCH_270
* /uav1/mavros/distance_sensor/lidarlite_pub/send_tf: True
* /uav1/mavros/distance_sensor/lidarlite_pub/sensor_position/x: 0.0
* /uav1/mavros/distance_sensor/lidarlite_pub/sensor_position/y: 0.0
* /uav1/mavros/distance_sensor/lidarlite_pub/sensor_position/z: -0.1
* /uav1/mavros/distance_sensor/sonar_1_sub/id: 2
* /uav1/mavros/distance_sensor/sonar_1_sub/orientation: PITCH_270
* /uav1/mavros/distance_sensor/sonar_1_sub/subscriber: True
* /uav1/mavros/fake_gps/eph: 2.0
* /uav1/mavros/fake_gps/epv: 2.0
* /uav1/mavros/fake_gps/fix_type: 3
* /uav1/mavros/fake_gps/geo_origin/alt: 408.0
* /uav1/mavros/fake_gps/geo_origin/lat: 47.3667
* /uav1/mavros/fake_gps/geo_origin/lon: 8.55
* /uav1/mavros/fake_gps/gps_rate: 5.0
* /uav1/mavros/fake_gps/mocap_transform: True
* /uav1/mavros/fake_gps/satellites_visible: 5
* /uav1/mavros/fake_gps/tf/child_frame_id: fix
* /uav1/mavros/fake_gps/tf/frame_id: map
* /uav1/mavros/fake_gps/tf/listen: False
* /uav1/mavros/fake_gps/tf/rate_limit: 10.0
* /uav1/mavros/fake_gps/tf/send: False
* /uav1/mavros/fake_gps/use_mocap: True
* /uav1/mavros/fake_gps/use_vision: False
* /uav1/mavros/fcu_protocol: v2.0
* /uav1/mavros/fcu_url: udp://:14541@loca...
* /uav1/mavros/gcs_url:
* /uav1/mavros/global_position/child_frame_id: base_link
* /uav1/mavros/global_position/frame_id: map
* /uav1/mavros/global_position/gps_uere: 1.0
* /uav1/mavros/global_position/rot_covariance: 99999.0
* /uav1/mavros/global_position/tf/child_frame_id: base_link
* /uav1/mavros/global_position/tf/frame_id: map
* /uav1/mavros/global_position/tf/global_frame_id: earth
* /uav1/mavros/global_position/tf/send: False
* /uav1/mavros/global_position/use_relative_alt: True
* /uav1/mavros/image/frame_id: px4flow
* /uav1/mavros/imu/angular_velocity_stdev: 0.000349065850399
* /uav1/mavros/imu/frame_id: base_link
* /uav1/mavros/imu/linear_acceleration_stdev: 0.0003
* /uav1/mavros/imu/magnetic_stdev: 0.0
* /uav1/mavros/imu/orientation_stdev: 1.0
* /uav1/mavros/landing_target/camera/fov_x: 2.0071286398
* /uav1/mavros/landing_target/camera/fov_y: 2.0071286398
* /uav1/mavros/landing_target/image/height: 480
* /uav1/mavros/landing_target/image/width: 640
* /uav1/mavros/landing_target/land_target_type: VISION_FIDUCIAL
* /uav1/mavros/landing_target/listen_lt: False
* /uav1/mavros/landing_target/mav_frame: LOCAL_NED
* /uav1/mavros/landing_target/target_size/x: 0.3
* /uav1/mavros/landing_target/target_size/y: 0.3
* /uav1/mavros/landing_target/tf/child_frame_id: camera_center
* /uav1/mavros/landing_target/tf/frame_id: landing_target
* /uav1/mavros/landing_target/tf/listen: False
* /uav1/mavros/landing_target/tf/rate_limit: 10.0
* /uav1/mavros/landing_target/tf/send: True
* /uav1/mavros/local_position/frame_id: map
* /uav1/mavros/local_position/tf/child_frame_id: base_link
* /uav1/mavros/local_position/tf/frame_id: map
* /uav1/mavros/local_position/tf/send: False
* /uav1/mavros/local_position/tf/send_fcu: False
* /uav1/mavros/mission/pull_after_gcs: True
* /uav1/mavros/mocap/use_pose: True
* /uav1/mavros/mocap/use_tf: False
* /uav1/mavros/odometry/in/child_frame_id: base_link
* /uav1/mavros/odometry/in/frame_id: odom
* /uav1/mavros/odometry/in/frame_tf/body_frame_orientation: flu
* /uav1/mavros/odometry/in/frame_tf/local_frame: local_origin_ned
* /uav1/mavros/odometry/out/frame_tf/body_frame_orientation: frd
* /uav1/mavros/odometry/out/frame_tf/local_frame: vision_ned
* /uav1/mavros/plugin_blacklist: ['safety_area', '...
* /uav1/mavros/plugin_whitelist: []
* /uav1/mavros/px4flow/frame_id: px4flow
* /uav1/mavros/px4flow/ranger_fov: 0.118682389136
* /uav1/mavros/px4flow/ranger_max_range: 5.0
* /uav1/mavros/px4flow/ranger_min_range: 0.3
* /uav1/mavros/safety_area/p1/x: 1.0
* /uav1/mavros/safety_area/p1/y: 1.0
* /uav1/mavros/safety_area/p1/z: 1.0
* /uav1/mavros/safety_area/p2/x: -1.0
* /uav1/mavros/safety_area/p2/y: -1.0
* /uav1/mavros/safety_area/p2/z: -1.0
* /uav1/mavros/setpoint_accel/send_force: False
* /uav1/mavros/setpoint_attitude/reverse_thrust: False
* /uav1/mavros/setpoint_attitude/tf/child_frame_id: target_attitude
* /uav1/mavros/setpoint_attitude/tf/frame_id: map
* /uav1/mavros/setpoint_attitude/tf/listen: False
* /uav1/mavros/setpoint_attitude/tf/rate_limit: 50.0
* /uav1/mavros/setpoint_attitude/use_quaternion: False
* /uav1/mavros/setpoint_position/mav_frame: LOCAL_NED
* /uav1/mavros/setpoint_position/tf/child_frame_id: target_position
* /uav1/mavros/setpoint_position/tf/frame_id: map
* /uav1/mavros/setpoint_position/tf/listen: False
* /uav1/mavros/setpoint_position/tf/rate_limit: 50.0
* /uav1/mavros/setpoint_raw/thrust_scaling: 1.0
* /uav1/mavros/setpoint_velocity/mav_frame: LOCAL_NED
* /uav1/mavros/startup_px4_usb_quirk: True
* /uav1/mavros/sys/disable_diag: False
* /uav1/mavros/sys/min_voltage: 10.0
* /uav1/mavros/target_component_id: 1
* /uav1/mavros/target_system_id: 2
* /uav1/mavros/tdr_radio/low_rssi: 40
* /uav1/mavros/time/time_ref_source: fcu
* /uav1/mavros/time/timesync_avg_alpha: 0.6
* /uav1/mavros/time/timesync_mode: MAVLINK
* /uav1/mavros/vibration/frame_id: base_link
* /uav1/mavros/vision_pose/tf/child_frame_id: vision_estimate
* /uav1/mavros/vision_pose/tf/frame_id: map
* /uav1/mavros/vision_pose/tf/listen: False
* /uav1/mavros/vision_pose/tf/rate_limit: 10.0
* /uav1/mavros/vision_speed/listen_twist: True
* /uav1/mavros/vision_speed/twist_cov: True
* /uav1/mavros/wheel_odometry/child_frame_id: base_link
* /uav1/mavros/wheel_odometry/count: 2
* /uav1/mavros/wheel_odometry/frame_id: map
* /uav1/mavros/wheel_odometry/send_raw: True
* /uav1/mavros/wheel_odometry/send_twist: False
* /uav1/mavros/wheel_odometry/tf/child_frame_id: base_link
* /uav1/mavros/wheel_odometry/tf/frame_id: map
* /uav1/mavros/wheel_odometry/tf/send: True
* /uav1/mavros/wheel_odometry/use_rpm: False
* /uav1/mavros/wheel_odometry/vel_error: 0.1
* /uav1/mavros/wheel_odometry/wheel0/radius: 0.05
* /uav1/mavros/wheel_odometry/wheel0/x: 0.0
* /uav1/mavros/wheel_odometry/wheel0/y: -0.15
* /uav1/mavros/wheel_odometry/wheel1/radius: 0.05
* /uav1/mavros/wheel_odometry/wheel1/x: 0.0
* /uav1/mavros/wheel_odometry/wheel1/y: 0.15
* /use_sim_time: True
NODES
/uav1/
mavros (mavros/mavros_node)
plane_1_spawn (gazebo_ros/spawn_model)
sitl_1 (px4/px4)
/uav0/
mavros (mavros/mavros_node)
plane_0_spawn (gazebo_ros/spawn_model)
sitl_0 (px4/px4)
/
gazebo (gazebo_ros/gzserver)
gazebo_gui (gazebo_ros/gzclient)
auto-starting new master
process[master]: started with pid [10450]
ROS_MASTER_URI=http://localhost:11311
setting /run_id to f35a3bac-90df-11e9-82e6-5800e3df8d01
process[rosout-1]: started with pid [10461]
started core service [/rosout]
process[gazebo-2]: started with pid [10469]
process[gazebo_gui-3]: started with pid [10474]
process[uav0/sitl_0-4]: started with pid [10483]
INFO [px4] Creating symlink /home/ensasr/src/Firmware/ROMFS/px4fmu_common -> /home/ensasr/.ros/etc
______ __ __ ___
| ___ \ \ \ / / / |
| |_/ / \ V / / /| |
| __/ / \ / /_| |
| | / /^\ \ \___ |
\_| \/ \/ |_/
px4 starting.
INFO [px4] Calling startup script: /bin/sh etc/init.d-posix/rcS 0
0 WARNING: setRealtimeSched failed (not run as root?)
process[uav0/plane_0_spawn-5]: started with pid [10501]
process[uav0/mavros-6]: started with pid [10503]
+ MAV_SYS_ID: curr: 3 -> new: 1
+ SYS_AUTOSTART: curr: 10016 -> new: 1030
[ INFO] [1560762715.915163369]: FCU URL: udp://:14540@localhost:14580
[ INFO] [1560762715.921379083]: udp0: Bind address: 0.0.0.0:14540
[ INFO] [1560762715.921722556]: udp0: Remote address: 127.0.0.1:14580
[ INFO] [1560762715.922185713]: GCS bridge disabled
[ INFO] [1560762715.950915886]: Plugin 3dr_radio loaded
[ INFO] [1560762715.969831765]: Plugin 3dr_radio initialized
[ INFO] [1560762715.970051288]: Plugin actuator_control loaded
[ INFO] [1560762715.976275785]: Plugin actuator_control initialized
[ INFO] [1560762715.993933976]: Plugin adsb loaded
[ INFO] [1560762715.998215039]: Plugin adsb initialized
[ INFO] [1560762715.998575636]: Plugin altitude loaded
[ INFO] [1560762716.000081377]: Plugin altitude initialized
[ INFO] [1560762716.000488161]: Plugin cam_imu_sync loaded
[ INFO] [1560762716.001654700]: Plugin cam_imu_sync initialized
[ INFO] [1560762716.002106003]: Plugin command loaded
[ INFO] [1560762716.012072820]: Plugin command initialized
[ INFO] [1560762716.012569017]: Plugin companion_process_status loaded
[ INFO] [1560762716.015636366]: Plugin companion_process_status initialized
[ INFO] [1560762716.016109336]: Plugin debug_value loaded
+ RTL_DESCEND_ALT: curr: 10.0000 -> new: 5.0000
[ INFO] [1560762716.022442792]: Plugin debug_value initialized
+ RTL_LAND_DELAY: curr: 0.0000 -> new: 5.0000
[ INFO] [1560762716.022866544]: Plugin distance_sensor blacklisted
[ INFO] [1560762716.023337354]: Plugin fake_gps loaded
[ INFO] [1560762716.039423847]: Plugin fake_gps initialized
[ INFO] [1560762716.039909699]: Plugin ftp loaded
[ INFO] [1560762716.051255753]: Plugin ftp initialized
[ INFO] [1560762716.051583789]: Plugin global_position loaded
[ INFO] [1560762716.074733047]: Plugin global_position initialized
[ INFO] [1560762716.075019210]: Plugin gps_rtk loaded
[ INFO] [1560762716.078041223]: Plugin gps_rtk initialized
[ INFO] [1560762716.078378668]: Plugin hil loaded
process[uav1/sitl_1-7]: started with pid [10690]
INFO [px4] Creating symlink /home/ensasr/src/Firmware/ROMFS/px4fmu_common -> /home/ensasr/.ros/etc
0 WARNING: setRealtimeSched failed (not run as root?)
______ __ __ ___
| ___ \ \ \ / / / |
| |_/ / \ V / / /| |
| __/ / \ / /_| |
| | / /^\ \ \___ |
\_| \/ \/ |_/
px4 starting.
INFO [px4] Calling startup script: /bin/sh etc/init.d-posix/rcS 1
[ INFO] [1560762716.118414524]: Plugin hil initialized
[ INFO] [1560762716.118764214]: Plugin home_position loaded
process[uav1/plane_1_spawn-8]: started with pid [10705]
[ INFO] [1560762716.124161838]: Plugin home_position initialized
[ INFO] [1560762716.124513588]: Plugin imu loaded
process[uav1/mavros-9]: started with pid [10716]
[ INFO] [1560762716.154148015]: Plugin imu initialized
[ INFO] [1560762716.154542333]: Plugin landing_target loaded
+ RTL_RETURN_ALT: curr: 30.0000 -> new: 100.0000
* RTL_DESCEND_ALT: curr: 5.0000 -> new: 100.0000
* RTL_LAND_DELAY: curr: 5.0000 -> new: -1.0000
+ NAV_ACC_RAD: curr: 2.0000 -> new: 10.0000
+ MIS_LTRMIN_ALT: curr: 30.0000 -> new: 25.0000
+ MIS_TAKEOFF_ALT: curr: 2.5000 -> new: 25.0000
+ PWM_RATE: curr: 400 -> new: 50
+ MAV_SYS_ID: curr: 3 -> new: 2
+ SYS_AUTOSTART: curr: 10016 -> new: 1030
[ INFO] [1560762716.228293181]: Plugin landing_target initialized
[ INFO] [1560762716.228634169]: Plugin local_position loaded
[ INFO] [1560762716.255666646]: Plugin local_position initialized
[ INFO] [1560762716.256024508]: Plugin log_transfer loaded
[ INFO] [1560762716.264908678]: Plugin log_transfer initialized
[ INFO] [1560762716.265379282]: Plugin manual_control loaded
[ INFO] [1560762716.275330479]: Plugin manual_control initialized
[ INFO] [1560762716.275722239]: Plugin mocap_pose_estimate loaded
[ INFO] [1560762716.282562273]: Plugin mocap_pose_estimate initialized
[ INFO] [1560762716.282975823]: Plugin obstacle_distance loaded
* MIS_LTRMIN_ALT: curr: 25.0000 -> new: 30.0000
* MIS_TAKEOFF_ALT: curr: 25.0000 -> new: 30.0000
* NAV_ACC_RAD: curr: 10.0000 -> new: 15.0000
[ INFO] [1560762716.305130773]: Plugin obstacle_distance initialized
[ INFO] [1560762716.305553425]: Plugin odom loaded
+ WEST_EN: curr: 0 -> new: 1
[ INFO] [1560762716.330326256]: Finished loading Gazebo ROS API Plugin.
INFO [dataman] Unknown restart, data manager file './dataman' size is 11798680 bytes
INFO [simulator] Waiting for simulator to connect on TCP port 4560
[ INFO] [1560762716.353557038]: waitForService: Service [/gazebo/set_physics_properties] has not been advertised, waiting...
[ INFO] [1560762716.360605631]: Plugin odom initialized
[ INFO] [1560762716.361009841]: Plugin param loaded
[ INFO] [1560762716.371421508]: Plugin param initialized
[ INFO] [1560762716.371645687]: Plugin px4flow loaded
[ INFO] [1560762716.395225303]: Plugin px4flow initialized
[ INFO] [1560762716.395409258]: Plugin rangefinder blacklisted
[ INFO] [1560762716.395722139]: Plugin rc_io loaded
[ INFO] [1560762716.426134451]: Plugin rc_io initialized
[ INFO] [1560762716.426296970]: Plugin safety_area blacklisted
[ INFO] [1560762716.426545094]: Plugin setpoint_accel loaded
[ INFO] [1560762716.434393063]: Plugin setpoint_accel initialized
[ INFO] [1560762716.434995616]: Plugin setpoint_attitude loaded
+ RTL_DESCEND_ALT: curr: 10.0000 -> new: 5.0000
[ INFO] [1560762716.468293631]: Plugin setpoint_attitude initialized
[ INFO] [1560762716.468585562]: Plugin setpoint_position loaded
+ RTL_LAND_DELAY: curr: 0.0000 -> new: 5.0000
[ INFO] [1560762716.479412087]: Finished loading Gazebo ROS API Plugin.
[ INFO] [1560762716.494415127]: waitForService: Service [/gazebo_gui/set_physics_properties] has not been advertised, waiting...
[ INFO] [1560762716.515162489]: Plugin setpoint_position initialized
[ INFO] [1560762716.515398696]: Plugin setpoint_raw loaded
[ INFO] [1560762716.524419366]: FCU URL: udp://:14541@localhost:14581
[ INFO] [1560762716.529347134]: udp0: Bind address: 0.0.0.0:14541
[ INFO] [1560762716.529555210]: udp0: Remote address: 127.0.0.1:14581
[ INFO] [1560762716.529962341]: GCS bridge disabled
[ INFO] [1560762716.545762731]: Plugin setpoint_raw initialized
[ INFO] [1560762716.546090843]: Plugin setpoint_velocity loaded
[ INFO] [1560762716.556605733]: Plugin setpoint_velocity initialized
[ INFO] [1560762716.557237151]: Plugin sys_status loaded
[ INFO] [1560762716.567254155]: Plugin 3dr_radio loaded
[ INFO] [1560762716.578539641]: Plugin 3dr_radio initialized
[ INFO] [1560762716.578720251]: Plugin actuator_control loaded
[ INFO] [1560762716.589878485]: Plugin actuator_control initialized
[ INFO] [1560762716.599046633]: Plugin adsb loaded
[ INFO] [1560762716.603792190]: Plugin sys_status initialized
[ INFO] [1560762716.604258636]: Plugin sys_time loaded
+ RTL_RETURN_ALT: curr: 30.0000 -> new: 100.0000
* RTL_DESCEND_ALT: curr: 5.0000 -> new: 100.0000
[ INFO] [1560762716.610575704]: Plugin adsb initialized
[ INFO] [1560762716.610821481]: Plugin altitude loaded
[ INFO] [1560762716.614233022]: Plugin altitude initialized
[ INFO] [1560762716.614483776]: Plugin cam_imu_sync loaded
[ INFO] [1560762716.615910068]: Plugin cam_imu_sync initialized
[ INFO] [1560762716.616237557]: Plugin command loaded
* RTL_LAND_DELAY: curr: 5.0000 -> new: -1.0000
+ NAV_ACC_RAD: curr: 2.0000 -> new: 10.0000
+ MIS_LTRMIN_ALT: curr: 30.0000 -> new: 25.0000
+ MIS_TAKEOFF_ALT: curr: 2.5000 -> new: 25.0000
[ INFO] [1560762716.640441967]: TM: Timesync mode: MAVLINK
+ PWM_RATE: curr: 400 -> new: 50
[ INFO] [1560762716.642515020]: Plugin command initialized
[ INFO] [1560762716.642763297]: Plugin companion_process_status loaded
[ INFO] [1560762716.644415434]: Plugin sys_time initialized
[ INFO] [1560762716.644714318]: Plugin trajectory loaded
[ INFO] [1560762716.655243753]: Plugin companion_process_status initialized
[ INFO] [1560762716.655476381]: Plugin debug_value loaded
[ INFO] [1560762716.671457759]: Plugin trajectory initialized
[ INFO] [1560762716.671977947]: Plugin vfr_hud loaded
[ INFO] [1560762716.674426353]: Plugin vfr_hud initialized
[ INFO] [1560762716.674574039]: Plugin vibration blacklisted
[ INFO] [1560762716.674816308]: Plugin vision_pose_estimate loaded
[ INFO] [1560762716.682843037]: Plugin debug_value initialized
[ INFO] [1560762716.682932089]: Plugin distance_sensor blacklisted
[ INFO] [1560762716.683265805]: Plugin fake_gps loaded
[ INFO] [1560762716.722741284]: Plugin vision_pose_estimate initialized
[ INFO] [1560762716.723224002]: Plugin vision_speed_estimate loaded
* MIS_LTRMIN_ALT: curr: 25.0000 -> new: 30.0000
* MIS_TAKEOFF_ALT: curr: 25.0000 -> new: 30.0000
* NAV_ACC_RAD: curr: 10.0000 -> new: 15.0000
[ INFO] [1560762716.740799483]: Plugin vision_speed_estimate initialized
[ INFO] [1560762716.741176216]: Plugin waypoint loaded
[ INFO] [1560762716.744593258]: Plugin fake_gps initialized
[ INFO] [1560762716.745020243]: Plugin ftp loaded
+ WEST_EN: curr: 0 -> new: 1
INFO [dataman] Unknown restart, data manager file './dataman' size is 11798680 bytes
[ INFO] [1560762716.764868147]: Plugin waypoint initialized
[ INFO] [1560762716.765062755]: Plugin wheel_odometry blacklisted
[ INFO] [1560762716.765326634]: Plugin wind_estimation loaded
[ INFO] [1560762716.766427420]: Plugin wind_estimation initialized
[ INFO] [1560762716.766610431]: Autostarting mavlink via USB on PX4
[ INFO] [1560762716.766864404]: Built-in SIMD instructions: SSE, SSE2
[ INFO] [1560762716.766972977]: Built-in MAVLink package version: 2019.6.7
[ INFO] [1560762716.767073542]: Known MAVLink dialects: common ardupilotmega ASLUAV autoquad icarous matrixpilot paparazzi slugs standard uAvionix ualberta
[ INFO] [1560762716.767167031]: MAVROS started. MY ID 1.240, TARGET ID 1.1
INFO [simulator] Waiting for simulator to connect on TCP port 4561
[ INFO] [1560762716.776731159]: Plugin ftp initialized
[ INFO] [1560762716.777063738]: Plugin global_position loaded
[ INFO] [1560762716.807281482]: Plugin global_position initialized
[ INFO] [1560762716.807616500]: Plugin gps_rtk loaded
[ INFO] [1560762716.811375846]: Plugin gps_rtk initialized
[ INFO] [1560762716.811745786]: Plugin hil loaded
[ INFO] [1560762716.838269548]: Plugin hil initialized
[ INFO] [1560762716.838669957]: Plugin home_position loaded
[ INFO] [1560762716.846242118]: Plugin home_position initialized
[ INFO] [1560762716.846562637]: Plugin imu loaded
[ INFO] [1560762716.864360993]: Plugin imu initialized
[ INFO] [1560762716.864670738]: Plugin landing_target loaded
[ INFO] [1560762716.888080517]: Plugin landing_target initialized
[ INFO] [1560762716.888416908]: Plugin local_position loaded
[ INFO] [1560762716.900853898]: Plugin local_position initialized
[ INFO] [1560762716.901158523]: Plugin log_transfer loaded
[ INFO] [1560762716.911001448]: Plugin log_transfer initialized
[ INFO] [1560762716.911347960]: Plugin manual_control loaded
[ INFO] [1560762716.920013319]: Plugin manual_control initialized
[ INFO] [1560762716.920322756]: Plugin mocap_pose_estimate loaded
[ INFO] [1560762716.924610916]: Plugin mocap_pose_estimate initialized
[ INFO] [1560762716.924935932]: Plugin obstacle_distance loaded
[ INFO] [1560762716.927891020]: Plugin obstacle_distance initialized
[ INFO] [1560762716.928214384]: Plugin odom loaded
[ INFO] [1560762716.940436583]: Plugin odom initialized
[ INFO] [1560762716.940810602]: Plugin param loaded
[ INFO] [1560762716.945961031]: Plugin param initialized
[ INFO] [1560762716.946318717]: Plugin px4flow loaded
[ INFO] [1560762716.963088854]: Plugin px4flow initialized
[ INFO] [1560762716.963260165]: Plugin rangefinder blacklisted
[ INFO] [1560762716.963557927]: Plugin rc_io loaded
[ INFO] [1560762716.968657803]: Plugin rc_io initialized
[ INFO] [1560762716.968858363]: Plugin safety_area blacklisted
[ INFO] [1560762716.969116097]: Plugin setpoint_accel loaded
[ INFO] [1560762716.972851916]: Plugin setpoint_accel initialized
[ INFO] [1560762716.973341950]: Plugin setpoint_attitude loaded
[ INFO] [1560762716.987213218]: Plugin setpoint_attitude initialized
[ INFO] [1560762716.987565903]: Plugin setpoint_position loaded
[ INFO] [1560762717.003390906]: Plugin setpoint_position initialized
[ INFO] [1560762717.003634713]: Plugin setpoint_raw loaded
[ INFO] [1560762717.016981073]: Plugin setpoint_raw initialized
[ INFO] [1560762717.017234351]: Plugin setpoint_velocity loaded
[ INFO] [1560762717.024963153]: Plugin setpoint_velocity initialized
[ INFO] [1560762717.025448817]: Plugin sys_status loaded
[ INFO] [1560762717.040577938]: Plugin sys_status initialized
[ INFO] [1560762717.040846482]: Plugin sys_time loaded
[ INFO] [1560762717.047790985]: TM: Timesync mode: MAVLINK
[ INFO] [1560762717.049691468]: Plugin sys_time initialized
[ INFO] [1560762717.049906124]: Plugin trajectory loaded
[ INFO] [1560762717.056796146]: Plugin trajectory initialized
[ INFO] [1560762717.057020707]: Plugin vfr_hud loaded
[ INFO] [1560762717.057986430]: Plugin vfr_hud initialized
[ INFO] [1560762717.058041346]: Plugin vibration blacklisted
[ INFO] [1560762717.058235335]: Plugin vision_pose_estimate loaded
[ INFO] [1560762717.066774019]: Plugin vision_pose_estimate initialized
[ INFO] [1560762717.066997924]: Plugin vision_speed_estimate loaded
[ INFO] [1560762717.072690486]: Plugin vision_speed_estimate initialized
[ INFO] [1560762717.072950631]: Plugin waypoint loaded
[ INFO] [1560762717.079545325]: Plugin waypoint initialized
[ INFO] [1560762717.079606812]: Plugin wheel_odometry blacklisted
[ INFO] [1560762717.079805994]: Plugin wind_estimation loaded
[ INFO] [1560762717.080918153]: Plugin wind_estimation initialized
[ INFO] [1560762717.081004292]: Autostarting mavlink via USB on PX4
[ INFO] [1560762717.081182539]: Built-in SIMD instructions: SSE, SSE2
[ INFO] [1560762717.081208214]: Built-in MAVLink package version: 2019.6.7
[ INFO] [1560762717.081237568]: Known MAVLink dialects: common ardupilotmega ASLUAV autoquad icarous matrixpilot paparazzi slugs standard uAvionix ualberta
[ INFO] [1560762717.081262432]: MAVROS started. MY ID 1.240, TARGET ID 2.1
[INFO] [1560762717.105256, 0.000000]: Loading model XML from file /home/ensasr/src/Firmware/Tools/sitl_gazebo/models/plane/plane0.sdf
[INFO] [1560762717.120272, 0.000000]: Waiting for service /gazebo/spawn_sdf_model
[ INFO] [1560762717.208183971, 0.024000000]: waitForService: Service [/gazebo/set_physics_properties] is now available.
[ INFO] [1560762717.267943825, 0.076000000]: Physics dynamic reconfigure ready.
INFO [px4_work_queue] creating: wq:hp_default, priority: 88, stack: 16384 bytes
INFO [commander] Mission #3 loaded, 7 WPs, curr: 0
INFO [px4_work_queue] creating: wq:lp_default, priority: 49, stack: 16384 bytes
+ MAV_TYPE: curr: 2 -> new: 1
INFO [init] Mixer: etc/mixers-sitl/plane_sitl.main.mix on /dev/pwm_output0
[INFO] [1560762717.425553, 0.232000]: Calling service /gazebo/spawn_sdf_model
INFO [mavlink] mode: Normal, data rate: 4000000 B/s on udp port 14570 remote port 14550
[INFO] [1560762717.482256, 0.000000]: Loading model XML from file /home/ensasr/src/Firmware/Tools/sitl_gazebo/models/plane/plane1.sdf
[INFO] [1560762717.496984, 0.000000]: Waiting for service /gazebo/spawn_sdf_model
[INFO] [1560762717.501318, 0.000000]: Calling service /gazebo/spawn_sdf_model
INFO [mavlink] mode: Onboard, data rate: 4000000 B/s on udp port 14580 remote port 14540
INFO [logger] logger started (mode=all)
INFO [logger] Start file log (type: full)
INFO [logger] Opened full log file: ./log/2019-06-17/09_11_57.ulg
INFO [mavlink] MAVLink only on localhost (set param MAV_BROADCAST = 1 to enable network)
[ INFO] [1560762717.609298119, 0.328000000]: udp0: Remote address: 127.0.0.1:14580
[ INFO] [1560762717.610554121, 0.328000000]: IMU: Scaled IMU message used.
[ INFO] [1560762717.611581717, 0.328000000]: CON: Got HEARTBEAT, connected. FCU: PX4 Autopilot
[ INFO] [1560762717.612696227, 0.328000000]: IMU: Scaled IMU message used.
INFO [px4] Startup script returned successfully
[INFO] [1560762717.641678, 0.328000]: Spawn status: SpawnModel: Successfully spawned entity
INFO [mavlink] partner IP: 127.0.0.1
INFO [px4_work_queue] creating: wq:hp_default, priority: 88, stack: 16384 bytes
INFO [commander] Mission #3 loaded, 7 WPs, curr: 0
INFO [px4_work_queue] creating: wq:lp_default, priority: 49, stack: 16384 bytes
+ MAV_TYPE: curr: 2 -> new: 1
INFO [init] Mixer: etc/mixers-sitl/plane_sitl.main.mix on /dev/pwm_output0
[uav0/plane_0_spawn-5] process has finished cleanly
log file: /home/ensasr/.ros/log/f35a3bac-90df-11e9-82e6-5800e3df8d01/uav0-plane_0_spawn-5*.log
INFO [mavlink] mode: Normal, data rate: 4000000 B/s on udp port 14571 remote port 14550
INFO [mavlink] mode: Onboard, data rate: 4000000 B/s on udp port 14581 remote port 14541
INFO [logger] logger started (mode=all)
INFO [logger] Start file log (type: full)
INFO [logger] Opened full log file: ./log/2019-06-17/09_11_58.ulg
INFO [mavlink] MAVLink only on localhost (set param MAV_BROADCAST = 1 to enable network)
[ INFO] [1560762718.237090280, 0.328000000]: udp0: Remote address: 127.0.0.1:14581
[ INFO] [1560762718.238774486, 0.328000000]: IMU: Scaled IMU message used.
[ INFO] [1560762718.239971887, 0.328000000]: CON: Got HEARTBEAT, connected. FCU: PX4 Autopilot
[ INFO] [1560762718.241162426, 0.328000000]: IMU: Scaled IMU message used.
INFO [px4] Startup script returned successfully
INFO [mavlink] partner IP: 127.0.0.1
INFO [simulator] Simulator connected on TCP port 4560.
[ INFO] [1560762718.362469390, 0.348000000]: IMU: High resolution IMU detected!
[INFO] [1560762718.617472, 0.532000]: Spawn status: SpawnModel: Successfully spawned entity
Aborted (core dumped)
[gazebo-2] process has died [pid 10469, exit code 134, cmd /opt/ros/melodic/lib/gazebo_ros/gzserver -e ode /home/ensasr/src/Firmware/Tools/sitl_gazebo/worlds/empty.world __name:=gazebo __log:=/home/ensasr/.ros/log/f35a3bac-90df-11e9-82e6-5800e3df8d01/gazebo-2.log].
log file: /home/ensasr/.ros/log/f35a3bac-90df-11e9-82e6-5800e3df8d01/gazebo-2*.log
[uav1/plane_1_spawn-8] process has finished cleanly
log file: /home/ensasr/.ros/log/f35a3bac-90df-11e9-82e6-5800e3df8d01/uav1-plane_1_spawn-8*.log
[gazebo-2] restarting process
process[gazebo-2]: started with pid [11389]
[ INFO] [1560762720.790869639]: waitForService: Service [/gazebo/set_physics_properties] has not been advertised, waiting...
[ INFO] [1560762720.792502647]: Finished loading Gazebo ROS API Plugin.
[ INFO] [1560762722.280828756, 0.032000000]: waitForService: Service [/gazebo/set_physics_properties] is now available.
ERROR [mavlink] [timesync] Time jump detected. Resetting time synchroniser.
[ INFO] [1560762722.388964631, 0.136000000]: Physics dynamic reconfigure ready.
[ INFO] [1560762723.362173759, 1.080000000]: VER: 1.1: Capabilities 0x000000000000e4ef
[ INFO] [1560762723.362264628, 1.080000000]: VER: 1.1: Flight software: 01090000 (7c4bf6ddae000000)
[ INFO] [1560762723.362305237, 1.080000000]: VER: 1.1: Middleware software: 01090000 (7c4bf6ddae000000)
[ INFO] [1560762723.362333678, 1.080000000]: VER: 1.1: OS software: 041200ff (0000000000000000)
[ INFO] [1560762723.362372095, 1.080000000]: VER: 1.1: Board hardware: 00000001
[ INFO] [1560762723.362401318, 1.080000000]: VER: 1.1: VID/PID: 0000:0000
[ INFO] [1560762723.362426373, 1.080000000]: VER: 1.1: UID: 4954414c44494e4f
[ INFO] [1560762723.380564444, 1.104000000]: VER: 2.1: Capabilities 0x000000000000e4ef
[ INFO] [1560762723.380699307, 1.104000000]: VER: 2.1: Flight software: 01090000 (7c4bf6ddae000000)
[ INFO] [1560762723.380755408, 1.104000000]: VER: 2.1: Middleware software: 01090000 (7c4bf6ddae000000)
[ INFO] [1560762723.380811915, 1.104000000]: VER: 2.1: OS software: 041200ff (0000000000000000)
[ INFO] [1560762723.380855437, 1.104000000]: VER: 2.1: Board hardware: 00000001
[ INFO] [1560762723.380960523, 1.104000000]: VER: 2.1: VID/PID: 0000:0000
[ INFO] [1560762723.381203828, 1.104000000]: VER: 2.1: UID: 4954414c44494e50
ERROR [mavlink] [timesync] Time jump detected. Resetting time synchroniser.
ERROR [mavlink] [timesync] Time jump detected. Resetting time synchroniser.
[ INFO] [1560762732.407825768, 10.080000000]: HP: requesting home position
[ INFO] [1560762732.407890063, 10.080000000]: HP: requesting home position
[ WARN] [1560762732.408214371, 10.080000000]: CON: Lost connection, HEARTBEAT timed out.
ERROR [mavlink] [timesync] Time jump detected. Resetting time synchroniser.
[ WARN] [1560762733.366480256, 11.080000000]: PR: request list timeout, retries left 2
[ WARN] [1560762733.367636897, 11.080000000]: PR: request list timeout, retries left 2
[ WARN] [1560762734.371060812, 12.080000000]: PR: request list timeout, retries left 1
[ WARN] [1560762734.374325985, 12.084000000]: PR: request list timeout, retries left 1
ERROR [mavlink] [timesync] Time jump detected. Resetting time synchroniser.
[ WARN] [1560762735.389957827, 13.080000000]: PR: request list timeout, retries left 0
[ WARN] [1560762735.394145495, 13.084000000]: PR: request list timeout, retries left 0
ERROR [mavlink] [timesync] Time jump detected. Resetting time synchroniser.
ERROR [mavlink] [timesync] Time jump detected. Resetting time synchroniser.
[ WARN] [1560762737.409811425, 15.092000000]: CMD: Command 410 -- wait ack timeout
[ WARN] [1560762737.411992786, 15.092000000]: CMD: Command 410 -- wait ack timeout
[ INFO] [1560762737.521048458, 15.204000000]: WP: item #0* F:3 C: 22 p: 15.000000 0.000000 0.000000 nan x: 47.397778 y: 8.547926 z: 50.000000
[ INFO] [1560762737.553205739, 15.220000000]: WP: item #1 F:2 C:189 p: 0.000000 0.000000 0.000000 0.000000 x: 0.000000 y: 0.000000 z: 0.000000
[ INFO] [1560762737.554546540, 15.220000000]: WP: item #2 F:2 C:206 p: 0.000000 0.000000 0.000000 0.000000 x: 0.000000 y: 0.000000 z: 0.000000
[ INFO] [1560762737.555992864, 15.220000000]: WP: item #3 F:2 C:2001 p: 0.000000 nan nan nan x: nan y: nan z: nan
[ INFO] [1560762737.556733339, 15.224000000]: WP: item #4 F:2 C:2501 p: 0.000000 nan nan nan x: nan y: nan z: nan
[ INFO] [1560762737.557260676, 15.224000000]: WP: item #5 F:3 C: 31 p: 1.000000 75.000000 0.000000 1.000000 x: 47.398418 y: 8.550653 z: 40.000000
[ INFO] [1560762737.557817870, 15.224000000]: WP: item #6 F:3 C: 21 p: 0.000000 0.000000 0.000000 0.000000 x: 47.397743 y: 8.545597 z: 0.000000
[ INFO] [1560762737.557914996, 15.224000000]: WP: mission received
[ WARN] [1560762738.402917827, 16.084000000]: WP: timeout, retries left 2
[ WARN] [1560762739.401540554, 17.084000000]: WP: timeout, retries left 1
[ WARN] [1560762740.401037710, 18.084000000]: WP: timeout, retries left 0
ERROR [mavlink] [timesync] Time jump detected. Resetting time synchroniser.
[ERROR] [1560762741.415233231, 19.084000000]: WP: timed out.
[ INFO] [1560762742.409890671, 20.080000000]: HP: requesting home position
ERROR [mavlink] [timesync] Time jump detected. Resetting time synchroniser.
ERROR [mavlink] [timesync] Time jump detected. Resetting time synchroniser.
ERROR [mavlink] [timesync] Time jump detected. Resetting time synchroniser.
ERROR [mavlink] [timesync] Time jump detected. Resetting time synchroniser.
[ WARN] [1560762752.386413445, 30.000000000]: GP: No GPS fix
[ INFO] [1560762752.470172187, 30.088000000]: HP: requesting home position
ERROR [mavlink] [timesync] Time jump detected. Resetting time synchroniser.
ERROR [mavlink] [timesync] Time jump detected. Resetting time synchroniser.
ERROR [mavlink] [timesync] Time jump detected. Resetting time synchroniser.
INFO [mavlink] partner IP: 127.0.0.1
[ WARN] [1560762759.573998354, 37.172000000]: CMD: Unexpected command 519, result 0
ERROR [mavlink] [timesync] Time jump detected. Resetting time synchroniser.
[ INFO] [1560762762.503466756, 40.080000000]: HP: requesting home position
ERROR [mavlink] [timesync] Time jump detected. Resetting time synchroniser.
ERROR [mavlink] [timesync] Time jump detected. Resetting time synchroniser.
[ INFO] [1560762772.599571462, 50.080000000]: HP: requesting home position
ERROR [mavlink] [timesync] Time jump detected. Resetting time synchroniser.
ERROR [mavlink] [timesync] Time jump detected. Resetting time synchroniser.
ERROR [mavlink] [timesync] Time jump detected. Resetting time synchroniser.
ERROR [mavlink] [timesync] Time jump detected. Resetting time synchroniser.
ERROR [mavlink] [timesync] Time jump detected. Resetting time synchroniser.
[ WARN] [1560762782.555642525, 60.000000000]: GP: No GPS fix
[ INFO] [1560762782.630954676, 60.080000000]: HP: requesting home position
ERROR [mavlink] [timesync] Time jump detected. Resetting time synchroniser.
[ INFO] [1560762792.675584776, 70.080000000]: HP: requesting home position
ERROR [mavlink] [timesync] Time jump detected. Resetting time synchroniser.
ERROR [mavlink] [timesync] Time jump detected. Resetting time synchroniser.
[ INFO] [1560762802.737611068, 80.080000000]: HP: requesting home position
ERROR [mavlink] [timesync] Time jump detected. Resetting time synchroniser.
ERROR [mavlink] [timesync] Time jump detected. Resetting time synchroniser.
[ WARN] [1560762812.716770148, 90.000000000]: GP: No GPS fix
[ INFO] [1560762812.797825679, 90.080000000]: HP: requesting home position
ERROR [mavlink] [timesync] Time jump detected. Resetting time synchroniser.
ERROR [mavlink] [timesync] Time jump detected. Resetting time synchroniser.
[ INFO] [1560762822.861167282, 100.080000000]: HP: requesting home position
ERROR [mavlink] [timesync] Time jump detected. Resetting time synchroniser.
ERROR [mavlink] [timesync] Time jump detected. Resetting time synchroniser.
ERROR [mavlink] [timesync] Time jump detected. Resetting time synchroniser.
[ INFO] [1560762832.871896649, 110.080000000]: HP: requesting home position
ERROR [mavlink] [timesync] Time jump detected. Resetting time synchroniser.
ERROR [mavlink] [timesync] Time jump detected. Resetting time synchroniser.
[ WARN] [1560762842.815579852, 120.000000000]: GP: No GPS fix
[ INFO] [1560762842.896232863, 120.080000000]: HP: requesting home position
ERROR [mavlink] [timesync] Time jump detected. Resetting time synchroniser.
[ INFO] [1560762852.926000678, 130.080000000]: HP: requesting home position
ERROR [mavlink] [timesync] Time jump detected. Resetting time synchroniser.
ERROR [mavlink] [timesync] Time jump detected. Resetting time synchroniser.
ERROR [mavlink] [timesync] Time jump detected. Resetting time synchroniser.
ERROR [mavlink] [timesync] Time jump detected. Resetting time synchroniser.
[ INFO] [1560762862.967628699, 140.080000000]: HP: requesting home position
ERROR [mavlink] [timesync] Time jump detected. Resetting time synchroniser.
[ WARN] [1560762872.919696568, 150.004000000]: GP: No GPS fix
ERROR [mavlink] [timesync] Time jump detected. Resetting time synchroniser.
[ INFO] [1560762873.009699711, 150.088000000]: HP: requesting home position
ERROR [mavlink] [timesync] Time jump detected. Resetting time synchroniser.
ERROR [mavlink] [timesync] Time jump detected. Resetting time synchroniser.
ERROR [mavlink] [timesync] Time jump detected. Resetting time synchroniser.
[ INFO] [1560762883.029430686, 160.080000000]: HP: requesting home position
ERROR [mavlink] [timesync] Time jump detected. Resetting time synchroniser.
ERROR [mavlink] [timesync] Time jump detected. Resetting time synchroniser.
ERROR [mavlink] [timesync] Time jump detected. Resetting time synchroniser.
[ INFO] [1560762893.075063018, 170.080000000]: HP: requesting home position
ERROR [mavlink] [timesync] Time jump detected. Resetting time synchroniser.
ERROR [mavlink] [timesync] Time jump detected. Resetting time synchroniser.
[ WARN] [1560762903.041372228, 180.000000000]: GP: No GPS fix
[ INFO] [1560762903.127057254, 180.080000000]: HP: requesting home position
ERROR [mavlink] [timesync] Time jump detected. Resetting time synchroniser.
ERROR [mavlink] [timesync] Time jump detected. Resetting time synchroniser.
ERROR [mavlink] [timesync] Time jump detected. Resetting time synchroniser.
[ INFO] [1560762913.174498788, 190.080000000]: HP: requesting home position
ERROR [mavlink] [timesync] Time jump detected. Resetting time synchroniser.
ERROR [mavlink] [timesync] Time jump detected. Resetting time synchroniser.
ERROR [mavlink] [timesync] Time jump detected. Resetting time synchroniser.
ERROR [mavlink] [timesync] Time jump detected. Resetting time synchroniser.
[ INFO] [1560762923.216175899, 200.080000000]: HP: requesting home position
ERROR [mavlink] [timesync] Time jump detected. Resetting time synchroniser.
ERROR [mavlink] [timesync] Time jump detected. Resetting time synchroniser.
[ WARN] [1560762933.157956225, 210.000000000]: GP: No GPS fix
[ INFO] [1560762933.236721113, 210.080000000]: HP: requesting home position
ERROR [mavlink] [timesync] Time jump detected. Resetting time synchroniser.
ERROR [mavlink] [timesync] Time jump detected. Resetting time synchroniser.
[ INFO] [1560762943.249462941, 220.080000000]: HP: requesting home position
^C[uav1/mavros-9] killing on exit
[uav1/sitl_1-7] killing on exit
Exiting...
Shutting down
[uav0/mavros-6] killing on exit
[uav0/sitl_0-4] killing on exit
[gazebo_gui-3] killing on exit
[gazebo-2] killing on exit
Exiting...
[gazebo_gui-3] escalating to SIGTERM
[uav0/sitl_0-4] escalating to SIGTERM
[rosout-1] killing on exit
[master] killing on exit
shutting down processing monitor...
... shutting down processing monitor complete
done
Sorry for the long post.. |
Okay, I finally solved the problem! I was just about to give up the sdf's and write my own xacro for the plane, since the IRIS-xacro files seemed to be working fine with the connections. |
Very good @tensarflow can you pr the details here to the dev guide for the page I linked to? |
Yes, of course! Just to be sure: I need to fork the repo, add code, commit changes, and then create a pull request right? |
Yes, but a tutorial in a pr against https://github.com/PX4/Devguide where you add an additional section to https://github.com/PX4/Devguide/blob/master/en/simulation/multi-vehicle-simulation.md is what I mean. FYI @hamishwillee |
The current launch file
Firmware/launch/multi_uav.launch
is broken. This PR allows to run multiple vehicles in SITL with Gazebo+MAVROS.The following PR is required too,
PX4/PX4-SITL_gazebo-classic#101
Changes:
SITL_UDP_PRT
PX4 parameter definition insimulator
module. This allows user to runpx4
node on a selected UDP port that can be set inrCs
startup file. This, as a result, will avoid conflicting on the same default port14560
xacro
file of the vehicle model is required. It's then converted tosdf
in the launch filesingle_vehcile_spawn.launch
, but also contains a unique UDP port that matched the one defined in therCs
file which will be used bypx4
noderCs
startup files for couple of iris vehicles to try with. EachrCs
file should define a uniqueSITL_UDP_PRT
and unique set of mavlink udp ports that mavros will communicate through.Usage:
Firmware/launch/multi_uav_mavros_sitl.launch
to adapt to your needs. Pay attention to the UDP ports and make sure the don't conflict, to used by other apps. A separate startuprCs
file is required for each vehicle.