Skip to content

Commit

Permalink
feat: add use_awsim option and add gnss imu
Browse files Browse the repository at this point in the history
Signed-off-by: 1222-takeshi <[email protected]>
  • Loading branch information
1222-takeshi committed Dec 13, 2023
1 parent af61034 commit e62ce04
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 4 deletions.
27 changes: 27 additions & 0 deletions aip_x1_description/urdf/sensor_kit.xacro
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<robot xmlns:xacro="http://ros.org/wiki/xacro">
<xacro:macro name="sensor_kit_macro" params="parent x y z roll pitch yaw">
<xacro:include filename="$(find velodyne_description)/urdf/VLP-16.urdf.xacro"/>
<xacro:include filename="$(find imu_description)/urdf/imu.xacro"/>

<xacro:arg name="gpu" default="false"/>
<xacro:arg name="config_dir" default="$(find aip_x1_description)/config"/>
Expand Down Expand Up @@ -67,5 +68,31 @@
pitch="${calibration['sensor_kit_base_link']['livox_front_right_base_link']['pitch']}"
yaw="${calibration['sensor_kit_base_link']['livox_front_right_base_link']['yaw']}"
/>
<!-- gnss -->
<xacro:imu_macro
name="gnss"
parent="sensor_kit_base_link"
namespace=""
x="${calibration['sensor_kit_base_link']['gnss_link']['x']}"
y="${calibration['sensor_kit_base_link']['gnss_link']['y']}"
z="${calibration['sensor_kit_base_link']['gnss_link']['z']}"
roll="${calibration['sensor_kit_base_link']['gnss_link']['roll']}"
pitch="${calibration['sensor_kit_base_link']['gnss_link']['pitch']}"
yaw="${calibration['sensor_kit_base_link']['gnss_link']['yaw']}"
fps="100"
/>
<!-- imu -->
<xacro:imu_macro
name="tamagawa/imu"
parent="sensor_kit_base_link"
namespace=""
x="${calibration['sensor_kit_base_link']['tamagawa/imu_link']['x']}"
y="${calibration['sensor_kit_base_link']['tamagawa/imu_link']['y']}"
z="${calibration['sensor_kit_base_link']['tamagawa/imu_link']['z']}"
roll="${calibration['sensor_kit_base_link']['tamagawa/imu_link']['roll']}"
pitch="${calibration['sensor_kit_base_link']['tamagawa/imu_link']['pitch']}"
yaw="${calibration['sensor_kit_base_link']['tamagawa/imu_link']['yaw']}"
fps="100"
/>
</xacro:macro>
</robot>
3 changes: 2 additions & 1 deletion aip_x1_launch/launch/imu.launch.xml
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
<launch>

<arg name="launch_driver" default="true" />
<arg name="input_topic" default="/sensing/lidar/front_center/livox/imu" />

<group>
<push-ros-namespace namespace="imu"/>

<include file="$(find-pkg-share imu_corrector)/launch/imu_corrector.launch.xml">
<arg name="input_topic" value="/sensing/lidar/front_center/livox/imu" />
<arg name="input_topic" value="$(var input_topic)" />
<arg name="output_topic" value="/sensing/imu/imu_data" />
<arg name="param_file" value="$(find-pkg-share individual_params)/config/$(env VEHICLE_ID default)/aip_x1/imu_corrector.param.yaml" />
</include>
Expand Down
7 changes: 4 additions & 3 deletions aip_x1_launch/launch/lidar.launch.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
<arg name="vehicle_mirror_param_file" />
<arg name="use_pointcloud_container" default="false" description="launch pointcloud container"/>
<arg name="pointcloud_container_name" default="pointcloud_container"/>
<arg name="use_awsim" default="false" description="launch awsim"/>

<!-- x1 additional setting -->
<arg name="livox_min_range" default="1.5" />
Expand All @@ -27,7 +28,7 @@
</include>
</group>

<group>
<group unless="$(var use_awsim)">
<group>
<push-ros-namespace namespace="front_right"/>
<include file="$(find-pkg-share aip_x1_launch)/launch/new_livox_horizon.launch.py">
Expand All @@ -54,14 +55,14 @@
</group>
</group>

<include file="$(find-pkg-share aip_x1_launch)/launch/pointcloud_preprocessor.launch.py">
<include file="$(find-pkg-share aip_x1_launch)/launch/pointcloud_preprocessor.launch.py" unless="$(var use_awsim)">
<arg name="base_frame" value="base_link" />
<arg name="use_intra_process" value="true" />
<arg name="use_multithread" value="false" />
<arg name="use_pointcloud_container" value="$(var use_pointcloud_container)" />
<arg name="container_name" value="$(var pointcloud_container_name)"/>
</include>

<include file="$(find-pkg-share aip_x1_launch)/launch/topic_state_monitor.launch.py" />
<include file="$(find-pkg-share aip_x1_launch)/launch/topic_state_monitor.launch.py" unless="$(var use_awsim)" />
</group>
</launch>
5 changes: 5 additions & 0 deletions aip_x1_launch/launch/sensing.launch.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
<arg name="vehicle_mirror_param_file" description="path to the file of vehicle mirror position yaml"/>
<arg name="use_pointcloud_container" default="false" description="launch pointcloud container"/>
<arg name="pointcloud_container_name" default="pointcloud_container"/>
<arg name="use_awsim" default="false" description="launch awsim"/>
<let name="input_topic" value="tamagawa/imu_raw" if ="$(var use_awsim)"/>
<let name="input_topic" value="/sensing/lidar/front_center/livox/imu" unless ="$(var use_awsim)"/>

<group>

Expand All @@ -13,6 +16,7 @@
<arg name="vehicle_mirror_param_file" value="$(var vehicle_mirror_param_file)" />
<arg name="use_pointcloud_container" value="$(var use_pointcloud_container)" />
<arg name="pointcloud_container_name" value="$(var pointcloud_container_name)"/>
<arg name="use_awsim" value="$(var use_awsim)"/>
</include>

<!-- Camera Driver -->
Expand All @@ -23,6 +27,7 @@
<!-- IMU Driver -->
<include file="$(find-pkg-share aip_x1_launch)/launch/imu.launch.xml">
<arg name="launch_driver" value="$(var launch_driver)" />
<arg name="input_topic" value="$(var input_topic)" />
</include>

<!-- GNSS Driver -->
Expand Down

0 comments on commit e62ce04

Please sign in to comment.