Skip to content

Commit

Permalink
[hydrus_xi] add mujoco option in launcher
Browse files Browse the repository at this point in the history
  • Loading branch information
sugikazu75 committed Sep 17, 2023
1 parent dd00cb2 commit 03d1a5a
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions robots/hydrus_xi/launch/bringup.launch
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
<arg name="spawn_yaw" default="0.0"/>
<arg name="robot_id" default="" />
<arg name="robot_ns" value="hydrus_xi$(arg robot_id)" />
<arg name="mujoco" default="False" />


########### Parameters ###########
<group ns="$(arg robot_ns)">
Expand Down Expand Up @@ -83,10 +85,12 @@
</include >

########### Servo Bridge ###########
<node pkg="aerial_robot_model" type="servo_bridge_node" name="servo_bridge" output="screen" ns="$(arg robot_ns)" />
<node pkg="aerial_robot_model" type="servo_bridge_node" name="servo_bridge" output="screen" ns="$(arg robot_ns)">
<param name="use_mujoco" value="true" if="$(arg mujoco)"/>
</node>

########## Simulation in Gazebo #########
<include file="$(find aerial_robot_simulation)/launch/simulation.launch" if = "$(eval arg('simulation') * (1 - arg('real_machine')))" >
<include file="$(find aerial_robot_simulation)/launch/simulation.launch" if = "$(eval arg('simulation') and not arg('real_machine') and not arg('mujoco'))" >
<arg name="robot_ns" default="$(arg robot_ns)" />
<arg name="launch_gazebo" default="$(arg launch_gazebo)" />
<arg name="gui" value="false" if="$(arg headless)"/>
Expand All @@ -101,4 +105,12 @@
######### init gimbal angles #########
<node pkg="hydrus_xi" name="init_gimbal_angles" type="init_gimbal_angles.py" ns="$(arg robot_ns)" if="$(arg init_gimbal_angle)"/>

########## Simulation in Mujoco #########
<group ns="$(arg robot_ns)">
<param name="mujoco_model_path" value="$(find hydrus_xi)/mujoco/$(arg type)/$(arg onboards_model)/robot.xml"/>
<param name="headless" value="$(arg headless)"/>
</group>
<include file="$(find aerial_robot_simulation)/launch/mujoco.launch" if="$(eval arg('simulation') and not arg('real_machine') and arg('mujoco'))" >
<arg name="robot_ns" value="$(arg robot_ns)" />
</include>
</launch>

0 comments on commit 03d1a5a

Please sign in to comment.