Commit Graph

87 Commits

Author SHA1 Message Date
Julian Oes 79651ed6a4 launch: count multi UAVs from 0
This fixes the IDs of multi UAVs started with ROS/Gazebo.

Previously the 3 vehicles were displayed in QGC as Vehicle 2, 3, 4.
With this change it is more intuitive Vehicle 1, 2, 3 and this is
also consistent with the way it is documented and how it is in
jMAVSim.
2019-05-13 10:33:17 +01:00
stmoon 460c16cd7a add mavlink_tcp_port for multiple uav simultation 2019-02-19 08:12:12 +01:00
TSC21 b2fd8abf9e CI: add rostest to 'px4' and MAVROS in caktin and colcon builds 2018-12-13 02:09:31 +00:00
James Goppert 4ecb8746d6 Formatting. 2018-12-13 02:09:31 +00:00
James Goppert 78f109bbab Add ros pub test. 2018-12-13 02:09:31 +00:00
Kunal Shah 7f016b5fd4
ROS multi-vehicle simulation: fixed udp port overlap issues 2018-09-21 09:01:47 +02:00
Beat Küng efbae51efe launch: add px4.launch script that only starts the px4 binary
This provides a clean ROS interface for external projects which is
independent from the px4 CLI interface.

It can be used with:
```
	<include file="$(find px4)/launch/px4.launch">
	</include>
```
2018-08-16 10:34:44 +02:00
Beat Küng 273988c124 SITL: move all models to unified rcS startup and remove old scripts 2018-08-13 21:50:14 -04:00
Beat Küng e6b9806ee1 SITL: add multi-vehicle support to rcS
This also removes the HIGHRES_IMU mavlink stream to the GCS. I don't see
why it's needed and it adds noticeable CPU load.
2018-08-13 21:50:14 -04:00
Beat Küng f748c8d883 fix mavros launch scripts & use non-unified startup scripts
This is to not lose any existing functionality until we have everything
unified.
2018-08-08 21:09:39 +02:00
Beat Küng d05b268d19 posix shell: allow to run multiple instances 2018-08-08 21:09:39 +02:00
Julian Oes 0c5c741b1a add posix shell
squashed & rebased version, not including:
- listener changes
- src/firmware renaming

Commits:

tag_to_version.py: fix Python3 error

subprocess.communicate returns bytes instead of a str which is not the
same for Python3. Therefore, we need to decode the bytes.

cmake: remove folder src/firmware

The folder src/firmware was not intuitive. Why would the binaries for
SITL be inside a src and why even inside a src/firmware folder. Also,
the rootfs was put there which made it even more confusing.

The CMakeLists.txt files are moved into cmake/ and get now called from
the main CMakeLists.txt.

qshell: support for return value

Instead of just sending commands, qshell will now also wait until
the command has finished on QURT and sent back a return value. This will
allow all modules on the DSP side to be spawned from the Linux side
meaning that we only need one config/startup file instead of two.

adb_upload: create folders before pushing

Previously the script failed if the folder on the destination was not
already existing. This therefore makes pushing easier.

posix: spawn PX4 modules in bash

This adds the possibility to spawn PX4 modules out of bash. Basically,
the main executable can now be started as a server/daemon or as a
client.
The server replaces the existing functionality of the main exe with
the pxh shell, however, it also opens a pipe that clients can talk to.

Clients can run or spawn PX4 modules or commands by connecting to the
server over the pipe. They clients will get the stdout and return value
of their commands via a client specific pipe back.

This work will allow to start all modules using a bash script similar to
the way it is done in NuttX where the NuttShell scripts the startup
scripts and starts the modules.

SITL: use new client shell in SITL

This is a first step to use the new shell capabilities for SITL.
The new startup bash script rcS merges (and therefore replaces) the two
existing scripts rcS_gazebo_iris and rcS_jmavsim_iris.

More cleanup will be necessary for the rest of the SITL startup scripts.

