forked from eborghi10/create_autonomy
-
-
Notifications
You must be signed in to change notification settings - Fork 38
/
Copy pathcreate_description.launch
44 lines (39 loc) · 2.04 KB
/
create_description.launch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
<?xml version="1.0"?>
<launch>
<arg name="robot_id" default="$(optenv ID 1)" doc="Unique identifier of the robot [1-Inf.)"/>
<arg name="ns" value="create$(arg robot_id)" doc="Namespace of the robot. By default: create1"/>
<arg name="tf_prefix" value="$(arg ns)_tf" doc="Tf prefix"/>
<arg name="model" value="$(find ca_description)/urdf/create_2.xacro" doc="Path to Xacro description of the robot"/>
<arg name="visualize" default="$(optenv VISUALIZE false)" doc="Flag to visualize rays in Gazebo"/>
<arg name="use_gpu" default="$(optenv GPU false)" doc="Use GPU for laser processing"/>
<!-- Stacks:
* turtlebot
* roomblock
-->
<arg name="stack" value="$(optenv STACK turtlebot)" doc="Stack used by the robot. Options are: turtlebot or roomblock"/>
<!-- Lasers:
* astra
* kinect
* r200
* rplidar
* xtion_pro
-->
<arg name="laser" default="$(optenv LASER rplidar)" doc="Laser for mapping the environment"/>
<arg name="freq" value="40" doc="Broadcasting frequency of robot_description parameter"/>
<!-- Robot description -->
<arg name="xacro_args" value="visualize:=$(arg visualize)
robot_name:=$(arg ns)
stack:=$(arg stack)
laser:=$(arg laser)
use_gpu:=$(arg use_gpu)"/>
<!-- TODO (@eborghi10): Use only 1 robot_description for multiple robots -->
<param name="robot_description" command="$(find xacro)/xacro $(arg model) $(arg xacro_args)"/>
<!-- Robot state publisher-->
<node name="robot_state_publisher" pkg="robot_state_publisher" type="robot_state_publisher" output="screen">
<param name="publish_frequency" type="double" value="$(arg freq)" />
<param name="tf_prefix" value="$(arg tf_prefix)" />
</node>
<!-- Static transform for bumper_link to base_link -->
<node pkg="tf" type="static_transform_publisher" name="bumper_static_tf"
args="0 0 0 0 0 0 $(arg tf_prefix)/base_link $(arg tf_prefix)/bumper_link $(arg freq)"/>
</launch>