ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
Dear nouf,
did you remember to set use_sim_time param to true?
rosparam set use_sim_time true
Please note that your odometry publisher node has a problem in main loop:
ros::spinOnce();
[...]
odom_broadcaster.sendTransform(odom_trans);
[...]
odom_pub.publish(odom);
r.sleep();
Following execution flow you:
I remember you that tf and topics are not really published until you invoke ros::spinOnce(): so, basically, you are publishing this information with one second delay. I suggest you to move ros::spinOnce() just after odom topic publisher line.
Hope this help...
2 | No.2 Revision |
Dear nouf,
did you remember to set use_sim_time param to true?
rosparam set use_sim_time true
Please note that your odometry publisher node has a problem in main loop:
ros::spinOnce();
[...]
odom_broadcaster.sendTransform(odom_trans);
[...]
odom_pub.publish(odom);
r.sleep();
Following execution flow you:
I remember you that tf and topics are not really published until you invoke ros::spinOnce(): so, basically, you are publishing this information with one second delay. I suggest you to move ros::spinOnce() just after odom topic publisher line.
Hope this help...
First: I suggest you to modify your code in order to have tf published in right way. Further more you are broadcasting odom -> base_link transformation with at 1Hz rate and base_link -> base_laser transformation at 100Hz and this is not a good practice. I cannot tell you that this will fix your problem but you should fix them before go on.
Second: run
rosrun tf view_frames
and
roswtf
The first will create a PDF contains the tf tree pf your robot: you can us it in order to be sure tf chain is not broken. The second will start some automatic diagnostic tool in order to check your transformation health status.
3 | No.3 Revision |
Dear nouf,
did you remember to set use_sim_time param to true?
rosparam set use_sim_time true
Please note that your odometry publisher node has a problem in main loop:
ros::spinOnce();
[...]
odom_broadcaster.sendTransform(odom_trans);
[...]
odom_pub.publish(odom);
r.sleep();
Following execution flow you:
I remember you that tf and topics are not really published until you invoke ros::spinOnce(): so, basically, you are publishing this information with one second delay. I suggest you to move ros::spinOnce() just after odom topic publisher line.
Hope this help...
First: I suggest you to modify your code in order to have tf published in right way. Further more you are broadcasting odom -> base_link transformation with at 1Hz rate and base_link -> base_laser transformation at 100Hz and this is not a good practice. I cannot tell you that this will fix your problem but you should fix them before go on.
Second: run
rosrun tf view_frames
and
roswtf
The first will create a PDF contains the tf tree pf your robot: you can us it in order to be sure tf chain is not broken. The second will start some automatic diagnostic tool in order to check your transformation health status.
Sorry for late reply.... there a lot of inconsistence in your tf tree:
Try to fix those issues. Can you also post output from roswtf?
4 | No.4 Revision |
Dear nouf,
did you remember to set use_sim_time param to true?
rosparam set use_sim_time true
Please note that your odometry publisher node has a problem in main loop:
ros::spinOnce();
[...]
odom_broadcaster.sendTransform(odom_trans);
[...]
odom_pub.publish(odom);
r.sleep();
Following execution flow you:
I remember you that tf and topics are not really published until you invoke ros::spinOnce(): so, basically, you are publishing this information with one second delay. I suggest you to move ros::spinOnce() just after odom topic publisher line.
Hope this help...
First: I suggest you to modify your code in order to have tf published in right way. Further more you are broadcasting odom -> base_link transformation with at 1Hz rate and base_link -> base_laser transformation at 100Hz and this is not a good practice. I cannot tell you that this will fix your problem but you should fix them before go on.
Second: run
rosrun tf view_frames
and
roswtf
The first will create a PDF contains the tf tree pf your robot: you can us it in order to be sure tf chain is not broken. The second will start some automatic diagnostic tool in order to check your transformation health status.
Sorry for late reply.... there a lot of inconsistence in your tf tree:
Try to fix those issues. Can you also post output from roswtf?
5 | No.5 Revision |
Dear nouf,
did you remember to set use_sim_time param to true?
rosparam set use_sim_time true
Please note that your odometry publisher node has a problem in main loop:
ros::spinOnce();
[...]
odom_broadcaster.sendTransform(odom_trans);
[...]
odom_pub.publish(odom);
r.sleep();
Following execution flow you:
I remember you that tf and topics are not really published until you invoke ros::spinOnce(): so, basically, you are publishing this information with one second delay. I suggest you to move ros::spinOnce() just after odom topic publisher line.
Hope this help...
First: I suggest you to modify your code in order to have tf published in right way. Further more you are broadcasting odom -> base_link transformation with at 1Hz rate and base_link -> base_laser transformation at 100Hz and this is not a good practice. I cannot tell you that this will fix your problem but you should fix them before go on.
Second: run
rosrun tf view_frames
and
roswtf
The first will create a PDF contains the tf tree pf your robot: you can us it in order to be sure tf chain is not broken. The second will start some automatic diagnostic tool in order to check your transformation health status.
Sorry for late reply.... there a lot of inconsistence in your tf tree:
Try to fix those issues. Can you also post output from roswtf?