1083 Commits

Author SHA1 Message Date
Daniel Agar
90b60d44dc
Jenkins update docker containers to 2018-09-11 (#10463) 2018-09-12 00:05:22 -04:00
Daniel Agar
16a23c5527 ubuntu env setup script install python deps system wide in docker 2018-09-11 15:24:55 -04:00
Daniel Agar
c7ff4a87a3 ubuntu env setup script add file utility
- needed for cmake packaging
2018-09-11 15:24:55 -04:00
Julian Oes
a9070ce6e6 sitl_run.sh: fix process grep for jMAVSim
It seems that the oneline to find the process ID of any running jMAVSim
instance was not working correctly.
1. On Linux, the name of the process does not contain Simulator but
   jmavsim_run.jar. Also, it triggers incorrectly, if you have opened
   Simulator.java using the command line :).
2. The cutting to get the PID at the end does not work as intenteded and
   gives the username instead of PID, at least on Arch Linux. Using awk
   should fix this.
2018-09-11 14:09:41 +02:00
Daniel Agar
33e68b3331
update ubuntu.sh setup script and python requirements.txt 2018-09-10 13:50:18 -04:00
Beat Küng
e26bfd2e79 SITL: remove config_sitl_rcS_dir
Not needed anymore
2018-08-31 14:21:56 -04:00
Daniel Agar
8ddb99971f tests template skip mavlink except for mavlink test 2018-08-30 11:13:24 -04:00
Paul Riseborough
94d953eef2 Tools: Fix EKF data analysis false positives
The high frequency acceleration noise levels in the gazebo models and also seen on some hardware is causing the IMU vibration check warning to fail.

The thresholds have been lifted and the reporting improved to make it clearer which sensor noise is causing the failure.
2018-08-30 09:57:18 +02:00
Bram Strack van Schijndel
ca446982ab [Bebop 2] also upload mixer and config files 2018-08-30 09:48:26 +02:00
Bram Strack van Schijndel
0b6dc65e3c [Bebop 2] fix upload 2018-08-30 09:48:26 +02:00
Daniel Agar
e4088204ee shellcheck ignore array references for now (SC2039) and run everywhere 2018-08-25 20:12:29 +02:00
Daniel Agar
3c4c9131aa Jenkins add ShellCheck 2018-08-25 20:12:29 +02:00
PX4 Build Bot
d25b76c9c8 Update submodule sitl_gazebo to latest Tue Aug 21 01:37:53 UTC 2018
- sitl_gazebo in PX4/Firmware (7f41ead238933d2b4b68b4e3f4565cf4de4880ea): c1ca87e37b
    - sitl_gazebo current upstream: 821c55ca71
    - Changes: c1ca87e37b...821c55ca71

    821c55c 2018-08-20 Elia Tarasov - remove unused destination socket address
37faf25 2018-08-20 Elia Tarasov - remove undecalred member function
d5ca1d4 2018-08-20 Elia Tarasov - fix default QGC udp port initialization
2018-08-21 09:43:11 +02:00
Daniel Agar
01744a9efc Jenkins px4fmu-v2 hardware test 2018-08-14 23:12:26 -04:00
Beat Küng
d2aa68f62c sitl_run.sh: use correct ROMFS path for tests 2018-08-13 21:50:14 -04:00
Beat Küng
4e860e357c Tools: add run-shellcheck.sh to statically analyze startup scripts
Use './Tools/run-shellcheck.sh ROMFS/px4fmu_common' to run it.
2018-08-13 21:50:14 -04: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
ab7f68f2ad ekf2 replay: refactor to use unified rcS scripts 2018-08-13 21:50:14 -04:00
Beat Küng
5363aff879 fixes for integration and unit tests
Move ros logs dir so that .ulg files are not in the same directory
(mission_test.py:: get_last_log() fails otherwise)
2018-08-08 21:09:39 +02:00
Beat Küng
2454ef9240 Tools/check_submodules.sh: remove unnecessary verbose message
This was printed for all submodules.
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
Beat Küng
7822e5b5c3 posix shell: lots of cleanup and fixes
- move posix-configs/SITL/init/{rcS,10016_iris,6011_typhoon_h480} to ROMFS/px4fmu_common/init.d-posix
  allows for easier unification, only one symlink is required.
  - rcS: add AUTOCNF support. Update scripts to match with behavior of PX4
    master (parameter values, some sitl driver got removed)
