ROS Answers: Open Source Q&A Forum - RSS feedhttps://answers.ros.org/questions/Open source question and answer forum written in Python and DjangoenROS Answers is licensed under Creative Commons Attribution 3.0Mon, 15 Oct 2012 18:29:35 -0500How to do a frequency analysis of some velocity profiles?https://answers.ros.org/question/45363/how-to-do-a-frequency-analysis-of-some-velocity-profiles/Hello
I have some question regarding analysing some post-processing data. I have extracted a linear and angular velocity of the robot moving around. The velocity is coming from AMCL and angular velocity is calculating with the help of IMU unit (just use the position/orientation) and AMCL as well. I made different bag files( so different robot runs) and I have significant peeks (noises) in both profiles( in linear velocity not so much noises bit the angular velocity have significant noises). So thought a frequency analysis of the velocity profiles might reveal more high components in both velocity profiles. But dont know exactly how to do it? Also where this noises can come from??
Im posting one of my profiles. Angular speed![image description](/upfiles/13497592397078362.jpg)
And the linear one!!![image description](/upfiles/13497592156603107.jpg)
This IS the code for the speed calculation
void speedCallback(const geometry_msgs::PoseWithCovarianceStamped::ConstPtr& msg)
{
btScalar r,p,y;
btQuaternion q(msg->pose.pose.orientation.x,msg->pose.pose.orientation.y,msg->pose.pose.orientation.z,msg->pose.pose.orientation.w);
btMatrix3x3(q).getEulerYPR(y,p,r);
std_msgs::Float64 yaw;
yaw.data = y;
if (count2 == 0){
time_prev = ros::Time::now().toSec();
count2=1;
}
double time_now = ros::Time::now().toSec();
double curr_theta = yaw.data;
double curr_x = msg->pose.pose.position.x;
double curr_y = msg->pose.pose.position.y;
if (curr_x < 0){
curr_x = curr_x * -1;
}
if (curr_y < 0){
curr_y = curr_y * -1;
}
double time_dif = time_now - time_prev;
if (prev_x != 0 || prev_y != 0){
if (time_dif != 0){
double dist_theta = (curr_theta - prev_theta);
if (dist_theta < 0){
dist_theta = dist_theta * -1;
}
double dist_x = (curr_x - prev_x);
if (dist_x < 0){
dist_x = dist_x * -1;
}
double dist_y = (curr_y - prev_y);
if (dist_y < 0){
dist_y = dist_y * -1;
}
double dist_tot = sqrt((dist_x * dist_x) + (dist_y * dist_y));// * 10;
double speed = (dist_tot / time_dif);// * 3.6;
double speed_theta = dist_theta /time_dif;
if (speed < 0.12){
speed = 0;
zero_count++;
}
if (speed_theta < 0.07){
speed_theta = 0;
}
ROS_INFO("linear speed= %f, anglular speed= %f", speed, speed_theta);
myfile << speed << " " << speed_theta << "\n";
speed_count++;
speed_sum = speed_sum + speed;
speed_sum_theta = speed_sum_theta + speed_theta;
if (speed_count == 20){
speed = speed_sum / speed_count;
speed_theta = speed_sum_theta / speed_count;
if (zero_count > 7){
speed = 0;
}
speed_count = 0;
speed_sum = 0;
speed_sum_theta = 0;
zero_count = 0;
count = count + 1;
}
}
}
prev_theta = curr_theta;
prev_x = curr_x;
prev_y = curr_y;
time_prev = time_now;
}
Frames.pdf Mon, 08 Oct 2012 17:05:57 -0500https://answers.ros.org/question/45363/how-to-do-a-frequency-analysis-of-some-velocity-profiles/Comment by Eric Perko for <p>Hello</p>
<p>I have some question regarding analysing some post-processing data. I have extracted a linear and angular velocity of the robot moving around. The velocity is coming from AMCL and angular velocity is calculating with the help of IMU unit (just use the position/orientation) and AMCL as well. I made different bag files( so different robot runs) and I have significant peeks (noises) in both profiles( in linear velocity not so much noises bit the angular velocity have significant noises). So thought a frequency analysis of the velocity profiles might reveal more high components in both velocity profiles. But dont know exactly how to do it? Also where this noises can come from??</p>
<p>Im posting one of my profiles. Angular speed<img alt="image description" src="/upfiles/13497592397078362.jpg"></p>
<p>And the linear one!!<img alt="image description" src="/upfiles/13497592156603107.jpg"></p>
<p>This IS the code for the speed calculation</p>
<pre><code>void speedCallback(const geometry_msgs::PoseWithCovarianceStamped::ConstPtr& msg)
{
btScalar r,p,y;
btQuaternion q(msg->pose.pose.orientation.x,msg->pose.pose.orientation.y,msg->pose.pose.orientation.z,msg->pose.pose.orientation.w);
btMatrix3x3(q).getEulerYPR(y,p,r);
std_msgs::Float64 yaw;
yaw.data = y;
if (count2 == 0){
time_prev = ros::Time::now().toSec();
count2=1;
}
double time_now = ros::Time::now().toSec();
double curr_theta = yaw.data;
double curr_x = msg->pose.pose.position.x;
double curr_y = msg->pose.pose.position.y;
if (curr_x < 0){
curr_x = curr_x * -1;
}
if (curr_y < 0){
curr_y = curr_y * -1;
}
double time_dif = time_now - time_prev;
if (prev_x != 0 || prev_y != 0){
if (time_dif != 0){
double dist_theta = (curr_theta - prev_theta);
if (dist_theta < 0){
dist_theta = dist_theta * -1;
}
double dist_x = (curr_x - prev_x);
if (dist_x < 0){
dist_x = dist_x * -1;
}
double dist_y = (curr_y - prev_y);
if (dist_y < 0){
dist_y = dist_y * -1;
}
double dist_tot = sqrt((dist_x * dist_x) + (dist_y * dist_y));// * 10;
double speed = (dist_tot / time_dif);// * 3.6;
double speed_theta = dist_theta /time_dif;
if (speed < 0.12){
speed = 0;
zero_count++;
}
if (speed_theta < 0.07){
speed_theta = 0;
}
ROS_INFO("linear speed= %f, anglular speed= %f", speed, speed_theta);
myfile << speed << " " << speed_theta << "\n";
speed_count++;
speed_sum = speed_sum + speed;
speed_sum_theta = speed_sum_theta + speed_theta;
if (speed_count == 20){
speed = speed_sum / speed_count;
speed_theta = speed_sum_theta / speed_count;
if (zero_count > 7){
speed = 0;
}
speed_count = 0;
speed_sum = 0;
speed_sum_theta = 0;
zero_count = 0;
count = count + 1;
}
}
}
prev_theta = curr_theta;
prev_x = curr_x;
prev_y = curr_y;
time_prev = time_now;
}
</code></pre>
<p>Frames.pdf </p>
https://answers.ros.org/question/45363/how-to-do-a-frequency-analysis-of-some-velocity-profiles/?comment=45364#post-id-45364Why are you trying to calculate velocities based on the positon/orientation from AMCL?Mon, 08 Oct 2012 17:14:30 -0500https://answers.ros.org/question/45363/how-to-do-a-frequency-analysis-of-some-velocity-profiles/?comment=45364#post-id-45364Comment by Astronaut for <p>Hello</p>
<p>I have some question regarding analysing some post-processing data. I have extracted a linear and angular velocity of the robot moving around. The velocity is coming from AMCL and angular velocity is calculating with the help of IMU unit (just use the position/orientation) and AMCL as well. I made different bag files( so different robot runs) and I have significant peeks (noises) in both profiles( in linear velocity not so much noises bit the angular velocity have significant noises). So thought a frequency analysis of the velocity profiles might reveal more high components in both velocity profiles. But dont know exactly how to do it? Also where this noises can come from??</p>
<p>Im posting one of my profiles. Angular speed<img alt="image description" src="/upfiles/13497592397078362.jpg"></p>
<p>And the linear one!!<img alt="image description" src="/upfiles/13497592156603107.jpg"></p>
<p>This IS the code for the speed calculation</p>
<pre><code>void speedCallback(const geometry_msgs::PoseWithCovarianceStamped::ConstPtr& msg)
{
btScalar r,p,y;
btQuaternion q(msg->pose.pose.orientation.x,msg->pose.pose.orientation.y,msg->pose.pose.orientation.z,msg->pose.pose.orientation.w);
btMatrix3x3(q).getEulerYPR(y,p,r);
std_msgs::Float64 yaw;
yaw.data = y;
if (count2 == 0){
time_prev = ros::Time::now().toSec();
count2=1;
}
double time_now = ros::Time::now().toSec();
double curr_theta = yaw.data;
double curr_x = msg->pose.pose.position.x;
double curr_y = msg->pose.pose.position.y;
if (curr_x < 0){
curr_x = curr_x * -1;
}
if (curr_y < 0){
curr_y = curr_y * -1;
}
double time_dif = time_now - time_prev;
if (prev_x != 0 || prev_y != 0){
if (time_dif != 0){
double dist_theta = (curr_theta - prev_theta);
if (dist_theta < 0){
dist_theta = dist_theta * -1;
}
double dist_x = (curr_x - prev_x);
if (dist_x < 0){
dist_x = dist_x * -1;
}
double dist_y = (curr_y - prev_y);
if (dist_y < 0){
dist_y = dist_y * -1;
}
double dist_tot = sqrt((dist_x * dist_x) + (dist_y * dist_y));// * 10;
double speed = (dist_tot / time_dif);// * 3.6;
double speed_theta = dist_theta /time_dif;
if (speed < 0.12){
speed = 0;
zero_count++;
}
if (speed_theta < 0.07){
speed_theta = 0;
}
ROS_INFO("linear speed= %f, anglular speed= %f", speed, speed_theta);
myfile << speed << " " << speed_theta << "\n";
speed_count++;
speed_sum = speed_sum + speed;
speed_sum_theta = speed_sum_theta + speed_theta;
if (speed_count == 20){
speed = speed_sum / speed_count;
speed_theta = speed_sum_theta / speed_count;
if (zero_count > 7){
speed = 0;
}
speed_count = 0;
speed_sum = 0;
speed_sum_theta = 0;
zero_count = 0;
count = count + 1;
}
}
}
prev_theta = curr_theta;
prev_x = curr_x;
prev_y = curr_y;
time_prev = time_now;
}
</code></pre>
<p>Frames.pdf </p>
https://answers.ros.org/question/45363/how-to-do-a-frequency-analysis-of-some-velocity-profiles/?comment=45366#post-id-45366I just use the velocity formula to calculate it, And for that I need a time and the position(which I get from amcl). Only that . Whats wrong with that??Mon, 08 Oct 2012 18:13:22 -0500https://answers.ros.org/question/45363/how-to-do-a-frequency-analysis-of-some-velocity-profiles/?comment=45366#post-id-45366Answer by Chad Rockey for <p>Hello</p>
<p>I have some question regarding analysing some post-processing data. I have extracted a linear and angular velocity of the robot moving around. The velocity is coming from AMCL and angular velocity is calculating with the help of IMU unit (just use the position/orientation) and AMCL as well. I made different bag files( so different robot runs) and I have significant peeks (noises) in both profiles( in linear velocity not so much noises bit the angular velocity have significant noises). So thought a frequency analysis of the velocity profiles might reveal more high components in both velocity profiles. But dont know exactly how to do it? Also where this noises can come from??</p>
<p>Im posting one of my profiles. Angular speed<img alt="image description" src="/upfiles/13497592397078362.jpg"></p>
<p>And the linear one!!<img alt="image description" src="/upfiles/13497592156603107.jpg"></p>
<p>This IS the code for the speed calculation</p>
<pre><code>void speedCallback(const geometry_msgs::PoseWithCovarianceStamped::ConstPtr& msg)
{
btScalar r,p,y;
btQuaternion q(msg->pose.pose.orientation.x,msg->pose.pose.orientation.y,msg->pose.pose.orientation.z,msg->pose.pose.orientation.w);
btMatrix3x3(q).getEulerYPR(y,p,r);
std_msgs::Float64 yaw;
yaw.data = y;
if (count2 == 0){
time_prev = ros::Time::now().toSec();
count2=1;
}
double time_now = ros::Time::now().toSec();
double curr_theta = yaw.data;
double curr_x = msg->pose.pose.position.x;
double curr_y = msg->pose.pose.position.y;
if (curr_x < 0){
curr_x = curr_x * -1;
}
if (curr_y < 0){
curr_y = curr_y * -1;
}
double time_dif = time_now - time_prev;
if (prev_x != 0 || prev_y != 0){
if (time_dif != 0){
double dist_theta = (curr_theta - prev_theta);
if (dist_theta < 0){
dist_theta = dist_theta * -1;
}
double dist_x = (curr_x - prev_x);
if (dist_x < 0){
dist_x = dist_x * -1;
}
double dist_y = (curr_y - prev_y);
if (dist_y < 0){
dist_y = dist_y * -1;
}
double dist_tot = sqrt((dist_x * dist_x) + (dist_y * dist_y));// * 10;
double speed = (dist_tot / time_dif);// * 3.6;
double speed_theta = dist_theta /time_dif;
if (speed < 0.12){
speed = 0;
zero_count++;
}
if (speed_theta < 0.07){
speed_theta = 0;
}
ROS_INFO("linear speed= %f, anglular speed= %f", speed, speed_theta);
myfile << speed << " " << speed_theta << "\n";
speed_count++;
speed_sum = speed_sum + speed;
speed_sum_theta = speed_sum_theta + speed_theta;
if (speed_count == 20){
speed = speed_sum / speed_count;
speed_theta = speed_sum_theta / speed_count;
if (zero_count > 7){
speed = 0;
}
speed_count = 0;
speed_sum = 0;
speed_sum_theta = 0;
zero_count = 0;
count = count + 1;
}
}
}
prev_theta = curr_theta;
prev_x = curr_x;
prev_y = curr_y;
time_prev = time_now;
}
</code></pre>
<p>Frames.pdf </p>
https://answers.ros.org/question/45363/how-to-do-a-frequency-analysis-of-some-velocity-profiles/?answer=45369#post-id-45369Amcl has the ability to "snap" the odometry to a new reference point. This can produce the uneven results you're seeing. (It's as if your robot instantly jumped to the new position, so your output is the true instantaneous velocity according to AMCL.)
Typically, Odometry is actually fairly well estimated velocities and angular velocities integrated. AMCL is there to handle the accumulated integral error. Most applications do not require more accurate velocities and angular velocities than wheel encoders/gyros/IMUs produce. Are you trying to calibrate the system in an online manner?
Also, I suspect that the large jumps in angular velocity may be subtracting radians instead of quaternions. The angular difference between 3.1 and -3.1 is 0.08 radians, not -6.2 radians (Unless your robot spins very quickly).Mon, 08 Oct 2012 18:32:41 -0500https://answers.ros.org/question/45363/how-to-do-a-frequency-analysis-of-some-velocity-profiles/?answer=45369#post-id-45369Comment by Astronaut for <p>Amcl has the ability to "snap" the odometry to a new reference point. This can produce the uneven results you're seeing. (It's as if your robot instantly jumped to the new position, so your output is the true instantaneous velocity according to AMCL.)</p>
<p>Typically, Odometry is actually fairly well estimated velocities and angular velocities integrated. AMCL is there to handle the accumulated integral error. Most applications do not require more accurate velocities and angular velocities than wheel encoders/gyros/IMUs produce. Are you trying to calibrate the system in an online manner?</p>
<p>Also, I suspect that the large jumps in angular velocity may be subtracting radians instead of quaternions. The angular difference between 3.1 and -3.1 is 0.08 radians, not -6.2 radians (Unless your robot spins very quickly).</p>
https://answers.ros.org/question/45363/how-to-do-a-frequency-analysis-of-some-velocity-profiles/?comment=45855#post-id-45855And which technique you mean by trying this technique on the raw /pose2D??Sun, 14 Oct 2012 19:48:09 -0500https://answers.ros.org/question/45363/how-to-do-a-frequency-analysis-of-some-velocity-profiles/?comment=45855#post-id-45855Comment by Astronaut for <p>Amcl has the ability to "snap" the odometry to a new reference point. This can produce the uneven results you're seeing. (It's as if your robot instantly jumped to the new position, so your output is the true instantaneous velocity according to AMCL.)</p>
<p>Typically, Odometry is actually fairly well estimated velocities and angular velocities integrated. AMCL is there to handle the accumulated integral error. Most applications do not require more accurate velocities and angular velocities than wheel encoders/gyros/IMUs produce. Are you trying to calibrate the system in an online manner?</p>
<p>Also, I suspect that the large jumps in angular velocity may be subtracting radians instead of quaternions. The angular difference between 3.1 and -3.1 is 0.08 radians, not -6.2 radians (Unless your robot spins very quickly).</p>
https://answers.ros.org/question/45363/how-to-do-a-frequency-analysis-of-some-velocity-profiles/?comment=45381#post-id-45381Why cant upload the tf view image?????Mon, 08 Oct 2012 20:33:39 -0500https://answers.ros.org/question/45363/how-to-do-a-frequency-analysis-of-some-velocity-profiles/?comment=45381#post-id-45381Comment by Astronaut for <p>Amcl has the ability to "snap" the odometry to a new reference point. This can produce the uneven results you're seeing. (It's as if your robot instantly jumped to the new position, so your output is the true instantaneous velocity according to AMCL.)</p>
<p>Typically, Odometry is actually fairly well estimated velocities and angular velocities integrated. AMCL is there to handle the accumulated integral error. Most applications do not require more accurate velocities and angular velocities than wheel encoders/gyros/IMUs produce. Are you trying to calibrate the system in an online manner?</p>
<p>Also, I suspect that the large jumps in angular velocity may be subtracting radians instead of quaternions. The angular difference between 3.1 and -3.1 is 0.08 radians, not -6.2 radians (Unless your robot spins very quickly).</p>
https://answers.ros.org/question/45363/how-to-do-a-frequency-analysis-of-some-velocity-profiles/?comment=45376#post-id-45376My robot has IMU, laser scan and kinect. How to see what publishes the tf estimate of odometry from the robot??Mon, 08 Oct 2012 19:38:10 -0500https://answers.ros.org/question/45363/how-to-do-a-frequency-analysis-of-some-velocity-profiles/?comment=45376#post-id-45376Comment by Astronaut for <p>Amcl has the ability to "snap" the odometry to a new reference point. This can produce the uneven results you're seeing. (It's as if your robot instantly jumped to the new position, so your output is the true instantaneous velocity according to AMCL.)</p>
<p>Typically, Odometry is actually fairly well estimated velocities and angular velocities integrated. AMCL is there to handle the accumulated integral error. Most applications do not require more accurate velocities and angular velocities than wheel encoders/gyros/IMUs produce. Are you trying to calibrate the system in an online manner?</p>
<p>Also, I suspect that the large jumps in angular velocity may be subtracting radians instead of quaternions. The angular difference between 3.1 and -3.1 is 0.08 radians, not -6.2 radians (Unless your robot spins very quickly).</p>
https://answers.ros.org/question/45363/how-to-do-a-frequency-analysis-of-some-velocity-profiles/?comment=45380#post-id-45380I dont have that . Have Broadcaster : amclMon, 08 Oct 2012 20:31:22 -0500https://answers.ros.org/question/45363/how-to-do-a-frequency-analysis-of-some-velocity-profiles/?comment=45380#post-id-45380Comment by Lorenz for <p>Amcl has the ability to "snap" the odometry to a new reference point. This can produce the uneven results you're seeing. (It's as if your robot instantly jumped to the new position, so your output is the true instantaneous velocity according to AMCL.)</p>
<p>Typically, Odometry is actually fairly well estimated velocities and angular velocities integrated. AMCL is there to handle the accumulated integral error. Most applications do not require more accurate velocities and angular velocities than wheel encoders/gyros/IMUs produce. Are you trying to calibrate the system in an online manner?</p>
<p>Also, I suspect that the large jumps in angular velocity may be subtracting radians instead of quaternions. The angular difference between 3.1 and -3.1 is 0.08 radians, not -6.2 radians (Unless your robot spins very quickly).</p>
https://answers.ros.org/question/45363/how-to-do-a-frequency-analysis-of-some-velocity-profiles/?comment=45405#post-id-45405@Chad Rockey answered that already. You are using AMCL's localization which jumps.Tue, 09 Oct 2012 00:34:52 -0500https://answers.ros.org/question/45363/how-to-do-a-frequency-analysis-of-some-velocity-profiles/?comment=45405#post-id-45405Comment by Astronaut for <p>Amcl has the ability to "snap" the odometry to a new reference point. This can produce the uneven results you're seeing. (It's as if your robot instantly jumped to the new position, so your output is the true instantaneous velocity according to AMCL.)</p>
<p>Typically, Odometry is actually fairly well estimated velocities and angular velocities integrated. AMCL is there to handle the accumulated integral error. Most applications do not require more accurate velocities and angular velocities than wheel encoders/gyros/IMUs produce. Are you trying to calibrate the system in an online manner?</p>
<p>Also, I suspect that the large jumps in angular velocity may be subtracting radians instead of quaternions. The angular difference between 3.1 and -3.1 is 0.08 radians, not -6.2 radians (Unless your robot spins very quickly).</p>
https://answers.ros.org/question/45363/how-to-do-a-frequency-analysis-of-some-velocity-profiles/?comment=45390#post-id-45390So which technique and how to implement it??Mon, 08 Oct 2012 21:15:45 -0500https://answers.ros.org/question/45363/how-to-do-a-frequency-analysis-of-some-velocity-profiles/?comment=45390#post-id-45390Comment by Astronaut for <p>Amcl has the ability to "snap" the odometry to a new reference point. This can produce the uneven results you're seeing. (It's as if your robot instantly jumped to the new position, so your output is the true instantaneous velocity according to AMCL.)</p>
<p>Typically, Odometry is actually fairly well estimated velocities and angular velocities integrated. AMCL is there to handle the accumulated integral error. Most applications do not require more accurate velocities and angular velocities than wheel encoders/gyros/IMUs produce. Are you trying to calibrate the system in an online manner?</p>
<p>Also, I suspect that the large jumps in angular velocity may be subtracting radians instead of quaternions. The angular difference between 3.1 and -3.1 is 0.08 radians, not -6.2 radians (Unless your robot spins very quickly).</p>
https://answers.ros.org/question/45363/how-to-do-a-frequency-analysis-of-some-velocity-profiles/?comment=45388#post-id-45388Can you see now?Mon, 08 Oct 2012 20:47:50 -0500https://answers.ros.org/question/45363/how-to-do-a-frequency-analysis-of-some-velocity-profiles/?comment=45388#post-id-45388Comment by Chad Rockey for <p>Amcl has the ability to "snap" the odometry to a new reference point. This can produce the uneven results you're seeing. (It's as if your robot instantly jumped to the new position, so your output is the true instantaneous velocity according to AMCL.)</p>
<p>Typically, Odometry is actually fairly well estimated velocities and angular velocities integrated. AMCL is there to handle the accumulated integral error. Most applications do not require more accurate velocities and angular velocities than wheel encoders/gyros/IMUs produce. Are you trying to calibrate the system in an online manner?</p>
<p>Also, I suspect that the large jumps in angular velocity may be subtracting radians instead of quaternions. The angular difference between 3.1 and -3.1 is 0.08 radians, not -6.2 radians (Unless your robot spins very quickly).</p>
https://answers.ros.org/question/45363/how-to-do-a-frequency-analysis-of-some-velocity-profiles/?comment=45389#post-id-45389I see, you're using entirely laserscan for Odometry. You may have better luck trying this technique on the raw /pose2D.Mon, 08 Oct 2012 21:13:09 -0500https://answers.ros.org/question/45363/how-to-do-a-frequency-analysis-of-some-velocity-profiles/?comment=45389#post-id-45389Comment by Astronaut for <p>Amcl has the ability to "snap" the odometry to a new reference point. This can produce the uneven results you're seeing. (It's as if your robot instantly jumped to the new position, so your output is the true instantaneous velocity according to AMCL.)</p>
<p>Typically, Odometry is actually fairly well estimated velocities and angular velocities integrated. AMCL is there to handle the accumulated integral error. Most applications do not require more accurate velocities and angular velocities than wheel encoders/gyros/IMUs produce. Are you trying to calibrate the system in an online manner?</p>
<p>Also, I suspect that the large jumps in angular velocity may be subtracting radians instead of quaternions. The angular difference between 3.1 and -3.1 is 0.08 radians, not -6.2 radians (Unless your robot spins very quickly).</p>
https://answers.ros.org/question/45363/how-to-do-a-frequency-analysis-of-some-velocity-profiles/?comment=45946#post-id-45946So what to change in the code???Mon, 15 Oct 2012 16:41:07 -0500https://answers.ros.org/question/45363/how-to-do-a-frequency-analysis-of-some-velocity-profiles/?comment=45946#post-id-45946Comment by Astronaut for <p>Amcl has the ability to "snap" the odometry to a new reference point. This can produce the uneven results you're seeing. (It's as if your robot instantly jumped to the new position, so your output is the true instantaneous velocity according to AMCL.)</p>
<p>Typically, Odometry is actually fairly well estimated velocities and angular velocities integrated. AMCL is there to handle the accumulated integral error. Most applications do not require more accurate velocities and angular velocities than wheel encoders/gyros/IMUs produce. Are you trying to calibrate the system in an online manner?</p>
<p>Also, I suspect that the large jumps in angular velocity may be subtracting radians instead of quaternions. The angular difference between 3.1 and -3.1 is 0.08 radians, not -6.2 radians (Unless your robot spins very quickly).</p>
https://answers.ros.org/question/45363/how-to-do-a-frequency-analysis-of-some-velocity-profiles/?comment=45387#post-id-45387I put it on the link. http://imgur.com/edit?deletehash=67Ho6HJKfk3hh5QMon, 08 Oct 2012 20:47:47 -0500https://answers.ros.org/question/45363/how-to-do-a-frequency-analysis-of-some-velocity-profiles/?comment=45387#post-id-45387Comment by Chad Rockey for <p>Amcl has the ability to "snap" the odometry to a new reference point. This can produce the uneven results you're seeing. (It's as if your robot instantly jumped to the new position, so your output is the true instantaneous velocity according to AMCL.)</p>
<p>Typically, Odometry is actually fairly well estimated velocities and angular velocities integrated. AMCL is there to handle the accumulated integral error. Most applications do not require more accurate velocities and angular velocities than wheel encoders/gyros/IMUs produce. Are you trying to calibrate the system in an online manner?</p>
<p>Also, I suspect that the large jumps in angular velocity may be subtracting radians instead of quaternions. The angular difference between 3.1 and -3.1 is 0.08 radians, not -6.2 radians (Unless your robot spins very quickly).</p>
https://answers.ros.org/question/45363/how-to-do-a-frequency-analysis-of-some-velocity-profiles/?comment=45373#post-id-45373Do you have an /odom topic? That should include an estimate of linear and angular velocity. If not, using your current method on /odom instead of /amcl_pose should produce much better results.Mon, 08 Oct 2012 19:23:47 -0500https://answers.ros.org/question/45363/how-to-do-a-frequency-analysis-of-some-velocity-profiles/?comment=45373#post-id-45373Comment by Astronaut for <p>Amcl has the ability to "snap" the odometry to a new reference point. This can produce the uneven results you're seeing. (It's as if your robot instantly jumped to the new position, so your output is the true instantaneous velocity according to AMCL.)</p>
<p>Typically, Odometry is actually fairly well estimated velocities and angular velocities integrated. AMCL is there to handle the accumulated integral error. Most applications do not require more accurate velocities and angular velocities than wheel encoders/gyros/IMUs produce. Are you trying to calibrate the system in an online manner?</p>
<p>Also, I suspect that the large jumps in angular velocity may be subtracting radians instead of quaternions. The angular difference between 3.1 and -3.1 is 0.08 radians, not -6.2 radians (Unless your robot spins very quickly).</p>
https://answers.ros.org/question/45363/how-to-do-a-frequency-analysis-of-some-velocity-profiles/?comment=45374#post-id-45374No, I dont have odom topic. Only amcl . So what you suggest??Mon, 08 Oct 2012 19:25:59 -0500https://answers.ros.org/question/45363/how-to-do-a-frequency-analysis-of-some-velocity-profiles/?comment=45374#post-id-45374Comment by Chad Rockey for <p>Amcl has the ability to "snap" the odometry to a new reference point. This can produce the uneven results you're seeing. (It's as if your robot instantly jumped to the new position, so your output is the true instantaneous velocity according to AMCL.)</p>
<p>Typically, Odometry is actually fairly well estimated velocities and angular velocities integrated. AMCL is there to handle the accumulated integral error. Most applications do not require more accurate velocities and angular velocities than wheel encoders/gyros/IMUs produce. Are you trying to calibrate the system in an online manner?</p>
<p>Also, I suspect that the large jumps in angular velocity may be subtracting radians instead of quaternions. The angular difference between 3.1 and -3.1 is 0.08 radians, not -6.2 radians (Unless your robot spins very quickly).</p>
https://answers.ros.org/question/45363/how-to-do-a-frequency-analysis-of-some-velocity-profiles/?comment=45375#post-id-45375What publishes the tf estimate of odometry from your robot? AMCL takes in a laser scan, odometry (through tf), and a map, and publishes tf and amcl_pose. Does your robot have wheel odometry (encoders, IMU)?Mon, 08 Oct 2012 19:28:39 -0500https://answers.ros.org/question/45363/how-to-do-a-frequency-analysis-of-some-velocity-profiles/?comment=45375#post-id-45375Comment by Chad Rockey for <p>Amcl has the ability to "snap" the odometry to a new reference point. This can produce the uneven results you're seeing. (It's as if your robot instantly jumped to the new position, so your output is the true instantaneous velocity according to AMCL.)</p>
<p>Typically, Odometry is actually fairly well estimated velocities and angular velocities integrated. AMCL is there to handle the accumulated integral error. Most applications do not require more accurate velocities and angular velocities than wheel encoders/gyros/IMUs produce. Are you trying to calibrate the system in an online manner?</p>
<p>Also, I suspect that the large jumps in angular velocity may be subtracting radians instead of quaternions. The angular difference between 3.1 and -3.1 is 0.08 radians, not -6.2 radians (Unless your robot spins very quickly).</p>
https://answers.ros.org/question/45363/how-to-do-a-frequency-analysis-of-some-velocity-profiles/?comment=45377#post-id-45377Is this a Turtlebot?
On any robot, you can view the various rates and publishers of /tf by using the view_frames tool:
http://www.ros.org/wiki/tf/Tutorials/Introduction%20to%20tf#Using_view_frames
You're looking for the Broadcaster of /odom -> /base_link.Mon, 08 Oct 2012 19:41:11 -0500https://answers.ros.org/question/45363/how-to-do-a-frequency-analysis-of-some-velocity-profiles/?comment=45377#post-id-45377Comment by Astronaut for <p>Amcl has the ability to "snap" the odometry to a new reference point. This can produce the uneven results you're seeing. (It's as if your robot instantly jumped to the new position, so your output is the true instantaneous velocity according to AMCL.)</p>
<p>Typically, Odometry is actually fairly well estimated velocities and angular velocities integrated. AMCL is there to handle the accumulated integral error. Most applications do not require more accurate velocities and angular velocities than wheel encoders/gyros/IMUs produce. Are you trying to calibrate the system in an online manner?</p>
<p>Also, I suspect that the large jumps in angular velocity may be subtracting radians instead of quaternions. The angular difference between 3.1 and -3.1 is 0.08 radians, not -6.2 radians (Unless your robot spins very quickly).</p>
https://answers.ros.org/question/45363/how-to-do-a-frequency-analysis-of-some-velocity-profiles/?comment=45391#post-id-45391Everything is laser scan in my application. So for Odometry also using laser scan. At the moment can use only laser scan. So whats the problem?How they come such a big peaks?Mon, 08 Oct 2012 21:21:32 -0500https://answers.ros.org/question/45363/how-to-do-a-frequency-analysis-of-some-velocity-profiles/?comment=45391#post-id-45391Comment by Chad Rockey for <p>Amcl has the ability to "snap" the odometry to a new reference point. This can produce the uneven results you're seeing. (It's as if your robot instantly jumped to the new position, so your output is the true instantaneous velocity according to AMCL.)</p>
<p>Typically, Odometry is actually fairly well estimated velocities and angular velocities integrated. AMCL is there to handle the accumulated integral error. Most applications do not require more accurate velocities and angular velocities than wheel encoders/gyros/IMUs produce. Are you trying to calibrate the system in an online manner?</p>
<p>Also, I suspect that the large jumps in angular velocity may be subtracting radians instead of quaternions. The angular difference between 3.1 and -3.1 is 0.08 radians, not -6.2 radians (Unless your robot spins very quickly).</p>
https://answers.ros.org/question/45363/how-to-do-a-frequency-analysis-of-some-velocity-profiles/?comment=45945#post-id-45945double dist_theta = (curr_theta - prev_theta);
if (dist_theta < 0){
dist_theta = dist_theta * -1;
}Mon, 15 Oct 2012 15:55:15 -0500https://answers.ros.org/question/45363/how-to-do-a-frequency-analysis-of-some-velocity-profiles/?comment=45945#post-id-45945Comment by Astronaut for <p>Amcl has the ability to "snap" the odometry to a new reference point. This can produce the uneven results you're seeing. (It's as if your robot instantly jumped to the new position, so your output is the true instantaneous velocity according to AMCL.)</p>
<p>Typically, Odometry is actually fairly well estimated velocities and angular velocities integrated. AMCL is there to handle the accumulated integral error. Most applications do not require more accurate velocities and angular velocities than wheel encoders/gyros/IMUs produce. Are you trying to calibrate the system in an online manner?</p>
<p>Also, I suspect that the large jumps in angular velocity may be subtracting radians instead of quaternions. The angular difference between 3.1 and -3.1 is 0.08 radians, not -6.2 radians (Unless your robot spins very quickly).</p>
https://answers.ros.org/question/45363/how-to-do-a-frequency-analysis-of-some-velocity-profiles/?comment=45947#post-id-45947Just to comment the line if (dist_theta < 0){ dist_theta = dist_theta * -1; }?? so dont need if (dist_theta < 0){ dist_theta = dist_theta * -1; }, wright?Mon, 15 Oct 2012 16:44:40 -0500https://answers.ros.org/question/45363/how-to-do-a-frequency-analysis-of-some-velocity-profiles/?comment=45947#post-id-45947Comment by Chad Rockey for <p>Amcl has the ability to "snap" the odometry to a new reference point. This can produce the uneven results you're seeing. (It's as if your robot instantly jumped to the new position, so your output is the true instantaneous velocity according to AMCL.)</p>
<p>Typically, Odometry is actually fairly well estimated velocities and angular velocities integrated. AMCL is there to handle the accumulated integral error. Most applications do not require more accurate velocities and angular velocities than wheel encoders/gyros/IMUs produce. Are you trying to calibrate the system in an online manner?</p>
<p>Also, I suspect that the large jumps in angular velocity may be subtracting radians instead of quaternions. The angular difference between 3.1 and -3.1 is 0.08 radians, not -6.2 radians (Unless your robot spins very quickly).</p>
https://answers.ros.org/question/45363/how-to-do-a-frequency-analysis-of-some-velocity-profiles/?comment=45386#post-id-45386No, I cannot see the view_frames. view frames outputs a pdf. You could try taking a screenshot.Mon, 08 Oct 2012 20:44:06 -0500https://answers.ros.org/question/45363/how-to-do-a-frequency-analysis-of-some-velocity-profiles/?comment=45386#post-id-45386Comment by Astronaut for <p>Amcl has the ability to "snap" the odometry to a new reference point. This can produce the uneven results you're seeing. (It's as if your robot instantly jumped to the new position, so your output is the true instantaneous velocity according to AMCL.)</p>
<p>Typically, Odometry is actually fairly well estimated velocities and angular velocities integrated. AMCL is there to handle the accumulated integral error. Most applications do not require more accurate velocities and angular velocities than wheel encoders/gyros/IMUs produce. Are you trying to calibrate the system in an online manner?</p>
<p>Also, I suspect that the large jumps in angular velocity may be subtracting radians instead of quaternions. The angular difference between 3.1 and -3.1 is 0.08 radians, not -6.2 radians (Unless your robot spins very quickly).</p>
https://answers.ros.org/question/45363/how-to-do-a-frequency-analysis-of-some-velocity-profiles/?comment=45953#post-id-45953And what about subtracting radians instead of quaternions?? Why are you sure that Im doing wrong??Mon, 15 Oct 2012 18:29:35 -0500https://answers.ros.org/question/45363/how-to-do-a-frequency-analysis-of-some-velocity-profiles/?comment=45953#post-id-45953Comment by Astronaut for <p>Amcl has the ability to "snap" the odometry to a new reference point. This can produce the uneven results you're seeing. (It's as if your robot instantly jumped to the new position, so your output is the true instantaneous velocity according to AMCL.)</p>
<p>Typically, Odometry is actually fairly well estimated velocities and angular velocities integrated. AMCL is there to handle the accumulated integral error. Most applications do not require more accurate velocities and angular velocities than wheel encoders/gyros/IMUs produce. Are you trying to calibrate the system in an online manner?</p>
<p>Also, I suspect that the large jumps in angular velocity may be subtracting radians instead of quaternions. The angular difference between 3.1 and -3.1 is 0.08 radians, not -6.2 radians (Unless your robot spins very quickly).</p>
https://answers.ros.org/question/45363/how-to-do-a-frequency-analysis-of-some-velocity-profiles/?comment=45384#post-id-45384ok. have done it. Can you see it??But as already said im not using odom. Im using amcl. dont have any odom topicMon, 08 Oct 2012 20:40:17 -0500https://answers.ros.org/question/45363/how-to-do-a-frequency-analysis-of-some-velocity-profiles/?comment=45384#post-id-45384Comment by Astronaut for <p>Amcl has the ability to "snap" the odometry to a new reference point. This can produce the uneven results you're seeing. (It's as if your robot instantly jumped to the new position, so your output is the true instantaneous velocity according to AMCL.)</p>
<p>Typically, Odometry is actually fairly well estimated velocities and angular velocities integrated. AMCL is there to handle the accumulated integral error. Most applications do not require more accurate velocities and angular velocities than wheel encoders/gyros/IMUs produce. Are you trying to calibrate the system in an online manner?</p>
<p>Also, I suspect that the large jumps in angular velocity may be subtracting radians instead of quaternions. The angular difference between 3.1 and -3.1 is 0.08 radians, not -6.2 radians (Unless your robot spins very quickly).</p>
https://answers.ros.org/question/45363/how-to-do-a-frequency-analysis-of-some-velocity-profiles/?comment=45378#post-id-45378No. No Im using fuerte and my robot is just a electrical wheelchair. Mon, 08 Oct 2012 19:48:56 -0500https://answers.ros.org/question/45363/how-to-do-a-frequency-analysis-of-some-velocity-profiles/?comment=45378#post-id-45378Comment by Chad Rockey for <p>Amcl has the ability to "snap" the odometry to a new reference point. This can produce the uneven results you're seeing. (It's as if your robot instantly jumped to the new position, so your output is the true instantaneous velocity according to AMCL.)</p>
<p>Typically, Odometry is actually fairly well estimated velocities and angular velocities integrated. AMCL is there to handle the accumulated integral error. Most applications do not require more accurate velocities and angular velocities than wheel encoders/gyros/IMUs produce. Are you trying to calibrate the system in an online manner?</p>
<p>Also, I suspect that the large jumps in angular velocity may be subtracting radians instead of quaternions. The angular difference between 3.1 and -3.1 is 0.08 radians, not -6.2 radians (Unless your robot spins very quickly).</p>
https://answers.ros.org/question/45363/how-to-do-a-frequency-analysis-of-some-velocity-profiles/?comment=45382#post-id-45382If you're having trouble posting the image, try http://imgur.com/ and post the link here.Mon, 08 Oct 2012 20:37:16 -0500https://answers.ros.org/question/45363/how-to-do-a-frequency-analysis-of-some-velocity-profiles/?comment=45382#post-id-45382Comment by Astronaut for <p>Amcl has the ability to "snap" the odometry to a new reference point. This can produce the uneven results you're seeing. (It's as if your robot instantly jumped to the new position, so your output is the true instantaneous velocity according to AMCL.)</p>
<p>Typically, Odometry is actually fairly well estimated velocities and angular velocities integrated. AMCL is there to handle the accumulated integral error. Most applications do not require more accurate velocities and angular velocities than wheel encoders/gyros/IMUs produce. Are you trying to calibrate the system in an online manner?</p>
<p>Also, I suspect that the large jumps in angular velocity may be subtracting radians instead of quaternions. The angular difference between 3.1 and -3.1 is 0.08 radians, not -6.2 radians (Unless your robot spins very quickly).</p>
https://answers.ros.org/question/45363/how-to-do-a-frequency-analysis-of-some-velocity-profiles/?comment=45371#post-id-45371Sorry. So dont know what you mean exactly? SO if not use amcl than how to calculate the speed?I can post my code for speed calculationMon, 08 Oct 2012 19:15:10 -0500https://answers.ros.org/question/45363/how-to-do-a-frequency-analysis-of-some-velocity-profiles/?comment=45371#post-id-45371Comment by Astronaut for <p>Amcl has the ability to "snap" the odometry to a new reference point. This can produce the uneven results you're seeing. (It's as if your robot instantly jumped to the new position, so your output is the true instantaneous velocity according to AMCL.)</p>
<p>Typically, Odometry is actually fairly well estimated velocities and angular velocities integrated. AMCL is there to handle the accumulated integral error. Most applications do not require more accurate velocities and angular velocities than wheel encoders/gyros/IMUs produce. Are you trying to calibrate the system in an online manner?</p>
<p>Also, I suspect that the large jumps in angular velocity may be subtracting radians instead of quaternions. The angular difference between 3.1 and -3.1 is 0.08 radians, not -6.2 radians (Unless your robot spins very quickly).</p>
https://answers.ros.org/question/45363/how-to-do-a-frequency-analysis-of-some-velocity-profiles/?comment=45942#post-id-45942I solve the problems with the linear speed, Now I dont have any huge peaks, I just tuned the amcl parameters, so my amcl do not jump. But still have the angular speed peaks. Any helps on it?Mon, 15 Oct 2012 15:08:56 -0500https://answers.ros.org/question/45363/how-to-do-a-frequency-analysis-of-some-velocity-profiles/?comment=45942#post-id-45942Comment by Astronaut for <p>Amcl has the ability to "snap" the odometry to a new reference point. This can produce the uneven results you're seeing. (It's as if your robot instantly jumped to the new position, so your output is the true instantaneous velocity according to AMCL.)</p>
<p>Typically, Odometry is actually fairly well estimated velocities and angular velocities integrated. AMCL is there to handle the accumulated integral error. Most applications do not require more accurate velocities and angular velocities than wheel encoders/gyros/IMUs produce. Are you trying to calibrate the system in an online manner?</p>
<p>Also, I suspect that the large jumps in angular velocity may be subtracting radians instead of quaternions. The angular difference between 3.1 and -3.1 is 0.08 radians, not -6.2 radians (Unless your robot spins very quickly).</p>
https://answers.ros.org/question/45363/how-to-do-a-frequency-analysis-of-some-velocity-profiles/?comment=45941#post-id-45941Probably you mean the angular difference between two angles 3.1 and -3.1 (both in degree) in radians is 0.108 . Not 0.08. Its correct but for my angular speed calculation Im using yaw which is in radians. So how come such a huge peaks. Mon, 15 Oct 2012 15:07:44 -0500https://answers.ros.org/question/45363/how-to-do-a-frequency-analysis-of-some-velocity-profiles/?comment=45941#post-id-45941Comment by Astronaut for <p>Amcl has the ability to "snap" the odometry to a new reference point. This can produce the uneven results you're seeing. (It's as if your robot instantly jumped to the new position, so your output is the true instantaneous velocity according to AMCL.)</p>
<p>Typically, Odometry is actually fairly well estimated velocities and angular velocities integrated. AMCL is there to handle the accumulated integral error. Most applications do not require more accurate velocities and angular velocities than wheel encoders/gyros/IMUs produce. Are you trying to calibrate the system in an online manner?</p>
<p>Also, I suspect that the large jumps in angular velocity may be subtracting radians instead of quaternions. The angular difference between 3.1 and -3.1 is 0.08 radians, not -6.2 radians (Unless your robot spins very quickly).</p>
https://answers.ros.org/question/45363/how-to-do-a-frequency-analysis-of-some-velocity-profiles/?comment=45853#post-id-45853What do you mean by the angular difference between 3.1 and -3.1 is 0.08 radians, not -6.2 radians?? Where do you see that Im subtracting radians instead of quaternions? Can you help me with that?Ok I saw that linear speed peaks are cause of amcl jumps but what about angular speed?Sun, 14 Oct 2012 19:38:29 -0500https://answers.ros.org/question/45363/how-to-do-a-frequency-analysis-of-some-velocity-profiles/?comment=45853#post-id-45853Comment by Chad Rockey for <p>Amcl has the ability to "snap" the odometry to a new reference point. This can produce the uneven results you're seeing. (It's as if your robot instantly jumped to the new position, so your output is the true instantaneous velocity according to AMCL.)</p>
<p>Typically, Odometry is actually fairly well estimated velocities and angular velocities integrated. AMCL is there to handle the accumulated integral error. Most applications do not require more accurate velocities and angular velocities than wheel encoders/gyros/IMUs produce. Are you trying to calibrate the system in an online manner?</p>
<p>Also, I suspect that the large jumps in angular velocity may be subtracting radians instead of quaternions. The angular difference between 3.1 and -3.1 is 0.08 radians, not -6.2 radians (Unless your robot spins very quickly).</p>
https://answers.ros.org/question/45363/how-to-do-a-frequency-analysis-of-some-velocity-profiles/?comment=45944#post-id-45944double dist_theta does not account for the difference between rotating across 0: An angle of 350 degrees could be expressed -10. You're using the 350 degree value, which would result in values much larger than what you expected than how your robot actually rotated (-10).Mon, 15 Oct 2012 15:55:11 -0500https://answers.ros.org/question/45363/how-to-do-a-frequency-analysis-of-some-velocity-profiles/?comment=45944#post-id-45944