99 Commits

Author SHA1 Message Date
Lorenz Meier
8ebc846ae7 Simulator: Do not open hardware UART in SITL 2016-11-17 09:11:58 +01:00
James Goppert
3511f8abfb Add position ground truth. (#5819)
Have confirmed this works with gazebo sitl.
2016-11-09 19:38:38 -05:00
Julian Oes
62603bee45 simulation: SITL outputs from 0..1
Instead of sending actuator controls from -1..1 for SITL, we should send
0..1 like we already do for HIL. This will enable negative thrust in the
future, e.g. for pusher props that spin backwards, or for vehicles with
variable pitch propellers.
2016-10-28 23:56:46 +02:00
Beat Küng
7ed81e5edb simulator_mavlink: send MAV_CMD_SET_MESSAGE_INTERVAL to enable ground truth 2016-10-20 18:54:47 +02:00
Lorenz Meier
526fb8f515 Remove q_valid flag from attitude topic 2016-10-18 20:46:08 +02:00
Lorenz Meier
0bd42402fb Sim: Remove euler angles 2016-10-18 20:46:08 +02:00
Beat Küng
c81a1631ec simulator_mavlink: init hil_attitude with 0 & set angular speed 2016-10-04 12:56:25 +02:00
Mark Whitehorn
ec1609350f fix jMAVSim body-fixed XYZ Euler Angles 2016-10-04 12:54:58 +02:00
Beat Küng
ac189704ed simulator: flush output after waiting message output
Just to make sure the user sees the message.
2016-09-30 13:50:51 +02:00
Lorenz Meier
adf56050b9 Use monotonic clock for simulator 2016-09-27 11:56:49 +02:00
Mark Whitehorn
95f899fee7 always publish simulator groundtruth attitude 2016-09-19 13:07:02 +02:00
Mark Whitehorn
f24b199775 add HIL_STATE message handler and publish to uORB
add missing break

uorb topics generator: add multi-topics to the list of all topics

topic names with '# TOPICS <name>' were previously not in orb_get_topics().
This means the logger could not find them.

Affects for example actuator_controls_0.

px_generate_uorb_topic_files.py: add multitopics to generate_topics_list_file_from_files method

switch simulated attitude to new topic: vehicle_attitude_groundtruth

logger: add input_rc topic. needed for web plotting

input_rc.msg: remove timestamp_publication, use timestamp instead

mixer.cpp: warnx -> PX4_ERR

logger: initialize timer_call to 0 (hrt_call_every reads some fields)

position_setpoint_triplet topic: set the timestamp when publishing

px_generate_uorb_topic_files.py: add multitopics to generate_topics_list_file_from_files method

add vehicle_attitude_groundtruth to default topics

change to hil_state_quaternion
2016-09-19 13:05:14 +02:00
Beat Küng
d297d31c23 input_rc.msg: remove timestamp_publication, use timestamp instead 2016-09-19 13:02:31 +02:00
Lorenz Meier
29d33a12dc Simulator: Adjust way too small task stack 2016-09-11 20:07:30 +02:00
Beat Küng
010c9e937b SITL: switch to HIL_ACTUATOR_CONTROLS mavlink message & add pwm_out_sim support for 16 outputs 2016-09-06 11:33:18 +02:00
James Goppert
05315abc89 Optical flow simulator and install cleanup. (#5132)
sitl CI is having some issue cloning, but I have verified it locally for various configs
2016-07-24 13:07:14 -04:00
Lorenz Meier
024a86c309 Simulator: fix battery sim 2016-06-23 22:32:14 +02:00
Lorenz Meier
229208610e Fix simulator code style 2016-06-18 17:03:11 +02:00
Lorenz Meier
85e3073f14 Simulator: Send all actuator output groups 2016-06-18 01:50:42 +02:00
Lorenz Meier
f11d42aab3 Simulator MAVLink: Forward port cleanly 2016-06-17 22:44:42 +02:00
korotkoves
7f9ab9b7cb fix code style for Travis 2016-05-13 13:24:13 +02:00
korotkoves
22e3ce7d7a simulator udp port from command line 2016-05-13 13:23:20 +02:00
Lorenz Meier
755176b247 Sim compile fix 2016-05-06 19:22:18 +02:00
Lorenz Meier
b883b30404 Simulator: Drain the battery to 15%, reffill it once disarmed to allow for more testing 2016-05-03 13:45:15 +02:00
Julian Oes
944acfaf75 simulator: change after perf_counter API change 2016-04-25 12:48:48 +02:00
Lorenz Meier
4beca408b9 Fix Jenkins build error 2016-04-23 16:59:40 +02:00
Lorenz Meier
a49ba1a383 Sensors: Code style 2016-04-23 14:45:12 +02:00
Lorenz Meier
0733651d01 Simulator: Fix battery interface 2016-04-23 14:25:01 +02:00
Julian Oes
705979e3c7 simulator: use new battery systemlib 2016-04-11 18:01:47 +02:00
Lorenz Meier
f5c3b349a8 MAVLink sim: Fix code style 2016-04-05 19:09:30 -07:00
Lorenz Meier
805439c0f2 Simulator fixes 2016-04-05 19:09:30 -07:00
Lorenz Meier
205650efd7 Simulator: Fix code style 2016-04-05 19:09:30 -07:00
Lorenz Meier
6ed99a2325 Remove debug output 2016-04-05 19:09:30 -07:00
Lorenz Meier
0baa625681 Adjustements and improvements in the simulation interface 2016-04-05 19:09:30 -07:00
Lorenz Meier
3cfb6ba4a7 Do not send unneeded NSH command any more 2016-04-05 19:09:29 -07:00
Lorenz Meier
155a0d7f18 Code style in MAVLink simulator 2016-03-12 11:06:51 +01:00
Lorenz Meier
8f46c07249 Sim: Do not drain the battery all the way to zero yet 2016-02-28 17:17:59 +01:00
Lorenz Meier
c5b0650c23 Sim: Add batttery sim 2016-02-24 12:31:24 +01:00
Mark Charlebois
4c7ec2b0ff Reverted change to src/modules/simulator/simulator_mavlink.cpp
Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2016-02-19 16:59:45 +01:00
Mark Charlebois
014f15d8b0 Rebase changes on upstream master
This brings in many of the changes from the PX4 fork on ATLFLight.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2016-02-19 16:59:43 +01:00
Mark Charlebois
a996b94c41 Reverted change to src/modules/simulator/simulator_mavlink.cpp
Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2016-02-19 16:59:42 +01:00
Mark Charlebois
9f3bf8e9f4 Rebase changes on upstream master
This brings in many of the changes from the PX4 fork on ATLFLight.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2016-02-19 16:59:41 +01:00
Lorenz Meier
ac788ad5dc MAVLink: Fix code style 2016-02-05 09:16:41 +01:00
Lorenz Meier
8e62c9eb8d Use delay API 2016-02-05 00:53:22 +01:00
tumbili
f2e7d5ca77 simulator: support for standard vtol plane 2016-01-14 16:07:01 +01:00
Lorenz Meier
4907bf3374 Sim: Keep MAVLink parse status persistent, because that is the frickin state machine 2016-01-07 23:19:20 +01:00
Julian Oes
72dc4d3290 simulator: fix mavlink parsing of sim+RC stream
The mavlink stream from the simulator and the mavlink stream over serial
(used for RC input) both had the same MAVLINK_COMM channel and were
therefore sharing an internal buffer in mavlink_parse_char. This meant
that most (low rate) serial messages were getting swallowed by the high
rate simulator stream.

This change fixes the issue where RC input was not properly arriving in
Gazebo, however it breaks the `commander takeoff` command in SITL which
needs to be investigated.
2016-01-07 23:08:32 +01:00
Lorenz Meier
62763904f2 Simulator: Add performance counter for incoming packet interval 2015-12-29 17:12:29 +01:00
Lorenz Meier
5dc4ea8146 Sim: minor cleanups 2015-12-29 14:17:59 +01:00
Lorenz Meier
988ff59103 Fix simulator PWM range 2015-12-14 16:16:25 +00:00