diff --git a/config/mpu9250_imu_sim_config.yaml b/config/mpu9250_imu_sim_config.yaml new file mode 100644 index 0000000000000000000000000000000000000000..38aef696f269ba39fba9be1658b0b8f94b45f4b1 --- /dev/null +++ b/config/mpu9250_imu_sim_config.yaml @@ -0,0 +1,26 @@ +rate: 100.0 +namespace: '/imu' +tf_prefix: '/mpu9250' +imu_topic: 'imu' +accel_offset_x: 0.06 +accel_offset_y: 0.06 +accel_offset_z: 0.08 +accel_drift_x: 0.001 +accel_drift_y: 0.001 +accel_drift_z: 0.001 +accel_noise_x: 0.008 +accel_noise_y: 0.008 +accel_noise_z: 0.008 +rate_offset_x: 5.0 +rate_offset_y: 5.0 +rate_offset_z: 5.0 +rate_drift_x: 0.015 +rate_drift_y: 0.015 +rate_drift_z: 0.015 +rate_noise_x: 0.1 +rate_noise_y: 0.1 +rate_noise_z: 0.1 +heading_offset: 0.0 +heading_drift: 0.0 +heading_noise: 0.0 + diff --git a/launch/mpu9250_imu_sim.launch b/launch/mpu9250_imu_sim.launch new file mode 100644 index 0000000000000000000000000000000000000000..6b25239370a2d8cda13d7781d83da4c4fa8cc35d --- /dev/null +++ b/launch/mpu9250_imu_sim.launch @@ -0,0 +1,34 @@ +<?xml version="1.0" encoding="UTF-8"?> +<launch> + + <!-- We resume the logic in empty_world.launch, changing only the name of the world to be launched --> + <include file="$(find gazebo_ros)/launch/empty_world.launch"> + <arg name="paused" value="false"/> + <arg name="use_sim_time" value="true"/> + <arg name="extra_gazebo_args" value=""/> + <arg name="gui" value="true"/> + <arg name="recording" value="false"/> + <arg name="headless" value="false"/> + <arg name="debug" value="false"/> + <arg name="physics" value="ode"/> + <arg name="verbose" value="false"/> + <arg name="world_name" value="worlds/empty.world"/> + <arg name="respawn_gazebo" value="false"/> + <arg name="use_clock_frequency" value="false"/> + <arg name="pub_clock_frequency" value="100"/> + </include> + + <group ns="imu"> + <param name="robot_description" + command="$(find xacro)/xacro --inorder '$(find iri_mpu9250_imu_description)/urdf/mpu9250_imu_example.xacro'" /> + + <node pkg="robot_state_publisher" type="state_publisher" name="mpu9250_tf_broadcaster"> + <param name="tf_prefix" type="string" value="/mpu9250"/> + <param name="publish_frequency" type="double" value="20.0"/> + </node> + + <node name="spawn_urdf" pkg="gazebo_ros" type="spawn_model" args="-param robot_description -urdf -model imu -x 0 -y 0 -z 0 -R 0 -P 0 -Y 0" /> + </group> + +</launch> +