mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-05-26 16:30:07 +08:00
Add Bayesian Obstacle Grid Mapping with TFmini Lidar Support and Simulation (#3510)
This commit is contained in:
committed by
GitHub
parent
b706cebb5a
commit
4e7259a17f
@@ -265,6 +265,7 @@
|
||||
<field name="stamp" type="uint32_t" unit="us"/>
|
||||
<field name="relpos" type="struct RelPosNED *"/>
|
||||
</message>
|
||||
|
||||
</msg_class>
|
||||
|
||||
</protocol>
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
<conf>
|
||||
<aircraft
|
||||
name="Rover_Lidar"
|
||||
ac_id="10"
|
||||
airframe="airframes/UCM/rover_lidar.xml"
|
||||
radio="radios/UCM/T16SZ_SBUS_rover.xml"
|
||||
telemetry="telemetry/default_lidar_telemetry.xml"
|
||||
flight_plan="flight_plans/UCM/mission_lidar.xml"
|
||||
settings=""
|
||||
settings_modules="modules/ahrs_float_dcm.xml modules/electrical.xml modules/gps.xml modules/gps_ublox.xml modules/gps_ubx_ucenter.xml modules/guidance_rover_steering.xml~SR Guidance~ modules/gvf_classic.xml~GVF~ modules/gvf_parametric.xml~GVF_PARAMETRIC~ modules/imu_common.xml modules/lidar_tfmini.xml modules/nav_rover_base.xml modules/obstacle_rover.xml~Obstacle Grid~ modules/servo_lidar.xml"
|
||||
gui_color="#35008400e400"
|
||||
/>
|
||||
</conf>
|
||||
@@ -0,0 +1,231 @@
|
||||
<!DOCTYPE airframe SYSTEM "../airframe.dtd">
|
||||
|
||||
<airframe name="boat">
|
||||
|
||||
<firmware name="rover">
|
||||
<autopilot name="rover_steering"/>
|
||||
|
||||
<target name="ap" board="matek_f405_wing_v1">
|
||||
<configure name="PERIODIC_FREQUENCY" value="100"/>
|
||||
<module name="radio_control" type="sbus">
|
||||
<configure name="SBUS_PORT" value="UART2"/>
|
||||
</module>
|
||||
</target>
|
||||
|
||||
<target name="nps" board="pc">
|
||||
<module name="radio_control" type="ppm"/>
|
||||
<module name="fdm" type="rover"/>
|
||||
<define name="NPS_BYPASS_AHRS" value="TRUE"/>
|
||||
<define name="NPS_BYPASS_INS" value="TRUE"/>
|
||||
<module name="telemetry_nps" dir="datalink" />
|
||||
</target>
|
||||
|
||||
<!-- Same board module as matek_f405 but with another IMU -->
|
||||
<module name="board" type="matek_f405_wing"/> <!-- IMU included -->
|
||||
|
||||
<module name="actuators" type="pwm"/>
|
||||
|
||||
<!--F405-WSE GPS and Compass connector are mapped to ports UART4 and I2C2 -->
|
||||
<module name="gps" type="ublox">
|
||||
<configure name="GPS_PORT" value="UART3"/>
|
||||
</module>
|
||||
<module name="gps_ubx_ucenter"/>
|
||||
|
||||
|
||||
<module name="ins"/>
|
||||
<module name="ahrs" type="float_dcm">
|
||||
<define name="AHRS_FLOAT_MIN_SPEED_GPS_COURSE" value="0.1"/>
|
||||
</module>
|
||||
|
||||
<module name="telemetry" type="xbee_api">
|
||||
<configure name="MODEM_PORT" value="UART1"/>
|
||||
</module>
|
||||
|
||||
<!-- Compass ublox m8n -->
|
||||
<!--F405-WSE GPS and Compass connector are mapped to ports UART4 and I2C2 -->
|
||||
<module name="mag_hmc58xx">
|
||||
<configure name="MAG_HMC58XX_I2C_DEV" value="I2C2"/>
|
||||
<define name="MODULE_HMC58XX_SYNC_SEND" value="TRUE"/>
|
||||
<define name="MODULE_HMC58XX_UPDATE_AHRS" value="TRUE"/>
|
||||
</module>
|
||||
|
||||
|
||||
<!-- Our modules -->
|
||||
<!-- Lidar related modules-->
|
||||
<module name="lidar_tfmini">
|
||||
<configure name="TFMINI_PORT" value="UART6"/>
|
||||
<configure name="TFMINI_BAUD" value="B115200"/>
|
||||
<configure name="LIDAR_OFFSET" value="0.20"/>
|
||||
<configure name="LIDAR_HEIGHT" value="0.24"/>
|
||||
<configure name="USE_TFMINI_AGL" value="TRUE"/>
|
||||
<configure name="TFMINI_COMPENSATE_ROTATION" value="TRUE"/>
|
||||
<configure name="TFMINI_ROVER" value="TRUE"/>
|
||||
</module>
|
||||
<module name="lidar_correction"/>
|
||||
<module name="servo_lidar"/>
|
||||
|
||||
<!-- Navegation -->
|
||||
<module name="nav" type="rover_base"/>
|
||||
|
||||
<module name="gvf" type="classic">
|
||||
<define name="GVF_OCAML_GCS" value="FALSE"/>
|
||||
</module>
|
||||
|
||||
<module name="gvf_parametric">
|
||||
<define name="GVF_PARAMETRIC_2D_BEZIER_N_SEG" value="4"/>
|
||||
</module>
|
||||
|
||||
<!-- Obstacle grid -->
|
||||
<module name="obstacle_rover">
|
||||
<define name="N_COL_GRID" value="100"/>
|
||||
<define name="N_ROW_GRID" value="100"/>
|
||||
</module>
|
||||
|
||||
|
||||
<module name="guidance" type="rover_steering">
|
||||
<define name="MAX_DELTA" value="15.0"/>
|
||||
<define name="DRIVE_SHAFT_DISTANCE" value="0.25"/>
|
||||
<define name="SR_MEASURED_KF" value="1400.0"/>
|
||||
<define name="MIN_CMD_SHUT" value="3800"/>
|
||||
<define name="MAX_CMD_SHUT" value="1350"/>
|
||||
<define name="MOV_AVG_M" value="200"/>
|
||||
</module>
|
||||
|
||||
</firmware>
|
||||
|
||||
|
||||
<!-- COMMANDS SECTION ..................................................................... -->
|
||||
<servos>
|
||||
<!-- "no" 1 and 2 but no 0 because our board don't have S0 actuator entry...
|
||||
On the board is the S3 and S4 -->
|
||||
<servo name="MOTOR_THROTTLE" no="2" min="1000" neutral="1500" max="2000"/>
|
||||
<servo name="MOTOR_STEERING" no="3" min="1000" neutral="1500" max="2000"/>
|
||||
<servo name="MOTOR_LIDAR" no="1" min="500" neutral="1500" max="2500"/>
|
||||
</servos>
|
||||
|
||||
<!-- Low level commands (PWM signal) -->
|
||||
<commands>
|
||||
<axis name="THROTTLE" failsafe_value="0"/>
|
||||
<axis name="STEERING" failsafe_value="0"/>
|
||||
<axis name="SERVO" failsafe_value="0"/>
|
||||
</commands>
|
||||
|
||||
<!-- When SetCommandsFromRC -->
|
||||
<rc_commands>
|
||||
<set command="THROTTLE" value="@THROTTLE"/>
|
||||
<set command="STEERING" value="@ROLL"/>
|
||||
</rc_commands>
|
||||
|
||||
<!-- When SetActuatorsFromCommands-->
|
||||
<command_laws>
|
||||
<set servo="MOTOR_THROTTLE" value="@THROTTLE"/>
|
||||
<set servo="MOTOR_STEERING" value="@STEERING"/>
|
||||
<set servo="MOTOR_LIDAR" value="@SERVO"/>
|
||||
</command_laws>
|
||||
|
||||
|
||||
<!-- SECTIONS: General config ............................................................. -->
|
||||
<section name="IMU" prefix="IMU_">
|
||||
<define name="BODY_TO_IMU_PHI" value="0." unit="deg"/>
|
||||
<define name="BODY_TO_IMU_THETA" value="0." unit="deg"/>
|
||||
<define name="BODY_TO_IMU_PSI" value="0." unit="deg"/>
|
||||
|
||||
|
||||
<!-- ....CALIBRATION 2023/12/04 .................................................... -->
|
||||
<define name="ACCEL_X_NEUTRAL" value="34"/>
|
||||
<define name="ACCEL_Y_NEUTRAL" value="13"/>
|
||||
<define name="ACCEL_Z_NEUTRAL" value="-217"/>
|
||||
<define name="ACCEL_X_SENS" value="4.910468072567044" integer="16"/>
|
||||
<define name="ACCEL_Y_SENS" value="4.87915023807254" integer="16"/>
|
||||
<define name="ACCEL_Z_SENS" value="4.787109540792222" integer="16"/>
|
||||
|
||||
<!-- ......CALIBRATION 2022/07/30..................................................... -->
|
||||
<define name="MAG_X_NEUTRAL" value="256"/>
|
||||
<define name="MAG_Y_NEUTRAL" value="-412"/>
|
||||
<define name="MAG_Z_NEUTRAL" value="71"/>
|
||||
<define name="MAG_X_SENS" value="3.707420822119781" integer="16"/>
|
||||
<define name="MAG_Y_SENS" value="4.148937385955166" integer="16"/>
|
||||
<define name="MAG_Z_SENS" value="3.242411432686237" integer="16"/>
|
||||
|
||||
|
||||
</section>
|
||||
|
||||
<section name="AHRS" prefix="AHRS_">
|
||||
<!-- values used if no GPS fix (i.e NPS), on 3D fix is update by geo_mag module if loaded -->
|
||||
<!-- Toulouse -->
|
||||
<define name="H_X" value="0.513081"/>
|
||||
<define name="H_Y" value="-0.00242783"/>
|
||||
<define name="H_Z" value="0.858336"/>
|
||||
<define name="USE_GPS" value="TRUE"/>
|
||||
</section>
|
||||
|
||||
<section name="AUTOPILOT">
|
||||
<define name="MODE_MANUAL" value="AP_MODE_DIRECT"/>
|
||||
<define name="MODE_AUTO1" value="AP_MODE_CRUISER"/>
|
||||
<define name="MODE_AUTO2" value="AP_MODE_NAV"/> <!-- Ignoring radio_control.values -->
|
||||
</section>
|
||||
|
||||
<section name="SIMULATOR" prefix="NPS_">
|
||||
<define name="SENSORS_PARAMS" value="nps_sensors_params_default.h" type="string"/>
|
||||
</section>
|
||||
|
||||
|
||||
<section name="BAT">
|
||||
<define name="CATASTROPHIC_BAT_LEVEL" value="6.35" unit="V"/>
|
||||
<define name="CRITIC_BAT_LEVEL" value="6.70" unit="V"/>
|
||||
<define name="LOW_BAT_LEVEL" value="7.05" unit="V"/>
|
||||
<define name="MAX_BAT_LEVEL" value="8.44" unit="V"/>
|
||||
<define name="MILLIAMP_AT_FULL_THROTTLE" value="1800" unit="mA"/>
|
||||
<define name="MILLIAMP_AT_IDLE_THROTTLE" value="1000" unit="mA"/>
|
||||
</section>
|
||||
|
||||
<section name="GCS">
|
||||
<define name="AC_ICON" value="rover"/>
|
||||
</section>
|
||||
|
||||
|
||||
<!-- Maps -->
|
||||
<section name="OBSTACLE_CONFIG" prefix="OBSTACLE_">
|
||||
<define name="WALLS" type="array">
|
||||
<!-- Padel South Wall -->
|
||||
<field type="struct">
|
||||
<field name="count" value="2"/>
|
||||
<field name="points" type="struct">
|
||||
<field value="{40.4512650, -3.7291591, 650.0}"/>
|
||||
<field value="{40.4512050, -3.7291535, 650.0}"/>
|
||||
</field>
|
||||
</field>
|
||||
|
||||
<!-- Padel West Wall -->
|
||||
<field type="struct">
|
||||
<field name="count" value="3"/>
|
||||
<field name="points" type="struct">
|
||||
<field value="{40.4512037, -3.7291532, 650.0}"/>
|
||||
<field value="{40.4512084, -3.7291015, 650.0}"/>
|
||||
<field value="{40.4512295, -3.7289073, 650.0}"/>
|
||||
</field>
|
||||
</field>
|
||||
|
||||
<!-- Tower -->
|
||||
<field type="struct">
|
||||
<field name="count" value="4"/>
|
||||
<field name="points" type="struct">
|
||||
<field value="{40.4513016, -3.7289494, 650.0}"/>
|
||||
<field value="{40.4513006, -3.7289645, 650.0}"/>
|
||||
<field value="{40.4513107, -3.7289655, 650.0}"/>
|
||||
<field value="{40.4513120, -3.7289500, 650.0}"/>
|
||||
</field>
|
||||
</field>
|
||||
|
||||
<!-- Grades -->
|
||||
<field type="struct">
|
||||
<field name="count" value="2"/>
|
||||
<field name="points" type="struct">
|
||||
<field value="{40.451918, -3.729198, 650.0}"/>
|
||||
<field value="{40.452028, -3.728153, 650.0}"/>
|
||||
</field>
|
||||
</field>
|
||||
</define>
|
||||
</section>
|
||||
|
||||
</airframe>
|
||||
@@ -0,0 +1,92 @@
|
||||
<?xml version="1.0"?>
|
||||
<!DOCTYPE flight_plan SYSTEM "../flight_plan.dtd">
|
||||
<flight_plan alt="660" ground_alt="650" lat0="40.4512539" lon0="-3.7289867" max_dist_from_home="2500" name="Rover Steering" security_height="0.3">
|
||||
|
||||
<header>
|
||||
</header>
|
||||
|
||||
<waypoints>
|
||||
<waypoint name="HOME" x="0.0" y="0.0"/>
|
||||
<waypoint lat="40.4515279" lon="-3.7289089" name="STDBY" />
|
||||
<waypoint lat="40.4512609" lon="-3.7290940" name="ELLIPSE" />
|
||||
<waypoint lat="40.4516215" lon="-3.7290142" name="P1" />
|
||||
<waypoint lat="40.4517065" lon="-3.7282202" name="P2"/>
|
||||
|
||||
<waypoint name="_N1" x="90" y="90"/>
|
||||
<waypoint name="_N2" x="90" y="-90"/>
|
||||
<waypoint name="_N3" x="-90" y="-90"/>
|
||||
<waypoint name="_N4" x="-90" y="90"/>
|
||||
|
||||
|
||||
<waypoint name="_G1" x="-50" y="-50"/>
|
||||
<waypoint name="_G2" x="50" y="-50"/>
|
||||
<waypoint name="_G3" x="50" y="50"/>
|
||||
<waypoint name="_G4" x="-50" y="50"/>
|
||||
</waypoints>
|
||||
|
||||
<sectors>
|
||||
<sector color="red" name="Net">
|
||||
<corner name="_N1"/>
|
||||
<corner name="_N2"/>
|
||||
<corner name="_N3"/>
|
||||
<corner name="_N4"/>
|
||||
</sector>
|
||||
<sector color="blue" name="Grid">
|
||||
<corner name="_G1"/>
|
||||
<corner name="_G2"/>
|
||||
<corner name="_G3"/>
|
||||
<corner name="_G4"/>
|
||||
</sector>
|
||||
</sectors>
|
||||
|
||||
<variables>
|
||||
<variable init="5.0" max="10.0" min="1.0" step="1.0" var="a_stb"/>
|
||||
<variable init="5.0" max="10.0" min="1.0" step="1.0" var="b_stb"/>
|
||||
</variables>
|
||||
|
||||
<blocks>
|
||||
<block name="Wait GPS" strip_icon="gps.png">
|
||||
<call_once fun="NavKillThrottle()"/>
|
||||
<while cond="!GpsFixValid()"/>
|
||||
</block>
|
||||
<block name="Geo init" strip_icon="googleearth.png">
|
||||
<while cond="LessThan(NavBlockTime(), 10)"/>
|
||||
<call_once fun="NavSetGroundReferenceHere()"/>
|
||||
<call_once fun="NavSetAltitudeReferenceHere()"/>
|
||||
<call_once fun="init_grid_4(WP__G1, WP__G2, WP__G3, WP__G4)"/> <!-- Init obstacle grid -->
|
||||
</block>
|
||||
|
||||
<block name="Start Engine" strip_icon="on.png">
|
||||
<while cond="LessThan(NavBlockTime(), 1)"/>
|
||||
<call_once fun="autopilot_set_motors_on(TRUE)"/>
|
||||
</block>
|
||||
|
||||
<block key="s" name="Standby" strip_button="Standby" strip_icon="home.png" group="home">
|
||||
<call fun="nav_gvf_ellipse_wp(WP_ELLIPSE, a_stb, b_stb, gvf_ellipse_par.alpha)"/>
|
||||
</block>
|
||||
|
||||
<block name="line_to_HOME" strip_icon="home_drop.png">
|
||||
<call fun="nav_gvf_segment_XY1_XY2(GetPosX(), GetPosY(), 0.f, 0.f)"/>
|
||||
</block>
|
||||
|
||||
<block name="ellipse_wp" strip_icon="oval.png">
|
||||
<call fun="nav_gvf_ellipse_wp(WP_ELLIPSE, a_stb, b_stb, gvf_ellipse_par.alpha)"/>
|
||||
</block>
|
||||
|
||||
<block name="nav_gvf_ellipse_XY" strip_icon="oval.png">
|
||||
<call fun="nav_gvf_ellipse_XY(10.1, 10.1, gvf_ellipse_par.a, gvf_ellipse_par.b, gvf_ellipse_par.alpha)"/>
|
||||
</block>
|
||||
|
||||
<block name="line_P1_P2" strip_icon="line.png">
|
||||
<call fun="nav_gvf_line_wp1_wp2(WP_P1, WP_P2)"/>
|
||||
</block>
|
||||
|
||||
<block name="segment_turn_P1_P2" strip_icon="line.png">
|
||||
<call fun="nav_gvf_segment_loop_wp1_wp2(WP_P1, WP_P2, gvf_segment_par.d1, gvf_segment_par.d2)"/>
|
||||
</block>
|
||||
|
||||
<block name="sin_p1_p2" strip_icon="line_drop.png">
|
||||
<call fun="nav_gvf_sin_wp1_wp2(WP_P1, WP_P2, gvf_sin_par.w, gvf_sin_par.off, gvf_sin_par.A)"/>
|
||||
</block>
|
||||
</blocks>
|
||||
</flight_plan>
|
||||
@@ -0,0 +1,26 @@
|
||||
<!DOCTYPE module SYSTEM "module.dtd">
|
||||
|
||||
<module name="lidar_correction" dir="lidar/slam">
|
||||
<doc>
|
||||
<description>
|
||||
LIDAR correction for SLAM applications
|
||||
Includes functions used to simulate the LIDAR data
|
||||
(Optional module for advanced LIDAR processing)
|
||||
</description>
|
||||
<configure name="USE_LIDAR_CORRECTION" value="true" description="Enable LIDAR correction module"/>
|
||||
</doc>
|
||||
|
||||
<header>
|
||||
<file name="lidar_correction.h"/>
|
||||
</header>
|
||||
|
||||
<init fun="init_walls()"/>
|
||||
|
||||
<makefile target="ap|nps">
|
||||
<configure name="USE_LIDAR_CORRECTION" default="true"/>
|
||||
<define name="USE_LIDAR_CORRECTION" value="$(USE_LIDAR_CORRECTION)"/>
|
||||
<configure name="OBSTACLES_CONFIG" default="ucm_football"/>
|
||||
<define name="OBSTACLES_CONFIG_FILE" value="modules/lidar/maps/$(OBSTACLES_CONFIG).h"/>
|
||||
<file name="lidar_correction.c"/>
|
||||
</makefile>
|
||||
</module>
|
||||
@@ -3,19 +3,26 @@
|
||||
<module name="lidar_tfmini" dir="lidar">
|
||||
<doc>
|
||||
<description>
|
||||
TFMini Lidar using a single UART for communication
|
||||
TFMini Lidar driver with separate implementations for:
|
||||
- Real hardware using a single UART for communication (ap target)
|
||||
- NPS simulator (nps target)
|
||||
</description>
|
||||
<configure name="TFMINI_PORT" value="UART3" description="UART device to use for lidar"/>
|
||||
<configure name="TFMINI_BAUD" value="B115200" description="baudrate of the TFMini UART port"/>
|
||||
<configure name="USE_TFMINI_AGL" value="0" description="use this lidar for AGL measurements"/>
|
||||
<configure name="TFMINI_COMPENSATE_ROTATION" value="1" description="compensate AGL measurements for body rotation"/>
|
||||
<configure name="USE_TFMINI_AGL" value="true" description="use this lidar for AGL measurements"/>
|
||||
<configure name="TFMINI_COMPENSATE_ROTATION" value="0" description="compensate AGL measurements for body rotation"/>
|
||||
<configure name="TFMINI_ROVER" value="0" description="is this lidar mounted on a rover? Change the way to calculate the compensation"/>
|
||||
<configure name="LIDAR_OFFSET" value="0.0" description="Horizontal offset from vehicle center to LIDAR [m]"/>
|
||||
<configure name="LIDAR_HEIGHT" value="0.0" description="Vertical height from ground to LIDAR [m]"/>
|
||||
<configure name="LIDAR_MIN_RANGE" value="0.1" description="minimum range of the lidar in meters (see datasheet)"/>
|
||||
<configure name="LIDAR_MAX_RANGE" value="12.0" description="maximum range of the lidar in meters (see datasheet)"/>
|
||||
</doc>
|
||||
|
||||
<settings>
|
||||
<dl_settings NAME="Lidar TFMini">
|
||||
<dl_settings NAME="Lidar">
|
||||
<dl_setting MAX="1" MIN="0" STEP="1" VAR="tfmini.compensate_rotation" shortname="derotate_agl"/>
|
||||
<dl_setting MAX="1" MIN="0" STEP="1" VAR="tfmini.update_agl" shortname="update_agl"/>
|
||||
<dl_setting MAX="1" MIN="0" STEP="1" VAR="tfmini.compensate_rotation" shortname="compensate_rotation"/>
|
||||
<dl_setting MAX="1" MIN="0" STEP="1" VAR="tfmini.update_agl" shortname="update_agl"/>
|
||||
</dl_settings>
|
||||
</dl_settings>
|
||||
</settings>
|
||||
@@ -29,7 +36,9 @@
|
||||
</header>
|
||||
<init fun="tfmini_init()"/>
|
||||
<event fun="tfmini_event()"/>
|
||||
<makefile>
|
||||
|
||||
|
||||
<makefile target="ap">
|
||||
<!-- Configure default UART port and baudrate -->
|
||||
<configure name="TFMINI_PORT" default="UART3" case="upper|lower"/>
|
||||
<configure name="TFMINI_BAUD" default="B115200"/>
|
||||
@@ -39,14 +48,36 @@
|
||||
<define name="$(TFMINI_PORT_UPPER)_BAUD" value="$(TFMINI_BAUD)"/>
|
||||
<define name="TFMINI_PORT" value="$(TFMINI_PORT_LOWER)"/>
|
||||
|
||||
<configure name="USE_TFMINI_AGL" default="0"/>
|
||||
<!-- Compensation constants -->
|
||||
<configure name="LIDAR_OFFSET" default="0.0"/>
|
||||
<configure name="LIDAR_HEIGHT" default="0.0"/>
|
||||
<define name="LIDAR_OFFSET" value="$(LIDAR_OFFSET)"/>
|
||||
<define name="LIDAR_HEIGHT" value="$(LIDAR_HEIGHT)"/>
|
||||
|
||||
<configure name="USE_TFMINI_AGL" default="true"/>
|
||||
<configure name="TFMINI_COMPENSATE_ROTATION" default="0"/>
|
||||
<configure name="TFMINI_ROVER" default="0"/>
|
||||
<define name="USE_TFMINI_AGL" value="$(USE_TFMINI_AGL)"/>
|
||||
<define name="TFMINI_COMPENSATE_ROTATION" value="$(TFMINI_COMPENSATE_ROTATION)"/>
|
||||
<define name="TFMINI_ROVER" value="$(TFMINI_ROVER)"/>
|
||||
<file name="tfmini.c"/>
|
||||
</makefile>
|
||||
|
||||
<makefile target="nps">
|
||||
<define name="USE_SONAR" value="1"/><!-- in NPS use a virtual sonar to simulate lidar measurements -->
|
||||
<!-- Configure default UART port and baudrate -->
|
||||
<configure name="TFMINI_PORT" default="UART3" case="upper|lower"/>
|
||||
<configure name="TFMINI_BAUD" default="B115200"/>
|
||||
|
||||
<!-- Enable UART and set baudrate -->
|
||||
<define name="USE_$(TFMINI_PORT_UPPER)"/>
|
||||
<define name="$(TFMINI_PORT_UPPER)_BAUD" value="$(TFMINI_BAUD)"/>
|
||||
<define name="TFMINI_PORT" value="$(TFMINI_PORT_LOWER)"/>
|
||||
|
||||
<configure name="LIDAR_MIN_RANGE" default="0.1"/>
|
||||
<configure name="LIDAR_MAX_RANGE" default="12.0"/>
|
||||
<define name="LIDAR_MIN_RANGE" value="$(LIDAR_MIN_RANGE)"/>
|
||||
<define name="LIDAR_MAX_RANGE" value="$(LIDAR_MAX_RANGE)"/>
|
||||
<file name="tfmini_nps.c"/>
|
||||
</makefile>
|
||||
</module>
|
||||
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
<!DOCTYPE module SYSTEM "module.dtd">
|
||||
|
||||
<module name="obstacle_rover" dir="firmwares/rover/obstacles">
|
||||
<doc>
|
||||
<description>
|
||||
Obstacle rover grid
|
||||
</description>
|
||||
<define name="USE_GRID" value="TRUE|FALSE" description="Use it to enable this module"/>
|
||||
</doc>
|
||||
|
||||
<settings name="Obstacle Grid">
|
||||
<dl_settings>
|
||||
<dl_settings NAME="Obstacle Grid">
|
||||
<dl_setting MAX="1" MIN="0.5" STEP="0.05" VAR="obstacle_grid.map.threshold" shortname="threshold"/>
|
||||
<dl_setting MAX="1" MIN="0.5" STEP="0.05" VAR="obstacle_grid.map.occ" shortname="occupied"/>
|
||||
<dl_setting MAX="0.5" MIN="0" STEP="0.05" VAR="obstacle_grid.map.free" shortname="free"/>
|
||||
<dl_setting MAX="10" MIN="1" STEP="1" VAR="grid_block_size" shortname="radius"/>
|
||||
<dl_setting MAX="20" MIN="0" STEP="1" VAR="obstacle_grid.map.decay" shortname="decay"/>
|
||||
</dl_settings>
|
||||
</dl_settings>
|
||||
</settings>
|
||||
|
||||
|
||||
|
||||
<header>
|
||||
<file name="rover_obstacles.h"/>
|
||||
</header>
|
||||
<periodic fun="decay_map()" freq="100" autorun="TRUE"/>
|
||||
|
||||
<makefile firmware="rover">
|
||||
<file name="rover_obstacles.c" dir="$(SRC_FIRMWARE)/obstacles"/>
|
||||
<define name="USE_GRID" value="TRUE"/>
|
||||
</makefile>
|
||||
|
||||
</module>
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
<!DOCTYPE module SYSTEM "module.dtd">
|
||||
|
||||
<module name="servo_lidar" dir="lidar/slam">
|
||||
<doc>
|
||||
<description>
|
||||
Servo-mounted LIDAR scanning system
|
||||
(Uses tfmini driver and provides scanning functionality)
|
||||
</description>
|
||||
<configure name="USE_SERVO_LIDAR" value="true|false" description="To enable the servo module"/>
|
||||
</doc>
|
||||
|
||||
<settings>
|
||||
<dl_settings NAME="Servo LIDAR">
|
||||
<dl_settings NAME="Servo LIDAR">
|
||||
<dl_setting var="servoLidar.enabled" min="0" step="1" max="1" shortname="Enable" values="Disabled|Enabled"/>
|
||||
<dl_setting var="servoLidar.speed" min="1" step="1" max="20" shortname="Speed"/>
|
||||
</dl_settings>
|
||||
</dl_settings>
|
||||
</settings>
|
||||
|
||||
<header>
|
||||
<file name="servo_lidar.h"/>
|
||||
</header>
|
||||
|
||||
<init fun="servoLidar_init()"/>
|
||||
<periodic fun="servoLidar_periodic()" freq="100" autorun="TRUE"/>
|
||||
|
||||
<makefile target="ap|nps">
|
||||
<configure name="USE_SERVO_LIDAR" default="TRUE"/>
|
||||
<define name="USE_SERVO_LIDAR" value="$(USE_SERVO_LIDAR)"/>
|
||||
<file name="servo_lidar.c"/>
|
||||
</makefile>
|
||||
</module>
|
||||
@@ -0,0 +1,72 @@
|
||||
<?xml version="1.0"?>
|
||||
<!DOCTYPE telemetry SYSTEM "telemetry.dtd">
|
||||
<telemetry>
|
||||
<process name="Main">
|
||||
|
||||
<mode name="default" key_press="d">
|
||||
|
||||
<message name="INFO_MSG" period="1.0"/>
|
||||
<message name="ALIVE" period="2.7"/>
|
||||
<message name="ATTITUDE" period="0.5"/>
|
||||
<message name="AUTOPILOT_VERSION" period="11.1"/>
|
||||
<message name="DATALINK_REPORT" period="5.1"/>
|
||||
<message name="ENERGY" period="8.5"/>
|
||||
<message name="GPS_INT" period="0.35"/>
|
||||
<message name="GPS_SOL" period="2.0"/>
|
||||
<message name="INS" period="0.2"/>
|
||||
<message name="INS_REF" period="5.1"/>
|
||||
<message name="ROTORCRAFT_FP" period="0.35"/>
|
||||
<message name="ROTORCRAFT_NAV_STATUS" period="1.6"/>
|
||||
<message name="WP_MOVED" period="2.3"/>
|
||||
|
||||
|
||||
<message name="GVF" period="4.0"/>
|
||||
<message name="GVF_PARAMETRIC" period="2.0"/>
|
||||
|
||||
<message name="LIDAR" period="0.2"/>
|
||||
<message name="SLAM" period="0.2"/>
|
||||
<message name="GRID_INIT" period="15.0"/>
|
||||
|
||||
</mode>
|
||||
|
||||
<mode name="low" key_press="l">
|
||||
<message name="AUTOPILOT_VERSION" period="11.1"/>
|
||||
<message name="ROVER_STATUS" period="1.2"/>
|
||||
<message name="ROTORCRAFT_FP" period="1.0"/>
|
||||
<message name="ALIVE" period="2.1"/>
|
||||
<message name="DL_VALUE" period="1.1"/>
|
||||
<message name="ROTORCRAFT_NAV_STATUS" period="1.6"/>
|
||||
<message name="WP_MOVED" period="1.3"/>
|
||||
<message name="INS_REF" period="5.1"/>
|
||||
<message name="ENERGY" period="2.5"/>
|
||||
<message name="DATALINK_REPORT" period="5.1"/>
|
||||
<message name="STATE_FILTER_STATUS" period="3.2"/>
|
||||
</mode>
|
||||
|
||||
<mode name="rc">
|
||||
<message name="DL_VALUE" period="0.5"/>
|
||||
<message name="ALIVE" period="2.1"/>
|
||||
<message name="PPM" period="0.5"/>
|
||||
<message name="RC" period="0.5"/>
|
||||
<message name="ROTORCRAFT_RADIO_CONTROL" period="0.5"/>
|
||||
<message name="ROVER_STATUS" period="1.2"/>
|
||||
</mode>
|
||||
|
||||
<mode name="raw_sensors">
|
||||
<message name="ROVER_STATUS" period="1.2"/>
|
||||
<message name="DL_VALUE" period="0.5"/>
|
||||
<message name="ALIVE" period="2.1"/>
|
||||
<message name="IMU_ACCEL_RAW" period=".05"/>
|
||||
<message name="IMU_GYRO_RAW" period=".05"/>
|
||||
<message name="IMU_MAG_RAW" period=".05"/>
|
||||
<message name="BARO_RAW" period=".1"/>
|
||||
</mode>
|
||||
|
||||
<mode name="aligner">
|
||||
<message name="ALIVE" period="0.9"/>
|
||||
<message name="FILTER_ALIGNER" period="0.02"/>
|
||||
</mode>
|
||||
|
||||
</process>
|
||||
|
||||
</telemetry>
|
||||
Reference in New Issue
Block a user