Skip to content

Commit 0eb4a8b

Browse files
author
Emiliano Borghi
committed
Clean up launch
1 parent 6aab615 commit 0eb4a8b

File tree

6 files changed

+25
-66
lines changed

6 files changed

+25
-66
lines changed

ca_gazebo/launch/create_empty_world.launch

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
<launch>
2-
<arg name="env" default="empty" doc="Name of the environment"/>
2+
<arg name="env" default="empty" doc="Name of the environment"/>
33
<arg name="gui" default="$(optenv GUI true)" doc="Start gzclient (Gazebo's GUI)"/>
4+
45
<arg name="localization" default="$(optenv LOCALIZATION none)"
5-
doc="Localization type. More options here: https://github.com/RoboticaUtnFrba/create_autonomy/wiki/Launching-options"/>
6+
doc="Localization type. More options here:
7+
https://github.com/RoboticaUtnFrba/create_autonomy/wiki/Launching-options"/>
68

79
<arg name="paused" value="$(optenv PAUSED false)" doc="Start the simulation paused"/>
810
<arg name="debug" value="$(optenv DEBUG false)" doc="Enable debugging with gdb"/>

ca_gazebo/launch/spawn_create.launch

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11
<launch>
2-
<arg name="robot_id" default="$(optenv ID 1)" doc="Unique identifier of the robot [1-Inf.)"/>
3-
<arg name="enable_ros_control" value="$(optenv ROS_CONTROL false)" doc="Enable ros_control"/>
2+
<arg name="robot_id" default="$(optenv ID 1)" doc="Unique identifier of the robot [1-Inf.)"/>
3+
<arg name="ns" value="create$(arg robot_id)" doc="Namespace of the robot. By default: create1"/>
4+
<arg name="tf_prefix" value="$(arg ns)_tf" doc="Tf prefix"/>
45

5-
<param name="tf_prefix" value="create$(arg robot_id)_tf" />
6+
<arg name="enable_ros_control" value="$(optenv ROS_CONTROL false)" doc="Enable ros_control"/>
7+
<arg name="use_nodelets" default="$(optenv NODELET true)"
8+
doc="Use nodelets: http://wiki.ros.org/nodelet" />
69

710
<!-- Create 2 description -->
811
<include file="$(find ca_description)/launch/create_description.launch">
@@ -17,6 +20,10 @@
1720
<arg name="robot_id" value="$(arg robot_id)"/>
1821
</include>
1922

23+
<!-- ros_control -->
2024
<include file="$(find create_control)/launch/create_control.launch" if="$(arg enable_ros_control)"/>
2125

26+
<!-- Nodelet manager -->
27+
<node pkg="nodelet" type="nodelet" name="nodelet_manager" args="manager"/>
28+
2229
</launch>

ca_gazebo/launch/spawn_multirobot.launch

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<launch>
22
<!-- https://answers.ros.org/question/229489/how-do-i-create-dynamic-launch-files/ -->
3-
<arg name="nr" default="$(optenv NUM_ROBOTS 1)"/>
3+
<arg name="nr" default="$(optenv NUM_ROBOTS 1)" doc="Unique identifier of the robot [1-Inf.)"/>
4+
<arg name="ns" value="create$(arg nr)" doc="Namespace of the robot. By default: create1"/>
45

56
<arg name="env" default="empty" doc="Name of the environment"/>
67
<arg name="localization" default="$(optenv LOCALIZATION none)"
@@ -9,14 +10,11 @@
910
<arg name="rviz" default="$(optenv RVIZ false)" doc="Flag to use RViz"/>
1011

1112
<!-- Start 1 robot -->
12-
<group ns="$(eval 'create' + str(arg('nr')))">
13+
<group ns="$(arg ns)">
1314
<include file="$(find ca_gazebo)/launch/spawn_create.launch">
1415
<arg name="robot_id" value="$(arg nr)"/>
1516
</include>
1617

17-
<!-- TODO: REMOVE THIS PARAMETER OR SET IT IN THE MAIN LAUNCH? -->
18-
<!-- <param name="tf_prefix" value="create$(arg nr)_tf" /> -->
19-
2018
<!-- Localization -->
2119
<include file="$(find ca_localization)/launch/localize.launch"/>
2220

navigation/ca_localization/config/ekf_imu.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ imu0: "imu/data"
22

