-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add launch file for configure the noise level on the mav odometry_sen…
…sor1
- Loading branch information
Showing
1 changed file
with
51 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
<?xml version="1.0"?> | ||
|
||
<launch> | ||
<arg name="mav_name" default="firefly"/> | ||
<arg name="namespace" default="$(arg mav_name)"/> | ||
<arg name="model" default="$(find rotors_description)/urdf/$(arg mav_name)_base.xacro"/> | ||
<arg name="tf_prefix" default="$(optenv ROS_NAMESPACE)"/> | ||
<arg name="x" default="0.0"/> | ||
<arg name="y" default="0.0"/> | ||
<arg name="z" default="0.1"/> | ||
<arg name="enable_logging" default="false"/> | ||
<arg name="enable_ground_truth" default="true"/> | ||
<arg name="log_file" default="$(arg mav_name)"/> | ||
<arg name="wait_to_record_bag" default="false"/> | ||
<arg name="enable_mavlink_interface" default="false"/> | ||
|
||
<!-- define noise for the odometry_sensor1 --> | ||
<arg name="odom_normal_position_noise" default="0.2"/> <!-- m --> | ||
<arg name="odom_normal_quaternion_noise" default="0.01235986666"/> <!-- rad--> | ||
<arg name="odom_normal_linear_velocity_noise" default="0.2"/> <!-- m/s --> | ||
<arg name="odom_normal_angular_velocity_noise" default="0.01745"/> <!-- rad/s --> | ||
|
||
|
||
<!-- send the robot XML to param server --> | ||
<param name="robot_description" command=" | ||
$(find xacro)/xacro '$(arg model)' | ||
enable_logging:=$(arg enable_logging) | ||
enable_ground_truth:=$(arg enable_ground_truth) | ||
enable_mavlink_interface:=$(arg enable_mavlink_interface) | ||
log_file:=$(arg log_file) | ||
wait_to_record_bag:=$(arg wait_to_record_bag) | ||
mav_name:=$(arg mav_name) | ||
odom_normal_position_noise:=$(arg odom_normal_position_noise) | ||
odom_normal_quaternion_noise:=$(arg odom_normal_quaternion_noise) | ||
odom_normal_linear_velocity_noise:=$(arg odom_normal_linear_velocity_noise) | ||
odom_normal_angular_velocity_noise:=$(arg odom_normal_angular_velocity_noise) | ||
namespace:=$(arg namespace)" | ||
/> | ||
<param name="tf_prefix" type="string" value="$(arg tf_prefix)" /> | ||
|
||
<!-- push robot_description to factory and spawn robot in gazebo --> | ||
<node name="spawn_$(arg namespace)" pkg="gazebo_ros" type="spawn_model" | ||
args="-param robot_description | ||
-urdf | ||
-x $(arg x) | ||
-y $(arg y) | ||
-z $(arg z) | ||
-model $(arg namespace)" | ||
respawn="false" output="screen"> | ||
</node> | ||
</launch> |