husky spawns successfully but spawn_model node not found
I am running the husky_empty_world.launch
file (see below) inside the husky_gazebo
package. Inside this launch file is call to spawn_husky.launch
file (see below).
I have this piece of code inside the spawn_husky.launch
file -
<node name="spawn_husky_model" pkg="gazebo_ros" type="spawn_model"
args="-x $(arg x)
-y $(arg y)
-z $(arg z)
-Y $(arg yaw)
-unpause
-urdf
-param robot_description
-model $(arg robot_namespace)" />
But when I launch the husky_empty_world.launch
file and run rosnode list
in the terminal, I only see the following items -
/base_controller_spawner
/ekf_localization
/gazebo
/gazebo_gui
/joy_teleop/joy_node
/joy_teleop/teleop_twist_joy
/robot_state_publisher
/rosout
/twist_marker_server
/twist_mux
There's no node
named spawn_model
in this list even though a Husky bot is getting spawned in the Gazebo world. Why is this happening?
husky_empty_world.launch
<?xml version="1.0"?>
<launch>
<arg name="world_name" default="worlds/empty.world"/>
<arg name="laser_enabled" default="true"/>
<arg name="realsense_enabled" default="false"/>
<include file="$(find gazebo_ros)/launch/empty_world.launch">
<arg name="world_name" value="$(arg world_name)"/> <!-- world_name is wrt GAZEBO_RESOURCE_PATH environment variable -->
<arg name="paused" value="false"/>
<arg name="use_sim_time" value="true"/>
<arg name="gui" value="true"/>
<arg name="headless" value="false"/>
<arg name="debug" value="false"/>
</include>
<include file="$(find husky_gazebo)/launch/spawn_husky.launch">
<arg name="laser_enabled" value="$(arg laser_enabled)"/>
<arg name="realsense_enabled" value="$(arg realsense_enabled)"/>
</include>
</launch>
spawn_husky.launch
<?xml version="1.0"?>
<launch>
<arg name="multimaster" default="false"/>
<arg name="robot_namespace" default="/"/>
<arg name="x" default="0.0"/>
<arg name="y" default="0.0"/>
<arg name="z" default="0.0"/>
<arg name="yaw" default="0.0"/>
<arg name="laser_enabled" default="$(optenv HUSKY_LMS1XX_ENABLED false)"/>
<arg name="realsense_enabled" default="$(optenv HUSKY_REALSENSE_ENABLED false)"/>
<arg name="urdf_extras" default="$(optenv HUSKY_URDF_EXTRAS)"/>
<!-- Optionally disable teleop control -->
<arg name="joystick" default="true" />
<group ns="$(arg robot_namespace)">
<group if="$(arg multimaster)">
<include file="$(find husky_description)/launch/description.launch" >
<arg name="robot_namespace" value="$(arg robot_namespace)"/>
<arg name="laser_enabled" default="$(arg laser_enabled)"/>
<arg name="realsense_enabled" default="$(arg realsense_enabled)"/>
<arg name="urdf_extras" default="$(arg urdf_extras)"/>
</include>
<include file="$(find multimaster_launch)/launch/multimaster_gazebo_robot.launch">
<arg name="gazebo_interface" value="$(find husky_control)/config/gazebo_interface.yaml" />
<arg name="robot_namespace" value="$(arg robot_namespace)"/>
</include>
<!-- For multimaster bringuplaunch, need to load the controller config -->
<rosparam command="load" file="$(find husky_control)/config/control.yaml" />
</group>
<!-- For single master bringup, run robot control on the gazebo master -->
<!-- Note that husky_description/description.launch is already included in husky_control/control.launch. -->
<group unless="$(arg multimaster)">
<include file="$(find husky_control)/launch/control.launch">
<arg name="multimaster" value="$(arg multimaster)"/>
<arg name="laser_enabled" value="$(arg laser_enabled)"/>
<arg name="realsense_enabled" default="$(arg realsense_enabled)"/>
<arg name="urdf_extras" value="$(arg urdf_extras)"/>
</include>
<include file="$(find husky_control)/launch/teleop.launch">
<arg name="joystick" value="$(arg joystick)" />
</include> ...