<?xml version="1.0"?>
<launch>
<!-- husky_move is one of my packages -->
<arg name="world_name" default="$(find husky_move)/worlds/husky_changed.world"/>
<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>
<arg name="laser_enabled" default="true"/>
<arg name="ur5_enabled" default="false"/>
<arg name="kinect_enabled" default="true"/>
<arg name="robot_initial_pose" default="$(optenv ROBOT_INITIAL_POSE)"/>
<arg name="husky_gazebo_description" default="$(optenv HUSKY_GAZEBO_DESCRIPTION)"/>
<arg name="ur5_control_yaml_file" default="$(find husky_control)/config/control_ur5.yaml"/>
<param name="robot_description" command="$(find xacro)/xacro.py '$(arg husky_gazebo_description)'
laser_enabled:=$(arg laser_enabled)
ur5_enabled:=$(arg ur5_enabled)
kinect_enabled:=$(arg kinect_enabled)
" />
<!--
robot_state_publisher uses the URDF specified by the parameter robot_description and
the joint positions from the topic joint_states to calculate the forward kinematics of the robot and publish the results via tf.
-->
<node name="robot_state_publisher" pkg="robot_state_publisher" type="robot_state_publisher" />
<!-- Load Husky control information -->
<rosparam command="load" file="$(find husky_control)/config/control.yaml" />
<node name="base_controller_spawner" pkg="controller_manager" type="spawner" args="husky_joint_publisher husky_velocity_controller --shutdown-timeout 3"/>
<node pkg="robot_localization" type="ekf_localization_node" name="ekf_localization">
<rosparam command="load" file="$(find husky_control)/config/localization.yaml" />
</node>
<node pkg="interactive_marker_twist_server" type="marker_server" name="twist_marker_server" output="screen"/>
<node pkg="twist_mux" type="twist_mux" name="twist_mux">
<rosparam command="load" file="$(find husky_control)/config/twist_mux.yaml" />
<remap from="cmd_vel_out" to="husky_velocity_controller/cmd_vel"/>
</node>
<group if="$(arg kinect_enabled)">
<!-- Include poincloud_to_laserscan if simulated Kinect is attached -->
<node pkg="pointcloud_to_laserscan" type="pointcloud_to_laserscan_node" name="pointcloud_to_laserscan" output="screen">
<remap from="cloud_in" to="camera/depth/points"/>
<remap from="scan" to="camera/scan"/>
<rosparam>
target_frame: base_link # Leave empty to output scan in the pointcloud frame
tolerance: 1.0
min_height: 0.05
max_height: 1.0
angle_min: -0.52 # -30.0*M_PI/180.0
angle_max: 0.52 # 30.0*M_PI/180.0
angle_increment: 0.005 # M_PI/360.0
scan_time: 0.3333
range_min: 0.45
range_max: 4.0
use_inf: true
# Concurrency level, affects number of pointclouds queued for processing and number of threads used
# 0 : Detect number of cores
# 1 : Single threaded
# 2->inf : Parallelism level
concurrency_level: 1
</rosparam>
</node>
</group>
<!-- Spawn robot in gazebo -->
<node name="spawn_husky_model" pkg="gazebo_ros" type="spawn_model"
args="$(arg robot_initial_pose) -unpause -urdf -param robot_description -model mobile_base"/>
<node name="rviz" pkg="rviz" type="rviz" args="-d $(find husky_viz)/rviz/robot.rviz" />
<node name="rqt_robot_steering" pkg="rqt_robot_steering" type="rqt_robot_steering">
<param name="default_topic" value="/cmd_vel"/>
</launch>
<launch>
<!-- husky_move is one of my packages -->
<arg name="world_name" default="$(find husky_move)/worlds/husky_changed.world"/>
<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>
<arg name="laser_enabled" default="true"/>
<arg name="ur5_enabled" default="false"/>
<arg name="kinect_enabled" default="true"/>
<arg name="robot_initial_pose" default="$(optenv ROBOT_INITIAL_POSE)"/>
<arg name="husky_gazebo_description" default="$(optenv HUSKY_GAZEBO_DESCRIPTION)"/>
<arg name="ur5_control_yaml_file" default="$(find husky_control)/config/control_ur5.yaml"/>
<param name="robot_description" command="$(find xacro)/xacro.py '$(arg husky_gazebo_description)'
laser_enabled:=$(arg laser_enabled)
ur5_enabled:=$(arg ur5_enabled)
kinect_enabled:=$(arg kinect_enabled)
" />
<!--
robot_state_publisher uses the URDF specified by the parameter robot_description and
the joint positions from the topic joint_states to calculate the forward kinematics of the robot and publish the results via tf.
-->
<node name="robot_state_publisher" pkg="robot_state_publisher" type="robot_state_publisher" />
<!-- Load Husky control information -->
<rosparam command="load" file="$(find husky_control)/config/control.yaml" />
<node name="base_controller_spawner" pkg="controller_manager" type="spawner" args="husky_joint_publisher husky_velocity_controller --shutdown-timeout 3"/>
<node pkg="robot_localization" type="ekf_localization_node" name="ekf_localization">
<rosparam command="load" file="$(find husky_control)/config/localization.yaml" />
</node>
<node pkg="interactive_marker_twist_server" type="marker_server" name="twist_marker_server" output="screen"/>
<node pkg="twist_mux" type="twist_mux" name="twist_mux">
<rosparam command="load" file="$(find husky_control)/config/twist_mux.yaml" />
<remap from="cmd_vel_out" to="husky_velocity_controller/cmd_vel"/>
</node>
<group if="$(arg kinect_enabled)">
<!-- Include poincloud_to_laserscan if simulated Kinect is attached -->
<node pkg="pointcloud_to_laserscan" type="pointcloud_to_laserscan_node" name="pointcloud_to_laserscan" output="screen">
<remap from="cloud_in" to="camera/depth/points"/>
<remap from="scan" to="camera/scan"/>
<rosparam>
target_frame: base_link # Leave empty to output scan in the pointcloud frame
tolerance: 1.0
min_height: 0.05
max_height: 1.0
angle_min: -0.52 # -30.0*M_PI/180.0
angle_max: 0.52 # 30.0*M_PI/180.0
angle_increment: 0.005 # M_PI/360.0
scan_time: 0.3333
range_min: 0.45
range_max: 4.0
use_inf: true
# Concurrency level, affects number of pointclouds queued for processing and number of threads used
# 0 : Detect number of cores
# 1 : Single threaded
# 2->inf : Parallelism level
concurrency_level: 1
</rosparam>
</node>
</group>
<!-- Spawn robot in gazebo -->
<node name="spawn_husky_model" pkg="gazebo_ros" type="spawn_model"
args="$(arg robot_initial_pose) -unpause -urdf -param robot_description -model mobile_base"/>
<node name="rviz" pkg="rviz" type="rviz" args="-d $(find husky_viz)/rviz/robot.rviz" />
<node name="rqt_robot_steering" pkg="rqt_robot_steering" type="rqt_robot_steering">
<param name="default_topic" value="/cmd_vel"/>
</launch>
Comments
Post a Comment