Using imu acceleration data from /imu/data topic
Hi,
I am using the jackal in simulation. I am performing a few tests and collecting data.
My program drives the robot with steady increase in speed such that the increment itself is increased by a random value for every iteration every 100ms till a speed of 2m/s has been reached. This is to obtain increasing acceleration till 2m/s.
The robot then drives for 5 seconds at the constant linear speed after which the speed is ramped down at the same rate of 0.01m/s every 100ms.
During this test, I collect the linear acceleration data from the /imu/data topic. I expected the acceleration to go up with with the linear speed till the constant value of 2m/s is reached after which the acceleration should drop to zero.
However, when I check the linear_acceleration.x data from imu, the values seem to be almost constant. It seems as if the acceleration is not happening.
Is there something I am missing with respect to the imu? I have pasted the basic launch file which I am using. There have been no changes made to the launch file which is used as available from the jackal software package.
<launch>
<arg name="use_sim_time" default="true" />
<arg name="gui" default="true" />
<arg name="headless" default="false" />
<arg name="world_name" default="$(find jackal_gazebo)/worlds/jackal_race.world" />
<!-- Short-term hack to support the original front_laser:=true argument for spawning
the simulator. This will be removed in favour of using the config:=x arg instead. -->
<arg name="front_laser" default="false" />
<arg name="default_config" value="front_laser" if="$(arg front_laser)" />
<arg name="default_config" value="base" unless="$(arg front_laser)" />
<!-- end of hack -->
<!-- Configuration of Jackal which you would like to simulate.
See jackal_description for details. -->
<arg name="config" default="$(arg default_config)" />
<!-- Launch Gazebo with the specified world -->
<include file="$(find gazebo_ros)/launch/empty_world.launch">
<arg name="debug" value="0" />
<arg name="gui" value="$(arg gui)" />
<arg name="use_sim_time" value="$(arg use_sim_time)" />
<arg name="headless" value="$(arg headless)" />
<arg name="world_name" value="$(arg world_name)" />
<!-- <arg name="world_name" default="worlds/empty.world"/> -->
</include>
<!-- Load Jackal's description, controllers, and teleop nodes. -->
<include file="$(find jackal_description)/launch/description.launch">
<arg name="config" value="$(arg config)" />
</include>
<include file="$(find jackal_control)/launch/control.launch" />
<include file="$(find jackal_control)/launch/teleop.launch">
<arg name="joystick" value="false"/>
</include>
<!-- Spawn Jackal -->
<node name="urdf_spawner" pkg="gazebo_ros" type="spawn_model"
args="-urdf -model jackal -param robot_description -x 0 -y 0 -z 1.0" />
</launch>
Please help.
Regards, rsmitha.
You basically have a constant acceleration ("drives the robot with steady increase in speed by 0.01 m/s every 100ms"), so wouldn't the values you see on the IMU topic be expected to reflect that?
Thanks for replying, @gvdhoorn. You are right that the example I put in shows constant acceleration but not zero which actually the imu shows. So my question needs to be corrected and thanks for pointing that out.
Also, when I have changed the speed values to be increasing such that the acceleration would increase and then come to zero at 2m/s. I have calculated the acceleration values and I found that the imu data still shows zero acceleration while the calculations show different values.
Just edited my question.
still seems to say "with constant acceleration".
May I also suggest adding some newlines so that you get a few paragraphs. The block of text is a bit hard to read.
Thanks, @gvdhoorn.