# Revision history [back]

### unwanted rotation of the markers detected with ar_track_alvar

hello! I discovered something weird with ar_track_alvar but maybe I just forgot something when launching it. I put a mark on the head of a robot and another one one the ground, this is when it is working fine:

but if i make the robot turn a little bit mor to the left, a PI rotation relative to the green axe seems to be made :

I set up a static_transform_publisher between "/axis_camera" and "/map, then I set the "output_frame" argument of ar_track_alvar to "/axis_camera" and the rest of the launchfile is identical to "pr2_indiv_no_kinect.launch".

the problem seems to happens when angle[2] >pi/2 and angle[2]<-pi/2 , with:

(trans,rot) = self.listener.lookupTransform(  "/ar_marker_1","ar_marker_2", rospy.Time(0))
angle = euler_from_quaternion( rot)


I am grateful for any help!

### unwanted rotation of the markers detected with ar_track_alvar

hello! I discovered something weird with ar_track_alvar but maybe I just forgot something when launching it. I put a mark on the head of a robot and another one one the ground, this is when it is working fine:

but if i make the robot turn a little bit mor to the left, a PI rotation relative to the green axe seems to be made :

I set up a static_transform_publisher between "/axis_camera" and "/map, then I set the "output_frame" argument of ar_track_alvar to "/axis_camera" and the rest of the launchfile is identical to "pr2_indiv_no_kinect.launch".

The problem is not happening with the problem seems to happens when angle[2] >pi/2 and angle[2]<-pi/2 , with: mark on the ground if i make it turn

(trans,rot) = self.listener.lookupTransform(  "/ar_marker_1","ar_marker_2", rospy.Time(0))
angle = euler_from_quaternion( rot)


I am grateful for any help!

### unwanted rotation of the markers detected with ar_track_alvar

hello! I discovered something weird with ar_track_alvar but maybe I just forgot something when launching it. I put a mark on the head of a robot and another one one the ground, this is when it is working fine:

but if i make the robot turn a little bit mor to the left, a PI rotation relative to the green axe seems to be made :

I set up a static_transform_publisher between "/axis_camera" and "/map, then I set the "output_frame" argument of ar_track_alvar to "/axis_camera" and the rest of the launchfile is identical to "pr2_indiv_no_kinect.launch".

The problem is not happening with the mark on the ground if i make it turn turn.

If it can give a clue, to fix the problem in an ugly way, I temporary fix the problem to continue to work on my project:

(trans,rot) = self.listener.lookupTransform( "/axis_camera", "ar_marker_2",  rospy.Time(0))
if rot[3]<0 and rot[0]>0:
rotation = (rot[0], rot[1]-0.25, rot[2]-0.25, -rot[3] )
elif rot[3]>0 and rot[0]<0:
rotation = (rot[0], rot[1], -rot[2] , -rot[3] )
else :
rotation=rot_fin


then /my_ar_markeur is not doing the Z transition ...

I am grateful for any help!

### unwanted rotation of the markers detected with ar_track_alvar

hello! I discovered something weird with ar_track_alvar but maybe I just forgot something when launching it. I put a mark on the head of a robot and another one one the ground, this is when it is working fine:

but if i make the robot turn a little bit mor to the left, a PI rotation relative to the green axe seems to be made :

I set up a static_transform_publisher between "/axis_camera" and "/map, then I set the "output_frame" argument of ar_track_alvar to "/axis_camera" and the rest of the launchfile is identical to "pr2_indiv_no_kinect.launch".

The problem is not happening with the mark on the ground if i make it turn.

If it can give a clue, to fix fixed the problem in an ugly way, I temporary fix the problem to continue to work on my project:

(trans,rot) = self.listener.lookupTransform( "/axis_camera", "ar_marker_2",  rospy.Time(0))
if rot[3]<0 and rot[0]>0:
rotation = (rot[0], rot[1]-0.25, rot[2]-0.25, -rot[3] )
elif rot[3]>0 and rot[0]<0:
rotation = (rot[0], rot[1], -rot[2] , -rot[3] )
else :
rotation=rot_fin


then /my_ar_markeur is not doing the Z transition ...

I am grateful for any help!

### unwanted rotation of the markers detected with ar_track_alvar

hello! I discovered something weird with ar_track_alvar but maybe I just forgot something when launching it. I put a mark on the head of a robot and another one one the ground, this is when it is working fine:

but if i make the robot turn a little bit mor to the left, a PI rotation relative to the green axe seems to be made :

I set up a static_transform_publisher between "/axis_camera" and "/map, then I set the "output_frame" argument of ar_track_alvar to "/axis_camera" and the rest of the launchfile is identical to "pr2_indiv_no_kinect.launch".

The problem is not happening with the mark on the ground if i make it turn.

If it can give a clue, to fixed the problem in an ugly way, I temporary fix the problem to continue to work on my project:

(trans,rot) = self.listener.lookupTransform( "/axis_camera", "ar_marker_2",  rospy.Time(0))
if rot[3]<0 and rot[0]>0:
rotation = (rot[0], rot[1]-0.25, rot[2]-0.25, -rot[3] )
elif rot[3]>0 and rot[0]<0:
rotation = (rot[0], rot[1], -rot[2] , -rot[3] )
else :
rotation=rot_fin


then /my_ar_markeur is not doing the Z transition ...

I am grateful for any help!

### unwanted rotation of the markers detected with ar_track_alvar

hello! I discovered something weird with ar_track_alvar but maybe I just forgot something when launching it. I put a mark on the head of a robot and another one one the ground, this is when it is working fine:

but if i make the robot turn a little bit mor to the left, a PI rotation relative to the green axe seems to be made :

I set up a static_transform_publisher between "/axis_camera" and "/map, then I set the "output_frame" argument of ar_track_alvar to "/axis_camera" and the rest of the launchfile is identical to "pr2_indiv_no_kinect.launch".

The problem is not happening with the mark on the ground if i make it turn.

If it can give a clue, to fixed here is the problem in an ugly way, I temporary fix rotation data of the problem to continue to work on mark when my project:

(trans,rot) = self.listener.lookupTransform( "/axis_camera", "ar_marker_2",  rospy.Time(0))
if rot[3]<0 and rot[0]>0:
rotation = (rot[0], rot[1]-0.25, rot[2]-0.25, -rot[3] )
elif rot[3]>0 and rot[0]<0:
rotation = (rot[0], rot[1], -rot[2] , -rot[3] )
else :
rotation=rot_fin