-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from ori-drs/feat/consistent-frames
Consistent frames for QT64 and XT32 lidars
- Loading branch information
Showing
13 changed files
with
348 additions
and
86 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,4 @@ | ||
# hesai_description | ||
URDF Model of hesai lidar products | ||
This package contains a **URDF Xacro description of the Hesai XT32 and QT64 lidars**. In simulation the Gazebo Velodyne plug-in is used. The meshes were obtained from the original CAD provided by Hesai. | ||
|
||
The mesh was obtained from the original CAD provided by HESAI. | ||
|
||
This repository is not associated to or maintained by HESAI. | ||
This repository is not associated to or maintained by Hesai. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
<?xml version="1.0"?> | ||
<robot xmlns:xacro="http://www.ros.org/wiki/xacro"> | ||
|
||
<!-- Copyright 2024 University of Oxford | ||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
--> | ||
|
||
<xacro:macro name="hesai_gazebo" params="lidar_frame:=pandar topic_name=/hesai/pandar | ||
min_range:=0.4 max_range:=80.0 min_horizontal_angle:=-180.0 max_horizontal_angle:=180.0 | ||
min_vertical_angle:=-16.0 max_vertical_angle:=15.0 hz:=10 samples:=2000 lasers:=32 | ||
collision_range:=0.3 noise:=0.008 visualize:=false use_gpu:=true"> | ||
|
||
<gazebo reference="${lidar_frame}"> | ||
<xacro:if value="${use_gpu}"> | ||
<xacro:property name="ray_type" value="gpu_ray" /> | ||
<xacro:property name="laser_plugin" value="libgazebo_ros_velodyne_gpu_laser.so" /> | ||
</xacro:if> | ||
<xacro:unless value="${use_gpu}"> | ||
<xacro:property name="ray_type" value="ray" /> | ||
<xacro:property name="laser_plugin" value="libgazebo_ros_velodyne_laser.so" /> | ||
</xacro:unless> | ||
|
||
<sensor type="${ray_type}" name="hesai_sensor"> | ||
<pose>0 0 0 0 0 0</pose> | ||
<visualize>${visualize}</visualize> | ||
<update_rate>${hz}</update_rate> | ||
<ray> | ||
<scan> | ||
<horizontal> | ||
<samples>${samples}</samples> | ||
<resolution>1</resolution> | ||
<min_angle>${min_horizontal_angle*pi/180.0}</min_angle> | ||
<max_angle>${max_horizontal_angle*pi/180.0}</max_angle> | ||
</horizontal> | ||
<vertical> | ||
<samples>${lasers}</samples> | ||
<resolution>1</resolution> | ||
<min_angle>${min_vertical_angle*pi/180.0}</min_angle> | ||
<max_angle>${max_vertical_angle*pi/180.0}</max_angle> | ||
</vertical> | ||
</scan> | ||
<range> | ||
<min>${collision_range}</min> | ||
<max>${max_range+1}</max> | ||
<resolution>0.001</resolution> | ||
</range> | ||
<noise> | ||
<type>gaussian</type> | ||
<mean>0.0</mean> | ||
<stddev>0.0</stddev> | ||
</noise> | ||
</ray> | ||
|
||
<plugin name="gazebo_ros_laser_controller" filename="${laser_plugin}"> | ||
<topicName>${topic_name}</topicName> | ||
<frameName>${lidar_frame}</frameName> | ||
<min_range>${min_range}</min_range> | ||
<max_range>${max_range}</max_range> | ||
<gaussianNoise>${noise}</gaussianNoise> | ||
</plugin> | ||
</sensor> | ||
</gazebo> | ||
</xacro:macro> | ||
|
||
</robot> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
<?xml version="1.0"?> | ||
|
||
<!-- Copyright 2022 University of Oxford | ||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
--> | ||
|
||
|
||
<!-- Hesai PandarQT-64 Lidar Sensor --> | ||
<robot name="hesai_qt64" xmlns:xacro="http://www.ros.org/wiki/xacro"> | ||
<xacro:arg name="simulation" default="false"/> | ||
<xacro:arg name="use_gpu" default="true"/> | ||
|
||
<xacro:macro name="hesai_qt64_device" params="parent *origin name:=pandar_xt32_lidar simulation:=false lidar_frame:=pandar use_gpu:=true"> | ||
<joint name="${parent}_to_hesai" type="fixed"> | ||
<xacro:insert_block name="origin"/> | ||
<parent link="${parent}" /> | ||
<child link="hesai_base" /> | ||
</joint> | ||
<link name="hesai_base"> | ||
<visual> | ||
<origin xyz="0 0 0" rpy="0 0 0" /> | ||
<!-- If mesh is not available: --> | ||
<!--origin xyz="0 0 38.0e-3" rpy="0 0 0" /--> | ||
<geometry> | ||
<!-- If mesh is not available: --> | ||
<!--cylinder radius="51.500e-3" length="76.0e-3" /--> | ||
<mesh filename="package://hesai_description/urdf/meshes/PandarQT64_model.dae" /> | ||
</geometry> | ||
</visual> | ||
<inertial> | ||
<!-- CoM taken from CAD assuming constant density and mass 0.807 (best approximation available to real mass) --> | ||
<origin xyz="-0.015e-3 0.0 37.494e-3" rpy="0 0 0" /> | ||
<!-- mass taken from Hesai datasheet --> | ||
<mass value="0.807" /> | ||
<!-- Inertia tensor from CAD assuming constant density and mass 0.807 (best approximation vailable to real mass) --> | ||
<inertia ixx="886.81e-6" ixy="5.802e-11" ixz="-0.34e-6" iyy="898.12e-6" iyz="-0.014e-6" izz="1004.287e-6" /> | ||
</inertial> | ||
<collision> | ||
<origin xyz="0 0 38.0e-3"/> | ||
<geometry> | ||
<cylinder radius="51.500e-3" length="76.0e-3" /> | ||
</geometry> | ||
</collision> | ||
</link> | ||
<link name="${lidar_frame}"/> | ||
<joint name="hesai_base_to_pandar" type="fixed"> | ||
<!-- See page 12 of QT64 User Manual --> | ||
<!-- note that the X axis points left. See manual page 11 --> | ||
<origin xyz="0.0 0.0 50.4e-3" rpy="0.0 0.0 ${pi/2}"/> | ||
<parent link="hesai_base"/> | ||
<child link="${lidar_frame}" /> | ||
</joint> | ||
|
||
<xacro:if value="${simulation}"> | ||
<xacro:include filename="$(find hesai_description)/urdf/gazebo.urdf.xacro"/> | ||
<xacro:hesai_gazebo lidar_frame="${lidar_frame}" topic_name="/hesai/pandar" min_range="0.1" max_range="20.0" | ||
min_horizontal_angle="-180.0" max_horizontal_angle="180.0" min_vertical_angle="-52.1" max_vertical_angle="52.1" | ||
hz="10" samples="600" lasers="64" collision_range="0.3" noise="0.008" use_gpu="${use_gpu}" | ||
/> | ||
</xacro:if> | ||
</xacro:macro> | ||
|
||
</robot> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<?xml version="1.0"?> | ||
|
||
<!-- Copyright 2022 University of Oxford | ||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. --> | ||
|
||
<robot name="hesai" xmlns:xacro="http://www.ros.org/wiki/xacro"> | ||
<xacro:include filename="$(find hesai_description)/urdf/hesai_xt32.urdf.xacro" /> | ||
<xacro:arg name="simulation" default="false" /> | ||
<xacro:arg name="use_gpu" default="true" /> | ||
|
||
<!-- Dummy link --> | ||
<link name="base"/> | ||
|
||
<xacro:hesai_xt32_device parent="base" simulation="$(arg simulation)" use_gpu="$(arg use_gpu)" > | ||
<origin xyz="0 0 0" rpy="0 0 0" /> | ||
</xacro:hesai_xt32_device> | ||
</robot> |
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.