Ask Your Question

Using imu acceleration data from /imu/data topic

asked 2017-06-10 18:23:40 -0500

rsmitha gravatar image

updated 2017-06-11 05:59:24 -0500


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.

<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/" />

<!-- 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/"/> -->
<!-- Load Jackal's description, controllers, and teleop nodes. -->
<include file="$(find jackal_description)/launch/description.launch">
<arg name="config" value="$(arg config)" />
<include file="$(find jackal_control)/launch/control.launch" />
<include file="$(find jackal_control)/launch/teleop.launch">
<arg name="joystick" value="false"/>
<!-- 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" />

Please help.

Regards, rsmitha.

edit retag flag offensive close merge delete


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?

gvdhoorn gravatar image gvdhoorn  ( 2017-06-11 05:18:20 -0500 )edit

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.

rsmitha gravatar image rsmitha  ( 2017-06-11 05:26:25 -0500 )edit

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.

rsmitha gravatar image rsmitha  ( 2017-06-11 05:27:16 -0500 )edit

Just edited my question.

rsmitha gravatar image rsmitha  ( 2017-06-11 05:30:54 -0500 )edit

with steady increase in speed

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.

gvdhoorn gravatar image gvdhoorn  ( 2017-06-11 05:48:24 -0500 )edit

Thanks, @gvdhoorn.

rsmitha gravatar image rsmitha  ( 2017-06-11 05:57:36 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2017-06-13 01:03:55 -0500

rsmitha gravatar image


This is to answer and close the issue and also to help anyone who may find the information useful. I found the answer to this issue.

The IMU was fine. The data was ok. It was the rate at which the data was being sampled for the plot of imu acceleration along x axis versus time. I was sampling it at a much slower rate and missing the proper peaks of acceleration in this test, than the rate at which the subscribed data was being generated.

The answer came through clearpath when they ran the bag file from me to regenerate the plot. This however, is a very special test only to see the behaviour of the imu.

Regards, rsmitha.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2017-06-10 18:23:40 -0500

Seen: 429 times

Last updated: Jun 13 '17