Commit Graph

31 Commits

Author SHA1 Message Date
Lorenz Meier
62763904f2 Simulator: Add performance counter for incoming packet interval 2015-12-29 17:12:29 +01:00
Lorenz Meier
bd4497f883 Simulator: Add performance counters for delay 2015-11-24 14:23:59 +01:00
Lorenz Meier
fefdcd3fa9 Merge master into cmake-2 2015-10-03 15:34:30 +02:00
v01d
068dd76763 simulator: add publishing of HIL_OPTICAL_FLOW as uORB topic 2015-10-02 23:45:36 +02:00
Lorenz Meier
08c56085b3 Merged cmake-2 2015-09-20 11:37:28 +02:00
Lorenz Meier
30d0dab8e6 Simulator: Fix code style 2015-09-20 11:35:52 +02:00
Lorenz Meier
bbccb8ed5f Simulator: Add required POSIX header 2015-09-20 10:58:29 +02:00
Lorenz Meier
a2ea70c7a0 Simulator: Move to semaphore abstraction 2015-09-20 00:29:03 +02:00
tumbili
0fe272c9b3 support simulated airspeed 2015-09-04 22:34:28 +02:00
tumbili
b1850a316b support sitl for planes 2015-09-01 09:40:20 +02:00
Mark Charlebois
009f528266 Fixes for posix-arm and qurt builds
Ifdefed out deadcode in position_estimator_inav_main.c as the
deadcode does not compile for qurt.

Added fixes to get a successful build for posix-arm and qurt targets.
Removed CLOCK_REALTIME def from px4_time.h for qurt and removed unused
variables in att_est_q and mc_att_control.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-08-05 18:34:46 -07:00
Lorenz Meier
5a1af860ab Sim: Enforce boot order is correct, sim starts first 2015-07-04 08:09:12 -07:00
Mark Charlebois
c611749b4f Simulator: modified -p to publish individual sensor data
The simulator was changed to publish the sensor data that is read
by the sensors module when the -p flag is passed.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-07-01 18:20:14 -07:00
Mark Charlebois
d66b6ea701 POSIX: px4_getpid() fix
Since the PX4 code uses both px4_task and pthread APIs,
px4_getpid() must be save to call from either context.

On posix, this means we have to always return the pthread ID.

Reverted simulator change of pthread to px4_task

There may have been side effects if this was build for a target that
has process/task scoped file descriptors. It is now safe to call
px4_getpid() from this pthread context with this change for the
posix build for px4_getpid().

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-06-15 08:25:57 -07:00
Mark Charlebois
7e7513bc15 POSIX: change pthreads to px4_tasks in simulator
The simulator was using pthread APIs directly so calls to px4_getpid()
would fail since the task ID was not known. Changed simulator to use
px4_task_spawn_cmd.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-06-13 16:44:29 -07:00
tumbili
065ec5b2dc no need to send non-controls mavlink messages to jMAVSim because we can use mavlink app with udp 2015-06-08 22:21:59 -07:00
tumbili
5c013af574 save gps data so driver can read 2015-06-08 22:21:59 -07:00
tumbili
f0a3210e94 major simulator rework:
- wait for first message from jMAVSim
  before sending data
- publish raw rc data coming from PIXHAWK (temporary)
- send some interesting messages to jMAVSim
- prepare sensor data for sim drivers to read
2015-06-08 22:21:58 -07:00
Mark Charlebois
1ca05aaa64 orb_advert_t changed to void * and checks changed to nullptr
The existing orb_advert_t use thoughout the code sometimes tries
to treat it as a file descriptor and there are checks for < 0
and ::close calls on orb_advert_t types which is an invalid use
of an object pointer, which is what orb_advert_t really is.

Initially I had changed the -1 initializations to 0 but it was
suggested that this should be nullptr. That was a good recommendation
but the definition of orb_advert_t had to change to void * because
you cannot initialize a uintptr_t as nullptr.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-05-27 14:42:49 -07:00
Roman Bapst
4a84215a8f fix mavlink message sending, make thread priority default 2015-05-15 17:49:20 +02:00
Mark Charlebois
d0bf4ab449 Simulator: refactored mavlink additions
QuRT does not support UDP so moved the mavlink specific code
to a new file that is not built for the qurt target

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-05-11 19:25:11 -07:00
tumbili
c074d6e913 implemented polling of socket file descriptor and uorb topic file descriptor 2015-05-11 23:55:11 +02:00
tumbili
9119687177 make socket non-blocking, moved socket includes to header file to avoid forward declarations 2015-05-09 10:35:25 +02:00
tumbili
39711ca908 implemented bidirectional udp communication with simulator 2015-05-08 21:51:21 +02:00
tumbili
17267a7f66 enable receiving mavlink highres imu message (via udp) from external simulator 2015-05-04 23:10:23 +02:00
Mark Charlebois
93a3eeb569 Simulator: Added Roman's sensors combined topic
Simulator can work as before with -s flag or with Roman's additions to
publish the sensors combined topic using -p flag.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-29 23:45:54 -07:00
Mark Charlebois
3336fce1f4 QuRT and POSIX changes
Partial commit of the changes for QuRT and related changes for POSIX

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-24 00:52:44 -07:00
Mark Charlebois
88dc6ec1e5 Simulator: use template for Reports
Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 11:37:50 -07:00
Mark Charlebois
93c39e6d1d Linux: Added barosim support to simulator
Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 11:37:50 -07:00
Mark Charlebois
89bc1b86b2 Linux: connected gyrosim to Simulator
Simulator gets incoming MPU data and gives raw MPU data to the
gyrosim sensor when read.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 11:37:50 -07:00
Mark Charlebois
ac1679dbc3 Added simulator
Simulator listens for UDP input data at port 9876.

Data is for now comma separated. Not yet connected to the various sim
classes: accelsim, gyrosim, magsim.

Barometer measurements not yet supported.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 11:35:49 -07:00