From ee6f0a6ef4e0e36684ebf0bbb8663d40fbacdbda Mon Sep 17 00:00:00 2001 From: fherrero <fherrero@iri.upc.edu> Date: Thu, 28 Feb 2019 19:34:36 +0100 Subject: [PATCH] Update launch files. Moved xacro to include --- config/hokuyo_utm30lx.yaml | 20 -------------- launch/description.launch | 36 +++++++++++++++++++++++++ package.xml | 2 ++ urdf/helena.xacro | 4 +-- urdf/{ => include}/helena_sensors.xacro | 4 +-- 5 files changed, 42 insertions(+), 24 deletions(-) delete mode 100644 config/hokuyo_utm30lx.yaml create mode 100644 launch/description.launch rename urdf/{ => include}/helena_sensors.xacro (93%) diff --git a/config/hokuyo_utm30lx.yaml b/config/hokuyo_utm30lx.yaml deleted file mode 100644 index 43feaef..0000000 --- a/config/hokuyo_utm30lx.yaml +++ /dev/null @@ -1,20 +0,0 @@ -pose_x: 0 -pose_y: 0 -pose_z: 0 -pose_roll: 0 -pose_pitch: 0 -pose_yaw: 0 -visualize: false -update_rate: 40 -samples: 1080 -resolution: 1 -min_angle: -2.36 -max_angle: 2.36 -range_min: 0.10 -range_max: 30.0 -range_resolution: 0.01 -noise_type: 'gaussian' -noise_mean: 0.0 -noise_stddev: 0.01 -topic_name: 'scan' -frame_name: 'scan_frame' \ No newline at end of file diff --git a/launch/description.launch b/launch/description.launch new file mode 100644 index 0000000..519a484 --- /dev/null +++ b/launch/description.launch @@ -0,0 +1,36 @@ +<?xml version="1.0" encoding="UTF-8"?> +<launch> + + <arg name="ns" default="helena"/> + <arg name="model" default="helena"/> + <arg name="static_wheels" default="false" /> + + <group ns="$(arg ns)"> + + <param name="robot_description" + command="$(find xacro)/xacro --inorder '$(find iri_helena_description)/urdf/$(arg model).xacro' name:=$(arg ns)" /> + + <node pkg="robot_state_publisher" type="state_publisher" name="state_publisher"> + <param name="tf_prefix" type="string" value="/$(arg ns)"/> + <param name="publish_frequency" type="double" value="20.0"/> + </node> + + <!-- + <node pkg="joint_state_publisher" + type="joint_state_publisher" + name="joint_state_publisher"> + <param name="use_gui" value="true"/> + <remap from="$(arg ns)/joint_states" to="$(arg ns)/joint_states/"/> + <remap from="$(arg ns)/robot_description" to="$(arg ns)/robot_description/"/> + </node> + --> + + </group> + + <group if="$(arg static_wheels)"> + <include file="$(find iri_pioneer3_description)/launch/wheel_static_transform.launch"> + <arg name="ns" value="$(arg ns)"/> + </include> + </group> + +</launch> \ No newline at end of file diff --git a/package.xml b/package.xml index 1b35fee..20e5a09 100644 --- a/package.xml +++ b/package.xml @@ -49,6 +49,8 @@ <!-- Use doc_depend for packages you need only for building documentation: --> <!-- <doc_depend>doxygen</doc_depend> --> <buildtool_depend>catkin</buildtool_depend> + <exec_depend>robot_state_publisher</exec_depend> + <exec_depend>xacro</exec_depend> <!-- The export tag contains other, unspecified, tags --> diff --git a/urdf/helena.xacro b/urdf/helena.xacro index 6538443..b3def2e 100644 --- a/urdf/helena.xacro +++ b/urdf/helena.xacro @@ -4,8 +4,8 @@ <xacro:arg name="name" default="helena"/> - <xacro:include filename="$(find iri_pioneer3_description)/urdf/pioneer3.xacro" /> - <xacro:include filename="$(find iri_helena_description)/urdf/helena_sensors.xacro" /> + <xacro:include filename="$(find iri_pioneer3_description)/urdf/include/pioneer3.xacro" /> + <xacro:include filename="$(find iri_helena_description)/urdf/include/helena_sensors.xacro" /> <xacro:pioneer3 name="$(arg name)" resolution="low_res" sim_config="$(find iri_helena_gazebo)/config/helena_sim_config.yaml"> </xacro:pioneer3> diff --git a/urdf/helena_sensors.xacro b/urdf/include/helena_sensors.xacro similarity index 93% rename from urdf/helena_sensors.xacro rename to urdf/include/helena_sensors.xacro index 31e1fd3..9c5e79e 100644 --- a/urdf/helena_sensors.xacro +++ b/urdf/include/helena_sensors.xacro @@ -41,11 +41,11 @@ <xacro:insert_block name="origin" /> </joint> - <xacro:hokuyo_laser2d name="rear" prefix="${name}" parent="sensors_base" mesh_resolution="low_res" model="utm30lx" config_file="$(find iri_helena_description)/config/hokuyo_utm30lx.yaml"> + <xacro:hokuyo_laser2d name="rear" prefix="${name}" parent="sensors_base" mesh_resolution="low_res" model="utm30lx" config_file="$(find iri_helena_gazebo)/config/rear_hokuyo_utm30lx.yaml"> <origin xyz="0.13121 -0.18921 0.063" rpy="0 0 -0.785" /> </xacro:hokuyo_laser2d> - <xacro:hokuyo_laser2d name="front" prefix="${name}" parent="sensors_base" mesh_resolution="low_res" model="utm30lx" config_file="$(find iri_helena_description)/config/hokuyo_utm30lx.yaml"> + <xacro:hokuyo_laser2d name="front" prefix="${name}" parent="sensors_base" mesh_resolution="low_res" model="utm30lx" config_file="$(find iri_helena_gazebo)/config/front_hokuyo_utm30lx.yaml"> <origin xyz="-0.13121 +0.18921 0.063" rpy="0 0 2.36" /> </xacro:hokuyo_laser2d> -- GitLab