Skip to content

Commit

Permalink
replace vlp16 to xt32
Browse files Browse the repository at this point in the history
Signed-off-by: Autumn60 <[email protected]>
  • Loading branch information
Autumn60 committed Nov 14, 2024
1 parent cc02a7b commit 41398ef
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 68 deletions.
2 changes: 1 addition & 1 deletion aip_x1_description/config/sensor_kit_calibration.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
sensor_kit_base_link:
velodyne_top_base_link:
pandar_xt32_top_base_link:
x: 0.000
y: 0.000
z: 0.000
Expand Down
48 changes: 20 additions & 28 deletions aip_x1_description/urdf/sensor_kit.xacro
Original file line number Diff line number Diff line change
@@ -1,44 +1,36 @@
<?xml version="1.0"?>
<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:include filename="$(find pandar_description)/urdf/pandar_xt32.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"/>
<xacro:property name="sensor_kit_base_link" default="sensor_kit_base_link"/>
<xacro:arg name="gpu" default="false" />
<xacro:arg name="config_dir" default="$(find aip_x1_description)/config" />
<xacro:property name="sensor_kit_base_link" default="sensor_kit_base_link" />

<joint name="${sensor_kit_base_link}_joint" type="fixed">
<origin rpy="${roll} ${pitch} ${yaw}" xyz="${x} ${y} ${z}"/>
<parent link="${parent}"/>
<child link="${sensor_kit_base_link}"/>
<origin rpy="${roll} ${pitch} ${yaw}" xyz="${x} ${y} ${z}" />
<parent link="${parent}" />
<child link="${sensor_kit_base_link}" />
</joint>
<link name="${sensor_kit_base_link}">
<origin rpy="0 0 0" xyz="0 0 0"/>
<origin rpy="0 0 0" xyz="0 0 0" />
</link>

<!-- sensor -->
<xacro:property name="calibration" value="${xacro.load_yaml('$(arg config_dir)/sensor_kit_calibration.yaml')}"/>
<xacro:property name="calibration"
value="${xacro.load_yaml('$(arg config_dir)/sensor_kit_calibration.yaml')}" />
<!-- lidar -->
<xacro:VLP-16
<xacro:PandarXT-32
name="pandar_xt32_top"
parent="sensor_kit_base_link"
name="velodyne_top"
topic="/points_raw"
hz="10"
samples="220"
gpu="$(arg gpu)"
>
<origin
xyz="${calibration['sensor_kit_base_link']['velodyne_top_base_link']['x']}
${calibration['sensor_kit_base_link']['velodyne_top_base_link']['y']}
${calibration['sensor_kit_base_link']['velodyne_top_base_link']['z']}"
rpy="${calibration['sensor_kit_base_link']['velodyne_top_base_link']['roll']}
${calibration['sensor_kit_base_link']['velodyne_top_base_link']['pitch']}
${calibration['sensor_kit_base_link']['velodyne_top_base_link']['yaw']}"
/>
</xacro:VLP-16>

<xacro:include filename="$(find pandar_description)/urdf/pandar_xt32.xacro"/>
x="${calibration['sensor_kit_base_link']['pandar_xt32_top_base_link']['x']}"
y="${calibration['sensor_kit_base_link']['pandar_xt32_top_base_link']['y']}"
z="${calibration['sensor_kit_base_link']['pandar_xt32_top_base_link']['z']}"
roll="${calibration['sensor_kit_base_link']['pandar_xt32_top_base_link']['roll']}"
pitch="${calibration['sensor_kit_base_link']['pandar_xt32_top_base_link']['pitch']}"
yaw="${calibration['sensor_kit_base_link']['pandar_xt32_top_base_link']['yaw']}"
/>
<xacro:PandarXT-32
name="pandar_xt32_front_center"
parent="sensor_kit_base_link"
Expand Down
25 changes: 0 additions & 25 deletions aip_x1_launch/config/diagnostic_aggregator/sensor_kit.param.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,31 +17,6 @@
type: diagnostic_aggregator/AnalyzerGroup
path: lidar
analyzers:
velodyne:
type: diagnostic_aggregator/AnalyzerGroup
path: velodyne
analyzers:
health_monitoring:
type: diagnostic_aggregator/AnalyzerGroup
path: health_monitoring
analyzers:
connection:
type: diagnostic_aggregator/GenericAnalyzer
path: connection
contains: [": velodyne_connection"]
timeout: 3.0

temperature:
type: diagnostic_aggregator/GenericAnalyzer
path: temperature
contains: [": velodyne_temperature"]
timeout: 3.0

rpm:
type: diagnostic_aggregator/GenericAnalyzer
path: rpm
contains: [": velodyne_rpm"]
timeout: 3.0
pandar:
type: diagnostic_aggregator/AnalyzerGroup
path: pandar
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,6 @@
pandar_temperature: default
pandar_ptp: default

# velodyne
velodyne_connection: default
velodyne_temperature: default
velodyne_rpm: default

sensing_topic_status: default

# imu
Expand Down
23 changes: 14 additions & 9 deletions aip_x1_launch/launch/lidar.launch.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,22 @@
<push-ros-namespace namespace="lidar"/>

<group>
<push-ros-namespace namespace="top"/>
<include file="$(find-pkg-share common_sensor_launch)/launch/velodyne_VLP16.launch.xml">
<arg name="sensor_frame" value="velodyne_top" />
<arg name="device_ip" value="192.168.1.20"/>
<arg name="host_ip" value="$(var host_ip)"/>
<arg name="data_port" value="2368"/>
<arg name="scan_phase" value="180.0" />
<push-ros-namespace namespace="top" />
<include file="$(find-pkg-share common_sensor_launch)/launch/hesai_XT32.launch.xml">
<arg name="sensor_frame" value="pandar_xt32_top" />
<arg name="sensor_ip" value="192.168.3.200" />
<arg name="data_port" value="2321" />
<arg name="gnss_port" value="10121" />
<arg name="scan_phase" value="0.0" />
<arg name="cloud_min_angle" value="0"/>
<arg name="cloud_max_angle" value="360"/>
<arg name="min_range" value="0.05"/>
<arg name="max_range" value="200.0"/>
<arg name="return_mode" value="Strongest" />
<arg name="config_file" value="$(find-pkg-share individual_params)/config/$(var vehicle_id)/aip_x1/xt32_top.csv" />
<arg name="launch_driver" value="$(var launch_driver)" />
<arg name="vehicle_mirror_param_file" value="$(var vehicle_mirror_param_file)" />
<arg name="container_name" value="pointcloud_container"/>
<arg name="enable_blockage_diag" value="$(var enable_blockage_diag)"/>
</include>
</group>

Expand All @@ -40,7 +45,7 @@
<arg name="min_range" value="0.05"/>
<arg name="max_range" value="200.0"/>
<arg name="return_mode" value="Strongest" />
<arg name="config_file" value="$(find-pkg-share individual_params)/config/$(var vehicle_id)/aip_x1/xt32.csv" />
<arg name="config_file" value="$(find-pkg-share individual_params)/config/$(var vehicle_id)/aip_x1/xt32_front_center.csv" />
<arg name="launch_driver" value="$(var launch_driver)" />
<arg name="vehicle_mirror_param_file" value="$(var vehicle_mirror_param_file)" />
<arg name="container_name" value="pointcloud_container"/>
Expand Down

0 comments on commit 41398ef

Please sign in to comment.