- add alias to allow 'set variable value' syntax in scripts to px4-alias.sh
- use px4_getopt
- use separate argument for the test_data directory
- append PATH from within the px4 binary: this simplifies the usage
  w/o the sitl_run.sh script.
- add 'source px4-alias.sh' to all existing sitl startup scripts
- move sitl mixers to ROMFS/px4fmu_common/mixers-sitl
  makes it easier to use existing mixers and sitl-specific ones.
- remove unused rcS_gazebo_delta_wing
2018-08-08 21:09:39 +02:00
Beat Küng
6a49d78c4b logger: remove last references to SYS_LOGGER 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
Daniel Agar
a7f3012c1c delete all dokuwiki helpers 2018-08-08 14:07:59 -04:00
Daniel Agar
2302c64004 listener: add optional rate and cleanup existing arguments 2018-08-03 06:50:41 +02:00
Daniel Agar
8feac97399 docker update all to 2018-07-19 tagged image 2018-07-21 15:52:19 -04:00
David Sidrane
89a902524a px_uploader:Revert the rebooting text to have baudrate
Using the port name is platform dependent. It may give not
  provide the correct feedback. The port can be ttyS, or ftdi
  or CDC/ACM. While it is true that buadrate does not matter on
  CDC/ACM. It is better to give more information about what the
  code is doing before filtering by the port name.
2018-07-19 11:23:15 -07:00
David Sidrane
f12acd7b0f px_uploader:Platform and Timming indepentant Serial detection
The correct determination of Windowed mode is critical to
   maximise the speed on a USB based upload.

   This commit bases the detection of a Serial (FTDI) on the
   fact a CDC ACM port (USB) does not really have a baud rate.
   We bump the baud rate to 233% of the requested baud rate to
   see if the SYNC is acked. If it is Acked it must be a USB
   port and Windowed mode is turned off. This removes unnessary
   baud rate based delays from the proframing logic. If it is a
   real Serial port getSync will not get the ACK and Windowed
   mode is turned on.
2018-07-18 08:11:11 +02:00
Julian Oes
11d4c32cd4 px_uploader: fix unknown variables 2018-07-17 07:44:58 -07:00
Julian Oes
8b91a68fea px_uploader: white space PEP8 fixes 2018-07-17 07:44:58 -07:00
PX4 Jenkins
d390524437 Update submodule sitl_gazebo to latest Mon Jul 16 20:26:32 CDT 2018
- sitl_gazebo in PX4/Firmware (a08fc0c3ff3cfb4bba57035c98b0a7398b0c2a19): ac54b8fddd
    - sitl_gazebo current upstream: c1ca87e37b
    - Changes: ac54b8fddd...c1ca87e37b

    c1ca87e 2018-07-16 Elia Tarasov - add support for gazebo version greater or equal 9
eb4494d 2018-07-16 Elia Tarasov - load rotation signs from sdf model file
c00b9ee 2018-07-16 Elia Tarasov - add default constants for rotation signs
36360c5 2018-07-16 Elia Tarasov - add rotation signs to class variables
2018-07-16 22:40:47 -04:00
PX4 Jenkins
35089bf008 Update submodule jMAVSim to latest Mon Jul 16 20:26:26 CDT 2018
- jMAVSim in PX4/Firmware (e2eb84042e5d15b8212b0c0ccb9045c123c39284): e0e8b6ca47
    - jMAVSim current upstream: 136e92eb8a
    - Changes: e0e8b6ca47...136e92eb8a

    136e92e 2018-07-16 Hamish Willee - Merge pull request #77 from PX4/readme-update-for-blender
