Skip to content

Commit

Permalink
Modify to change calib param for each vehicle (autowarefoundation#51)
Browse files Browse the repository at this point in the history
* add vehicle id to change parameter of each vehicle

Signed-off-by: Yukihiro Saito <yukky.saito@gmail.com>

* add vehicle id to change param for each vehicle

Signed-off-by: Yukihiro Saito <yukky.saito@gmail.com>
  • Loading branch information
yukkysaito authored and tkimura4 committed Dec 13, 2021
1 parent 478e8db commit 57b6f2a
Show file tree
Hide file tree
Showing 10 changed files with 11 additions and 3 deletions.
4 changes: 4 additions & 0 deletions launch/vehicle_launch/launch/vehicle.launch
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,21 @@
<launch>
<arg name="sensor_model"/>
<arg name="vehicle_model"/>

<arg name="simulation" default="false" />
<arg name ="vehicle_id" value="$(optenv VEHICLE_ID default)" />

<!-- vehicle description -->
<include file="$(find vehicle_launch)/launch/vehicle_description.launch">
<arg name="vehicle_model" value="$(arg vehicle_model)"/>
<arg name="sensor_model" value="$(arg sensor_model)"/>
<arg name="vehicle_id" value="$(arg vehicle_id)"/>
</include>

<!-- vehicle interface -->
<include file="$(find vehicle_launch)/launch/vehicle_interface.launch">
<arg name="simulation" value="$(arg simulation)"/>
<arg name="vehicle_model" value="$(arg vehicle_model)"/>
<arg name="vehicle_id" value="$(arg vehicle_id)"/>
</include>
</launch>
4 changes: 3 additions & 1 deletion launch/vehicle_launch/launch/vehicle_description.launch
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,11 @@
<arg name="sensor_model"/>
<arg name="vehicle_model"/>

<arg name ="vehicle_id" />

<arg name="model" value="$(find vehicle_launch)/urdf/vehicle.xacro"/>

<param name="robot_description" command="$(find xacro)/xacro --inorder $(arg model) vehicle_model:=$(arg vehicle_model) sensor_model:=$(arg sensor_model) config_dir:=$(find vehicle_launch)/config/$(arg sensor_model)"/>
<param name="robot_description" command="$(find xacro)/xacro --inorder $(arg model) vehicle_model:=$(arg vehicle_model) sensor_model:=$(arg sensor_model) config_dir:=$(find vehicle_launch)/config/$(arg vehicle_id)/$(arg sensor_model)"/>

<group ns="/vehicle_info">
<rosparam file="$(eval find(arg('vehicle_model')+'_description')+'/config/vehicle_info.yaml')" command="load"/>
Expand Down
6 changes: 4 additions & 2 deletions launch/vehicle_launch/launch/vehicle_interface.launch
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,17 @@
<launch>
<arg name="simulation" />
<arg name="vehicle_model" />
<arg name="simulator_model" value="$(eval find(arg('vehicle_model')+'_description')+'/config/simulator_model.yaml')" />
<arg name="vehicle_id" />

<!-- simulation mode -->
<group if="$(eval simulation==true)">
<arg name="simulator_model" value="$(eval find(arg('vehicle_model')+'_description')+'/config/simulator_model.yaml')" />
<include file="$(find simple_planning_simulator)/launch/simple_planning_simulator.launch" pass_all_args="true"/>
</group>

<!-- real mode -->
<group unless="$(eval simulation==true)">
<include file="$(eval find(arg('vehicle_model')+'_description')+'/launch/vehicle_interface.launch')"/>
<include file="$(eval find(arg('vehicle_model')+'_description')+'/launch/vehicle_interface.launch')" >
</include>
</group>
</launch>

0 comments on commit 57b6f2a

Please sign in to comment.