Snapdragon: use new shell to start all modules

Instead of different mainapp.config and px4.config files, we can now use
a unified rcS bash script which starts all the modules based on
parameters, mainly the SYS_AUTOSTART param.

Snapdragon: fix the airframe description

pxh: argv needs to end with a nullptr

The comment was wrong that argv needs an additional 0 termination.
Instead it needs a nullptr at the end.

px4_posix_tasks: variable cleanup

The px4_task_spawn_cmd function got a cleanup while debugging, however,
no functional changes.

Snapdragon: move some drivers to 4100 config

These drivers are supported by the community, so they go into the 4100
config.

Snapdragon: update 210qc platform

px4_daemon: use doxygen comments

apps.h_in: fix string printf: use .c_str()

px4_daemon: \b -> \n in printf

px4_daemon: handle error in generate_uuid (close the file on error)

posix main: some clarifications in comment (it's the symlinks not the script aliases)

cmake: remove new install command again

This one was probably wrong and untested. Installing needs revisiting.

POSIX: remove argument USES_TERMINAL

POSIX: copy init and mixer files for SITL

Instead of using non-working install commands, the mixer and startup
files are now copied as part of the build in cmake.

adb_upload.sh: remove leftover commented printf

POSIX main: just the pointer instead of memmove

POSIX main: remove chroot

chroot is removed because it hasn't been used anywhere and seems
untested.

px4_daemon: remove client pipe when cleaning up

px4_daemon: fail if the client pipe already exists

The client pipe is supposed to be specific (by UUID), so the path
shouldn't exist already.

history: limit the number of history entries

This is a protection to avoid filling the memory if we are entering a
lot of commands (e.g. auto-generated).

px4_daemon: add a threadsafe map and use it

px4_daemon: whitespace

px4_daemon: fix client parsing

Sometimes the client ends up reading more than one packet in one read.
The parsing is not made for this and would require a (ring)buffer for
it.

The solution of this commit just reads as much as needed from the pipe
which avoids having to do buffering and parsing.

posix: changes sitl_run.sh and main.cpp cleanup

This changes the paths in sitl_run.sh quite a bit to allow the px4
binary to run in the rootfs directory which should make it convenient
and very close to the NuttX variant.

Also main.cpp got a big cleanup after the big rebase with some
conflicts. Quite some functionality was removed but it has yet to be
seen if it needs to be re-added.

px4_log: cleanup log levels, now they make sense

Before DEBUG and INFO log levels where inverted which didn't make much
sense in my eyes.

dataman: fix path for bash shell

logger: fix paths for bash shell

mavlink: fix paths for bash shell

param: fix path for bash shell

inav: fix paths for bash shell

sdlog2: fix paths for bash shell

ROMFS: add forgotten mixer to list

SITL init: more models, more options

- Support for different models using the unified startup
script rcS.
- Support to choose the estimator by setting the environment variable
  PX4_ESTIMATOR.
- Support to choose the logger by setting the environment variable
  PX4_LOGGER.

rcS: fix string comparison

listener: use template file

Instead of having all of the C++ code inside the Python file it is
nicer to have a separate template file with the C++ headers, etc.

px4_log: add PX4_INFO_RAW for raw printfs

This allows to do custom formatting but is still transported over
sockets to clients.

topic_listener: use PX4_INFO_RAW instead of printf

commander: use PX4_INFO_RAW for status

listener: rewrite to classes and factory

posix: fix some argument warnings

generate_listener.py: by accident changed shebang

listener: big refactor of the generator

Hopefully this makes it easier to read and change in the future.

rcS: manually take over rebase changes

listener: remove leftover try

listener: properly clean up topic instance

rcS: take over some vehicle specific changes

posix-configs: vehicle specifics to separate files

posix-configs: remove leftover lines

uORBDevices: new PX4_INFO_RAW instead of printf

px4_log: just use printf on NuttX

listener: use less binary space, strip on NuttX

generate_listener.py: remove commented code

cmake: fix syntax error from merge

px4_daemon: fixes after rebase of apps.h/cpp fix

px4_daemon: namespace missing

posix: only create stub for fsync on QURT

unitests: reduce dependencies of param test

This makes the unit test compile and link again after the bash changes.

QURT: some compile fixes after a rebase

SITL: arg change for sitl_run.sh to use rcS_test

This allows to use a custom startup file for testing.

SITL: add the folder test_data

SITL: implement shutdown command as systemcmd

The shutdown command needs to be a proper systemcmd, otherwise the alias
and symlink generation doesn't work and we end up calling shutdown of
the host computer which is to be avoided.

px4fmu_test: same IO_pass mixer as px4fmu_default

px4fmu_test: use normal quad x mixer

There is no good reason to use a specific test mixer, except more cmake
code around it. Therefore just use the same mixer as default, and at
some point px4fmu_test and px4fmu_default can get merged

POSIX: cleanup, dir and symlink fixes

This cleans up the logic behind the symlinking and creating directories.

POSIX: correct arg order in usage info

tests: fix paths for SITL tests

POSIX: printf fix

sitl_run.sh: try to make this run on Mac as well

cmake: try to make jenkins happier

Path cleanup, the bin is no longer in src/firmware

POSIX: fix symlink logic

SITL: prefix all exported env variables

cmake: fix path for ROS tests

integrationtests: fix log path

launch: try to make tets with ROS working again

px4_defines: fix after wrong merge deconflicting

px4_defines: get paths for POSIX correct

cmake: fix cmake arguments

This was fine with cmake 3.6 but did not work with cmake 3.2.2

cmake: use cp instead of cmake -E copy

cmake -E copy does not support copying multiple files with versions <
3.5. Therefore, just use cp for now.

ROMFS: fix build error after rebase

cmake: fix paths in configs

launch: use `spawn_model` again

cmake: various fixes after big rebase

param: path fixes after rebase

posix platform: fixes after rebase

test_mixer: fix screwed up rebase
2018-08-08 21:09:39 +02:00
Anthony Lamping e263af359e launch: make px4 required (#9682) 2018-06-14 20:37:25 -04:00
Beat Küng b66f0f36a5 ros tests: add an interactive flag & disable the PX4 shell for ROS tests (#9672) 2018-06-14 12:37:47 -04:00
Anthony Lamping 0af1c71255 launch: add respawn_mavros arg
reqs mavros>=0.23.2
2018-03-31 17:00:54 -04:00
Anthony Lamping b1f08a9640 ROS launch: cleanup
* remove non-functional gazebo headless arg
* remove unused namespace args
* simplify mavros launch, use mavros's px4.launch instead
* fix single_vehicle_spawn spelling
* formatting with xmllint: remove empty lines, set intent to 4 spaces, add xml tag for editors, add comments to break up spections
* remove old and deprecated launch files
2018-02-11 15:16:35 +01:00
Anthony Lamping 74bd40c09d multi uav launch: spawn urdf 2018-02-07 08:09:32 +01:00
Anthony Lamping 86ae744266 CI: allow Gazebo to restart on crash (#8817)
* add respawn_gazebo arg to be used with empty_world.launch
* catch rospy sleep method's exceptions
* fix copy-paste mistake in land state failure message
2018-02-06 15:11:09 -05:00
Daniel Agar 6bdc18df6d sitl launch default ekf2 everywhere 2018-01-02 01:35:57 +01:00
Daniel Agar 63deb40a76 ROS tests move to test/ and new Jenkins 2018-01-02 01:35:57 +01:00
Anthony Lamping 5ce381dfc7 update sitl tests 2018-01-02 01:35:57 +01:00
NRottmann 989b1484cc HippoCampus AUV: Enable start without ROS wrappers 2017-09-13 06:20:05 -07:00
NRottmann 0f8f5d29be Enable Simulation of the Hippocampus (AUV from TUHH)
Adding files which enable a simulation with the autonomous underwater
vehicle (AUV) from the Technical University Hamburg-Harburg
2017-08-20 20:59:15 +02:00
Mohamed Abdelkader Zahana cd1e04d43c support of multi uav simulation in SITL 2017-05-14 15:46:18 +02:00
James Goppert 964dabe179 Add better option handling to integration testing script. 2016-12-27 00:34:13 +01:00
James Goppert 8fdd392700 Added ground truth tests to sitl gazebo CI. 2016-12-26 16:33:37 +01:00
David Sidrane dc8c6ea5e5 White space fixes 2016-12-21 08:34:21 +01:00
James Goppert fe40e9cfae LPE vision estimation fixes. (#5505) 2016-10-01 09:02:12 -04:00
Lorenz Meier f511d49cc2 Improvements to SITL to make paths more flexible. (#5181) (#5255)
* Path cleanup for SITL.

* Restructured sitl scripts dir.

* Set integration tests to use ekf2 for vtol.

* Fix sitl paths for mac.
2016-08-25 21:47:45 +02:00
Lorenz Meier 102f5b54d7 Revert "Improvements to SITL to make paths more flexible. (#5181)"
This reverts commit 699b6a2cb3.
2016-08-05 21:29:49 +02:00
James Goppert 699b6a2cb3 Improvements to SITL to make paths more flexible. (#5181) 2016-08-05 06:23:59 -04:00
Andreas Antener 05dc643f17 increased fixed wing radius for mission tests and added more informative output for position matching 2016-06-28 22:44:49 +02:00
Andreas Antener 00d56b9ef8 added VTOL mission test, updated mission test to check mission depending on vehicle state 2016-06-28 22:44:49 +02:00
Andreas Antener 5c88353d05 removed GCS link from mavros 2016-06-28 22:44:49 +02:00
Andreas Antener d34edfd435 changed mavros connection string, updated gazebo sitl build process 2016-05-27 18:53:33 +02:00
Andreas Antener bee2c98785 reorganized posix sitl launch scripts, reorganized mavros python test scripts (integration tests) and updated them for posix sitl, removed old and not working integration tests 2016-04-20 16:51:58 +02:00
Andreas Antener cbc94fbe8c first attempt to run mavros tests in new sitl environment 2016-04-20 11:05:29 +02:00
Tarek Taha 24feea6346 - changes to allow for multi-uav support 2015-09-16 16:56:52 +04:00
devbharat 53cc070925 Removed unnecessary iris.launch from launch file 2015-07-23 19:12:45 +02:00
devbharat 6a40c173fd Added the launch file 2015-07-23 18:54:58 +02:00
Andreas Antener 2bcfd4f6f7 rename parameters in launch file to match new MP parameters 2015-05-15 09:26:07 +02:00
Andreas Antener a142b52e7b removed attitude parameter, configuration works now 2015-04-08 13:41:40 +02:00
Andreas Antener 9924f5519f update attitude and position setpoint topics 2015-04-08 13:41:40 +02:00
Andreas Antener c4a81f66cb set ground truth to true again, needs latest master from euroc_simulator 2015-03-15 15:50:25 +01:00
Thomas Gubler b311f7302b mavros sitl launch file: add default namespace 2015-03-10 21:24:07 +01:00
Thomas Gubler 2883edaecd ros sitl: increase Z gains for ardrone and iris 2015-03-10 20:56:53 +01:00
Thomas Gubler df4f825902 ros offboard demo: move mavros into model namespace 2015-03-10 20:56:53 +01:00
Thomas Gubler c07c39bc43 update ros launch files and nodes for update of rotors_simulator 2015-03-10 20:56:53 +01:00
Andreas Antener edfbde1505 move demo nodes out of px4 namespace 2015-02-28 20:03:49 +01:00
Andreas Antener c4b938fee6 moved mavros to root node 2015-02-28 20:03:49 +01:00