0
$\begingroup$

Rosanswers logo

I am using my own URDF file for my custom built robot, the robot is properly visible and moves properly in rviz, If I run the simulation with /odom publisher.

But when open the camera nodlet with openni_launch and publish a static tf, then the laser scanner in the simulation starts to rotate randomly, I don't have idea why this is happening.

I publish the static tf in launch file which contains:

<launch>
        <node pkg="tf" type="static_transform_publisher" name="base_to_laser" args="0.1 0 0.455 0 0 0 base_link camera_link 100"/>
</launch>

Below are my rqt_graph

image description

Please find the below frames.pdf

image description

and the slam_gmapping node gives the following warnings

[ INFO] [1409662993.035030893]: Laser is mounted upwards.
 -maxUrange 9.99 -maxUrange 9.99 -sigma     0.05 -kernelSize 1 -lstep 0.05 -lobsGain 3 -astep 0.05
 -srr 0.1 -srt 0.2 -str 0.1 -stt 0.2
 -linearUpdate 1 -angularUpdate 0.5 -resampleThreshold 0.5
 -xmin -100 -xmax 100 -ymin -100 -ymax 100 -delta 0.05 -particles 30
[ INFO] [1409662993.055169092]: Initialization complete
update frame 0
update ld=0 ad=0
Laser Pose= 0.257682 -1.50465 1.55431e-15
m_count 0
Registering First Scan
update frame 6
update ld=0.0282843 ad=1.5708
Laser Pose= 0.237682 -1.48465 -1.5708
m_count 1
Scan Matching Failed, using odometry. Likelihood=-0.0229554
lp:0.257682 -1.50465 1.55431e-15
op:0.237682 -1.48465 -1.5708
Scan Matching Failed, using odometry. Likelihood=-4266.67
lp:0.257682 -1.50465 1.55431e-15
op:0.237682 -1.48465 -1.5708
Scan Matching Failed, using odometry. Likelihood=-4266.67
lp:0.257682 -1.50465 1.55431e-15
op:0.237682 -1.48465 -1.5708
Scan Matching Failed, using odometry. Likelihood=-4266.67
lp:0.257682 -1.50465 1.55431e-15
op:0.237682 -1.48465 -1.5708
Scan Matching Failed, using odometry. Likelihood=-4266.67
lp:0.257682 -1.50465 1.55431e-15
op:0.237682 -1.48465 -1.5708
Scan Matching Failed, using odometry. Likelihood=-4266.67
lp:0.257682 -1.50465 1.55431e-15
op:0.237682 -1.48465 -1.5708
Scan Matching Failed, using odometry. Likelihood=-4266.67
lp:0.257682 -1.50465 1.55431e-15
op:0.237682 -1.48465 -1.5708
Scan Matching Failed, using odometry. Likelihood=-4266.67
lp:0.257682 -1.50465 1.55431e-15
op:0.237682 -1.48465 -1.5708
Scan Matching Failed, using odometry. Likelihood=-4160.76
lp:0.257682 -1.50465 1.55431e-15
op:0.237682 -1.48465 -1.5708
Scan Matching Failed, using odometry. Likelihood=-4266.67
lp:0.257682 -1.50465 1.55431e-15
op:0.237682 -1.48465 -1.5708
Scan Matching Failed, using odometry. Likelihood=-4266.67
lp:0.257682 -1.50465 1.55431e-15
op:0.237682 -1.48465 -1.5708
Scan Matching Failed, using odometry. Likelihood=-4266.67
lp:0.257682 -1.50465 1.55431e-15
op:0.237682 -1.48465 -1.5708
Scan Matching Failed, using odometry. Likelihood=-4266.67
lp:0.257682 -1.50465 1.55431e-15
op:0.237682 -1.48465 -1.5708
Scan Matching Failed, using odometry. Likelihood=-4266.67
lp:0.257682 -1.50465 1.55431e-15
op:0.237682 -1.48465 -1.5708
Scan Matching Failed, using odometry. Likelihood=-4266.67
lp:0.257682 -1.50465 1.55431e-15
op:0.237682 -1.48465 -1.5708
Scan Matching Failed, using odometry. Likelihood=-4266.67
lp:0.257682 -1.50465 1.55431e-15
op:0.237682 -1.48465 -1.5708
Scan Matching Failed, using odometry. Likelihood=-4167.38
lp:0.257682 -1.50465 1.55431e-15
op:0.237682 -1.48465 -1.5708
Scan Matching Failed, using odometry. Likelihood=-4266.67
lp:0.257682 -1.50465 1.55431e-15
op:0.237682 -1.48465 -1.5708
Scan Matching Failed, using odometry. Likelihood=-4266.67
lp:0.257682 -1.50465 1.55431e-15
op:0.237682 -1.48465 -1.5708
Scan Matching Failed, using odometry. Likelihood=-4266.67
lp:0.257682 -1.50465 1.55431e-15
op:0.237682 -1.48465 -1.5708
Scan Matching Failed, using odometry. Likelihood=-4266.67
lp:0.257682 -1.50465 1.55431e-15
op:0.237682 -1.48465 -1.5708
Scan Matching Failed, using odometry. Likelihood=-4266.67
lp:0.257682 -1.50465 1.55431e-15
op:0.237682 -1.48465 -1.5708
Scan Matching Failed, using odometry. Likelihood=-4266.67
lp:0.257682 -1.50465 1.55431e-15
op:0.237682 -1.48465 -1.5708
Scan Matching Failed, using odometry. Likelihood=-4266.67
lp:0.257682 -1.50465 1.55431e-15
op:0.237682 -1.48465 -1.5708
Scan Matching Failed, using odometry. Likelihood=-4266.67
lp:0.257682 -1.50465 1.55431e-15
op:0.237682 -1.48465 -1.5708
Scan Matching Failed, using odometry. Likelihood=-4266.67
lp:0.257682 -1.50465 1.55431e-15
op:0.237682 -1.48465 -1.5708
Scan Matching Failed, using odometry. Likelihood=-4266.67
lp:0.257682 -1.50465 1.55431e-15
op:0.237682 -1.48465 -1.5708
Scan Matching Failed, using odometry. Likelihood=-4266.67
lp:0.257682 -1.50465 1.55431e-15
op:0.237682 -1.48465 -1.5708
Average Scan Matching Score=0.964133
neff= 24.6526
Registering Scans:Done
update frame 8
update ld=0.0282843 ad=1.5708
Laser Pose= 0.257682 -1.50465 1.55431e-15
m_count 2
Scan Matching Failed, using odometry. Likelihood=-4035.6
lp:0.237682 -1.48465 -1.5708
op:0.257682 -1.50465 1.55431e-15
Average Scan Matching Score=110.041
neff= 2.2353
*************RESAMPLE***************
Deleting Nodes: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 17 18 19 20 22 23 24 25 26 27 28 Done
Deleting old particles...Done
Copying Particles and  Registering  scans... Done
update frame 9
update ld=0.0282843 ad=1.5708
Laser Pose= 0.237682 -1.48465 -1.5708
m_count 3
Scan Matching Failed, using odometry. Likelihood=-4009.6
lp:0.257682 -1.50465 1.55431e-15
op:0.237682 -1.48465 -1.5708
Average Scan Matching Score=165.453
neff= 3.99713

Any idea why this is happening.?

Many thanks in advance.


Originally posted by sumanth on ROS Answers with karma: 86 on 2014-09-02

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

Hey,

Just a quick idea:

Your static publisher is trying to publish a transform between base_link and camera_link while in your frames.pdf, they are already connected via base_link => scan_support => camera_link which is published by robot_state_publisher. I can't see your static publisher in the tree (I think it would show up as "Broadcaster")

My guess: Your static publisher and the robot-publisher are publishing different transforms for the same "connection", which is why Rviz is switching constantly between the values from both publishers.

Hope that helps,

Rabe


Originally posted by Rabe with karma: 683 on 2014-09-03

This answer was ACCEPTED on the original site

Post score: 1


Original comments

Comment by sumanth on 2014-09-04:
Perfect, the robot_state_publisher and static_publisher both are publishing the transform between base_link and camera_link. I have conformed this even by running the roswtf.

Solved the problem.

Comment by sumanth on 2014-09-04:
Many thanks

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.