This should prevent the race between gzserver and gz model and fix the
integration tests which sometimes timeout because the model is not
spawned correctly.
This patch also changes the shebang to what's generally recommended.
If `make px4_sitl_default` is run, and not `make px4_sitl_default gazebo` then each model instance will throw the following errors:
```
[Err] [Plugin.hh:178] Failed to load plugin libgazebo_gps_plugin.so: libgazebo_gps_plugin.so: cannot open shared object file: No such file or directory
[Err] [Plugin.hh:178] Failed to load plugin libgazebo_multirotor_base_plugin.so: libgazebo_multirotor_base_plugin.so: cannot open shared object file: No such file or directory
[Err] [Plugin.hh:178] Failed to load plugin libgazebo_motor_model.so: libgazebo_motor_model.so: cannot open shared object file: No such file or directory
[Err] [Plugin.hh:178] Failed to load plugin libgazebo_motor_model.so: libgazebo_motor_model.so: cannot open shared object file: No such file or directory
[Err] [Plugin.hh:178] Failed to load plugin libgazebo_motor_model.so: libgazebo_motor_model.so: cannot open shared object file: No such file or directory
[Err] [Plugin.hh:178] Failed to load plugin libgazebo_motor_model.so: libgazebo_motor_model.so: cannot open shared object file: No such file or directory
[Err] [Plugin.hh:178] Failed to load plugin libgazebo_groundtruth_plugin.so: libgazebo_groundtruth_plugin.so: cannot open shared object file: No such file or directory
[Err] [Plugin.hh:178] Failed to load plugin libgazebo_magnetometer_plugin.so: libgazebo_magnetometer_plugin.so: cannot open shared object file: No such file or directory
[Err] [Plugin.hh:178] Failed to load plugin libgazebo_barometer_plugin.so: libgazebo_barometer_plugin.so: cannot open shared object file: No such file or directory
[Err] [Plugin.hh:178] Failed to load plugin libgazebo_mavlink_interface.so: libgazebo_mavlink_interface.so: cannot open shared object file: No such file or directory
[Err] [Plugin.hh:178] Failed to load plugin libgazebo_imu_plugin.so: libgazebo_imu_plugin.so: cannot open shared object file: No such file or directory
```
- sitl_gazebo in PX4/Firmware (f4d7052bec): 629e5f5c23
- sitl_gazebo current upstream: ce1eca2bd0
- Changes: 629e5f5c23...ce1eca2bd0
ce1eca2 2020-07-19 Daniel Leonard Robinson - New vehicle type: Airship (#490)
df186d2 2020-07-18 TSC21 - use 'EnableC++XX' and remove duplicated compiler sets
60e5d4e 2020-07-18 TSC21 - remove the check for the 'px4' binary (it's never found since it's built in parallel with sitl_gazebo)
a3b5c5e 2020-07-19 JaeyoungLim - Fix moment calculation (#545)
07820ee 2020-07-19 JaeyoungLim - Fix gimbal imu sensors intefering with each other (#549)
- Spaces -> tabs.
- Remove "brew install python" because it's already a dependency of the
px4-dev tap.
- Remove "brew install ccache" as we can also add it to the px4-dev tap.
- Don't try to update pip installation, it works fine as is.
- Install pip dependencies as user, no need for system-wide install.
- sitl_gazebo in PX4/Firmware (38588f0c37): 309f7b0ace
- sitl_gazebo current upstream: 1af7e29dbb
- Changes: 309f7b0ace...1af7e29dbb
1af7e29 2020-06-25 JaeyoungLim - Do not validate r1_rover
5e8ddfb 2020-06-25 Benjamin Perseghetti - fixes for R1 SDF https://github.com/PX4/sitl_gazebo/issues/533 (#534)
726c066 2020-06-23 Supakorn Suttiruang - Remove the incorrect force generated by moment (#532)
Co-authored-by: PX4 BuildBot <bot@px4.io>
- sitl_gazebo in PX4/Firmware (6b343c1f5e): 97106007eb
- sitl_gazebo current upstream: 846190e8a3
- Changes: 97106007eb...846190e8a3
846190e 2020-06-18 Daniel Agar - cmake set build type and C/C++ standard
1cd16d7 2020-06-18 JaeyoungLim - Set GPS utc time to use utc time (#522)
- remove all remaining IOCTLs for accel and gyro and handle all calibration entirely in sensors module with parameters
- sensor_accel and sensor_gyro are now always raw sensor data
- calibration procedures no longer need to first clear existing values before starting
- temperature calibration (TC) remove all scale (SCL) parameters
- gyro and baro scale are completely unused
- regular accel calibration scale can be used (CAL_ACC*_xSCALE) instead of TC scale
- sitl_gazebo in PX4/Firmware (39a33a35ae): 20e8dbe115
- sitl_gazebo current upstream: 3ba325b00f
- Changes: 20e8dbe115...3ba325b00f
3ba325b 2020-06-03 Julian Oes - geotagged_images: actually report number of images
92453d1 2020-05-21 JaeyoungLim - Cleanup
9aef888 2020-05-21 JaeyoungLim - Translate yaw to point at the right direction
* uORB orb_stat() and update(uint64_t *time, void *dst) are now obsolete and have been deleted
* mavlink messages add more advertised checks in streams get_size() check to improve data rate calculation across different scenarios
- sitl_gazebo in PX4/Firmware (88c9761f1f): 8569aec5bb
- sitl_gazebo current upstream: 458e58f797
- Changes: 8569aec5bb...458e58f797
458e58f 2020-03-10 JaeyoungLim - Fix sweep cosine (Continuing #302) (#429)
ea2568d 2019-12-27 JaeyoungLim - Increase rudder angle limit
8b905c9 2019-12-27 JaeyoungLim - Add rudder control to sitl
08f8e6f 2020-03-10 Jan-Hendrik Ewers - Update README.md
de10edd 2020-03-10 iwishiwasaneagle - FixesPX4/sitl_gazebo#424 for arch and ubuntu
4f596be 2020-03-10 Christian Clauss - Remove unused function isstring() in scripts/names.py (#346)
89db01c 2020-03-09 Matej Frančeškin - Handle MAV_CMD_SET_CAMERA_MODE
dae26ba 2020-03-08 JaeyoungLim - Handle videostream info and status
c13057d 2020-03-07 JaeyoungLim - Clear formatting and cleanups
639a6bb 2020-03-07 JaeyoungLim - Add parachute plugin
42d05bd 2020-03-09 RomanBapst - standard vtol: decrease rotorDragCoefficient to more realistic values
5669e5c 2020-03-07 leftytechie - Version check (#418)
82657d3 2020-03-07 Lorenz Meier - Fix geotagged images GPS position The GPS position was invalid, leading to incorrectly displayed geotag markers and to incorrect geotags in images.
8794a70 2020-03-02 Julian Oes - cmake: remove warning
7aba744 2020-02-26 TSC21 - gazebo_mavlink_interface: use class enum; use binary notation with the bitmask operations
0dc43a4 2020-02-26 TSC21 - gazebo_mavlink_interface: make sure to always send gyro and accel data in the HIL_SENSOR msgs
0c954a2 2020-02-25 TSC21 - mavlink_interface: split groundtruth stream from sensor stream; only apply rotations where needed
bc92d96 2020-02-25 TSC21 - set baro rate at 50Hz (averaging the PX4 baro drivers ODR)
94d16e6 2020-02-25 TSC21 - update magnetometer rate to 100Hz (fitting the ODR in most of the support PX4 mag drivers)
6cae120 2020-02-25 TSC21 - mavlink_interface: send HIL_SENSOR messages with the bitmask correctly defined IOT set each sensor stream rate separately
The problem with printing the exception was that starting with
Python 3.6 the ImportError is yet another (sub) exception called
ModuleNotFoundError which can't be printed as a string and then triggers
another exception:
```
Traceback (most recent call last):
File "/home/julianoes/src/Firmware/Tools/serial/generate_config.py", line 11, in <module>
import jinja2
ModuleNotFoundError: No module named 'jinja2'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/julianoes/src/Firmware/Tools/serial/generate_config.py", line 13, in <module>
print("Failed to import jinja2: " + e)
TypeError: must be str, not ModuleNotFoundError
```
As per @bkueng's suggestion the easiest is to cast the exception to str
and that way prevent the second exception.