Darek
November 4, 2019, 1:01pm
1
Hi,
is it possible to run the airsim simulator in cooperation with PX4 v1.9.2 or newer?
In version 1.8.2, launched based on this tutorial:
it works fine, but currently i need PX4 1.9.2 version.
Base on PX4 v1.8.2 it compiles as:
make posix_sitl_ekf2 none_iris
in version 1.9.2 it looks like neither posix nor ekf2 module.
@Darek AirSim does not support lockstep yet which was added in PX4 v1.9.2. They are however, working on adding support for it.
In the meantime, you can recompile PX4 with lockstep disabled:
https://dev.px4.io/v1.9.0/en/simulation/index.html#disable-lockstep-simulation
Darek
November 5, 2019, 6:15pm
3
Thanks a lot Julian,
I did it, recompile px4, but it still not want to work.
when I followed tutorial:
~> /PX4/Firmware$ make posix_sitl_ekf2 none_iris
Makefile:469: *** āposix_sitl_ekf2 cannot be the first argument. Use āmake help|list_config_targetsā to get a list of all possible [configuration] targets.ā. Stop.
so I try to make:
make px4_sitl_default none_iris
The px4 start but it still have not communication with airsim.
How to run px4 in version 1.9.2 to communicate witch AirSim?
Ps.
When I started px4 repo from master I see in PX4 console:
WARN [commander] Preflight Fail: Compass Sensor #0 missing
I suppose you also need to switch from TCP to UDP by switching this to false
:
<xacro:arg name='baudrate' default='921600' />
<xacro:arg name='qgc_addr' default='INADDR_ANY' />
<xacro:arg name='qgc_udp_port' default='14550' />
<xacro:arg name='sdk_addr' default='INADDR_ANY' />
<xacro:arg name='sdk_udp_port' default='14540' />
<xacro:arg name='hil_mode' default='false' />
<xacro:arg name='hil_state_level' default='false' />
<xacro:arg name='send_vision_estimation' default='false' />
<xacro:arg name='send_odometry' default='false' />
<xacro:arg name='enable_lockstep' default='true' />
<xacro:arg name='use_tcp' default='true' />
<xacro:arg name='vehicle_is_tailsitter' default='false' />
<xacro:arg name='visual_material' default='DarkGrey' />
<xacro:arg name='enable_mavlink_interface' default='true' />
<xacro:arg name='enable_wind' default='false' />
<!-- The following causes segfault with multiple vehicles if defaults to true!!! -->
<xacro:arg name='enable_ground_truth' default='false' />
<xacro:arg name='enable_logging' default='false' />
<xacro:arg name='log_file' default='iris' />
<!-- macros for gazebo plugins, sensors -->
Darek
November 6, 2019, 7:26pm
5
I changed ~/PX4/Firmware/Tools/sitl_gazebo/models/rotors_description/urdf/iris_base.xacro to:
<xacro:arg name=āuse_tcpā default=āfalseā />
next
make clean
make px4_sitl_default none_iris
but PX4 still start on TCP
INFO [simulator] Waiting for simulator to connect on TCP port 4560
Did I miss something? maybe call other model not none_iris?
Darek
November 8, 2019, 9:49am
7
It works +1:
Julian, many many thanks for your help.
1 Like
Iām trying to run PX4 1.11 (w/ cygwin toolchain) + AirSim 1.3.0 on windows
I got this waring:
pxh> WARN [commander] Takeoff denied! Please disarm and retry
WARN [PreFlightCheck] Preflight Fail: Compass Sensor #0 missing
WARN [PreFlightCheck] Primary compass not found
WARN [PreFlightCheck] Preflight Fail: Accel Sensor #0 missing
WARN [PreFlightCheck] Primary accelerometer not found
WARN [PreFlightCheck] Preflight Fail: Gyro Sensor #0 missing
WARN [PreFlightCheck] Primary gyro not found
WARN [PreFlightCheck] Preflight Fail: Baro Sensor #0 missing
settings.json:
{
"SettingsVersion": 1.2,
"SimMode": "Multirotor",
"Vehicles": {
"PX4": {
"VehicleType": "PX4Multirotor",
"UseSerial": false,
"UseTcp": true,
"TcpPort": 4560,
"ControlPort": 14580,
"params": {
"NAV_RCL_ACT": 0,
"NAV_DLL_ACT": 0,
"LPE_LAT": 47.641468,
"LPE_LON": -122.140165,
"COM_OBL_ACT": 1
}
}
}
}
@bys_1123 can you create a new thread please? This thread is for 1.9.2.