78b653e 2018-07-10 alessandro - typo fix
9734edf 2018-06-20 alessandro - Addressing review comments from #77
a197e76 2018-06-19 Alessandro Simovic - readme: added instructions for Blender
2018-07-16 22:40:25 -04:00
Daniel Agar
c141081d47 sitl_gazebo update to latest with baro noise fix 2018-07-15 21:12:27 -04:00
johannes
62ea0b6ddb ecl-ekf tools: fix division by zero warning by dividing by epsilon 2018-07-15 21:12:27 -04:00
johannes
45483f8cc3 ecl ekf tools: print check failures and warnings (for IMU) to stdout 2018-07-15 21:12:27 -04:00
johannes
78d8061aaf ecl-ekf tools: set exit code to -1 for failed analysis, pipe args
- process_log_data: exit with code -1 if whole system analysis fails
- batch_process_logdata and process_log_data: pipe sensor safety
margin argument to the arguments of the superseeding scripts
- reduce minimum flight length for analysis to 50 samples
2018-07-15 21:12:27 -04:00
Lorenz Meier
57c7e1a3eb Uploader: Ensure that we are not entering windowed mode on USB links 2018-07-15 16:15:21 +02:00
TSC21
ceae2f8896 update sitl_gazebo submodule 2018-07-13 20:58:44 +02:00
David Sidrane
05936f2ff7 px_uploader.py:Speed Improvments on Serial
The __getSync was costing about 16Ms per call.
  The commit uses a window based approch allowing
  the SYNC,<results> to be read all at one time.
  and delaying for programing based on transport
  time + 1 Ms;
  THe improvment at 2Mbps is >4 minutes to ~37
  seconds
2018-07-13 17:29:31 +02:00
Daniel Agar
8537863848 delete sdlog2 2018-07-13 09:02:59 +02:00
Daniel Agar
dec03873bc px_uploader add small delay before checking CRC result 2018-07-07 15:55:53 +02:00
Hamish Willee
7402d8223b Fix up references to pixhawk.org 2018-07-02 13:11:15 +02:00
Julian Oes
193993c54f px_uploader: fix typo and Python 3 issue 2018-06-29 08:46:45 +00:00
Julian Oes
b0ec64efe8 px_uploader: fixed a couple small PEP8 warnings 2018-06-29 08:46:45 +00:00
Julian Oes
48edf9b65e px_uploader: remove commented out line 2018-06-29 08:46:45 +00:00
Julian Oes
4e43cc3518 px_uploader.py fix flashing issue (#9792)
This fixes a problem where the pyserial write call gets stuck.
It happens on a specific Fedora 28 system with internal USB ports as
well as USB hubs.
It is not clear why the problem is resolved but it is clearly
reproducible that with a timeout of 0, the write can get stuck and with
a timeout > 0 it works every time.

The exception added as part of this commit makes sense but has never
been triggered in my testing.
2018-06-28 20:18:22 -04:00
Daniel Agar
e78b9a063f px_uploader cleanup status messages and print used percentage 2018-06-28 19:35:36 +00:00
PX4 Jenkins
dee5635f79 Update submodule sitl_gazebo to latest Wed Jun 27 21:26:29 EDT 2018
- sitl_gazebo in PX4/Firmware (18abeb1118f3db8e4012d290e1b8dc5d0883333a): 3c7d18d0a5
    - sitl_gazebo current upstream: fcee53fc4c
    - Changes: 3c7d18d0a5...fcee53fc4c

    fcee53f 2018-06-22 TSC21 - vision: by default, do not send ODOMETRY Mavlink msgs
2018-06-28 07:11:10 +00:00