33
imu0_config: [
44
false, false, false,
5-
false, false, true,
5+
false, false, false,
66
false, false, false,
77
false, false, true,
88
false, false, false

navigation/ca_localization/config/ekf_scan_matcher.yaml

Lines changed: 0 additions & 12 deletions
This file was deleted.
Lines changed: 7 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
<launch>
2-
<arg name="robot_id" default="$(optenv ID 1)" doc="Unique identifier of the robot [1-Inf.)"/>
3-
<arg name="ns" value="create$(arg robot_id)" doc="Namespace of the robot. By default: create1"/>
4-
<arg name="tf_prefix" value="$(arg ns)_tf" doc="Tf prefix"/>
5-
6-
<arg name="use_nodelets" default="false" />
7-
<arg name="nodelet_manager" default="$optenv robot_localization_NODELET_MANAGER robot_localization_nodelet_manager)" />
2+
<arg name="use_nodelets" default="$(optenv NODELET true)" doc="Use nodelets: http://wiki.ros.org/nodelet" />
3+
<arg name="nodelet_manager" value="nodelet_manager" />
84

95
<remap from="set_pose" to="amcl_pose"/>
106

@@ -14,54 +10,22 @@
1410
<rosparam command="load" file="$(find ca_localization)/config/ekf_localization.yaml"/>
1511
<rosparam command="load" file="$(find ca_localization)/config/ekf_odom.yaml"/>
1612
<rosparam command="load" file="$(find ca_localization)/config/ekf_imu.yaml"/>
17-
<!-- <rosparam command="load" file="$(find ca_localization)/config/ekf_scan_matcher.yaml"/> -->
18-
<!-- <rosparam command="load" file="$(find ca_localization)/config/ekf_angle.yaml"/> -->
19-
20-
<!--
21-
The filter accepts an arbitrary number of inputs from each input message type
22-
(nav_msgs/Odometry, geometry_msgs/PoseWithCovarianceStamped,
23-
geometry_msgs/TwistWithCovarianceStamped, sensor_msgs/Imu). To add an input,
24-
simply append the next number in the sequence to its "base" name, e.g., odom0, odom1,
25-
twist0, twist1, imu0, imu1, imu2, etc. The value should be the topic name.
26-
These parameters obviously have no default values, and must be specified.
27-
-->
28-
<param name="odom0" value="odom"/>
29-
<param name="imu0" value="imu/data"/>
3013

3114
<remap from="odometry/filtered" to="odom_combined"/>
32-
33-
<param name="odom_frame" value="odom"/>
34-
<param name="base_link_frame" value="base_footprint"/>
35-
<param name="world_frame" value="odom"/>
3615
</node>
3716

38-
<!-- <node if="$(arg use_nodelets)"
17+
<node if="$(arg use_nodelets)"
3918
pkg="nodelet" type="nodelet" name="ekf_se" output="screen"
4019
args="load RobotLocalization/EkfNodelet $(arg nodelet_manager)">
4120
<rosparam command="load" file="$(find ca_localization)/config/ekf_localization.yaml"/>
21+
4222
<rosparam command="load" file="$(find ca_localization)/config/ekf_odom.yaml"/>
43-
<rosparam command="load" file="$(find ca_localization)/config/ekf_angle.yaml"/>
4423
<rosparam command="load" file="$(find ca_localization)/config/ekf_imu.yaml"/>
45-
</node> -->
24+
25+
<remap from="odometry/filtered" to="odom_combined"/>
26+
</node>
4627

4728
<!-- RViz -->
4829
<arg name="rviz" default="false"/>
4930
<include if="$(arg rviz)" file="$(find ca_tools)/launch/rviz.launch"/>
50-
51-
<!-- Start laser odometry node -->
52-
<!-- https://wiki.ros.org/laser_scan_matcher -->
53-
<!-- <node pkg="laser_scan_matcher" type="laser_scan_matcher_node" name="laser_scan_matcher_node" output="screen">
54-
<param name="fixed_frame" value = "$(arg tf_prefix)/odom"/>
55-
<param name="base_frame" value="$(arg tf_prefix)/base_footprint"/>
56-
<param name="publish_tf" value="false"/>
57-
<param name="publish_pose_with_covariance_stamped" value="true"/>
58-
<param name="max_iterations" value="10"/>
59-
<param name="use_odom" value="false"/>
60-
<param name="use_imu" value="true"/>
61-
<param name="angle_compensate" value="true"/>
62-
<remap from="pose_with_covariance_stamped" to="scan_match_pose"/>
63-
<remap from="pose2D" to="scan_match_pose2d"/>
64-
<remap from="imu/data" to="/android/phone1/imu"/>
65-
<remap from="scan" to="/create1/rplidar/scan"/>
66-
</node> -->
6731
</launch>

0 commit comments

Comments
 (0)