Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add sensorkit swtching #57

Merged
merged 4 commits into from
Sep 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,15 @@
<arg name="use_sim_time" default="true"/>
<arg name="launch_vehicle_interface" default="false"/>
<arg name="sensor_model" default="racing_kart_sensor_kit"/>
<arg name="simulation" default="true"/>
<log message="echo launch param use_sim_time: $(var use_sim_time) launch_vehicle_interface: $(var launch_vehicle_interface) sensor_model: $(var sensor_model)"/>

<include file="$(find-pkg-share aichallenge_submit_launch)/launch/reference.launch.xml" >
<arg name="vehicle_model" value="racing_kart"/>
<arg name="sensor_model" value="$(var sensor_model)"/>
<arg name="map_path" value="$(find-pkg-share aichallenge_submit_launch)/map"/>
<arg name="use_sim_time" value="$(var use_sim_time)"/>
<arg name="simulation" value="$(var simulation)"/>
<arg name="launch_vehicle_interface" value="$(var launch_vehicle_interface)"/>
</include>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
<arg name="map_path" default="/aichallenge/mapfile"/>
<arg name="vehicle_model" default="racing_kart" description="vehicle model name"/>
<arg name="sensor_model" description="sensor model name"/>
<arg name="simulation" description="used for sensor kit param"/>

<!-- Optional parameters -->
<!-- Map -->
Expand All @@ -29,7 +30,7 @@
<arg name="model_file" default="$(find-pkg-share tier4_vehicle_launch)/urdf/vehicle.xacro" description="path to the file of model settings (*.xacro)"/>
<arg name="config_dir" default="$(find-pkg-share racing_kart_sensor_kit_description)/config"/>
<node name="robot_state_publisher" pkg="robot_state_publisher" exec="robot_state_publisher">
<param name="robot_description" value="$(command 'xacro $(var model_file) vehicle_model:=$(var vehicle_model) sensor_model:=$(var sensor_model) config_dir:=$(var config_dir)' 'warn')"/>
<param name="robot_description" value="$(command 'xacro $(var model_file) vehicle_model:=$(var vehicle_model) sensor_model:=$(var sensor_model) config_dir:=$(var config_dir) simulation:=$(var simulation)' 'warn')"/>
</node>
</group>

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
sensor_kit_base_link:
gnss_link:
x: 0.0
y: 0.0
z: 0.0
roll: 0.0
pitch: 0.0
yaw: 0.0
imu_link:
x: 0.0
y: 0.0
z: 0.0
roll: 0.0
pitch: 0.0
yaw: 0.0
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
sensor_kit_base_link:
gnss_link:
x: 0.0
x: -0.26
y: 0.0
z: 0.0
roll: 0.0
pitch: 0.0
yaw: 0.0
imu_link:
x: 0.0
x: 0.85
y: 0.0
z: 0.0
roll: 0.0
pitch: 0.0
yaw: 0.0
yaw: -1.5707963268
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

<xacro:arg name="gpu" default="false"/>
<xacro:arg name="config_dir" default="$(find racing_kart_sensor_kit_description)/config"/>
<xacro:arg name="simulation" default="false"/>

<xacro:property name="sensor_kit_base_link" default="sensor_kit_base_link"/>

Expand All @@ -18,8 +19,11 @@
</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')}"/>
<!-- over write calibration file for simulation -->
<xacro:if value="$(arg simulation)">
<xacro:property name="calibration" value="${xacro.load_yaml('$(arg config_dir)/awsim_sensor_kit_calibration.yaml')}"/>
</xacro:if>
<!-- gnss -->
<xacro:imu_macro
name="gnss"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
<arg name="sensor_model" value="$(var sensor_model)"/>
<arg name="use_sim_time" value="$(var use_sim_time)"/>
<arg name="launch_vehicle_interface" value="$(var launch_vehicle_interface)"/>
<arg name="simulation" value="$(var simulation)"/>
isamu-takagi marked this conversation as resolved.
Show resolved Hide resolved
</include>

<!-- Workaround because the simulator cannot use the service. -->
Expand Down