Hi Eitan and Wim,<br>I realized my laser's starting and ending angles were not wrt robot's x axis, but was rotated by 90 degrees. I changed the laser 's message angles to start from negative theta to theta, now its seems ok.<br>
Thanks!<br><br><div class="gmail_quote">On Wed, Apr 6, 2011 at 3:14 AM, Eitan Marder-Eppstein <span dir="ltr"><<a href="mailto:eitan@willowgarage.com">eitan@willowgarage.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Hitesh,<div><br></div><div>I'll just add that you can give goals to the navigation stack in whatever frame you wish. If you always want to send goals relative to the robot's current position, using the "base_link" frame should be fine. Sending goals in a global frame like "odom" or "map" is normally the right thing to do when you have some specific position in the world you want the robot to move to.</div>

<div><br></div><div>Another thing is that the velocities reported by odometry are actually in the robot-centric, or "base_link" frame, so you don't actually have to rotate them to reason about them in that frame. The Odometry message is sort of funky in that way, but is documented here: <a href="http://www.ros.org/doc/api/nav_msgs/html/msg/Odometry.html" target="_blank">http://www.ros.org/doc/api/nav_msgs/html/msg/Odometry.html</a>. </div>

<div><br></div><div><a href="http://www.ros.org/doc/api/nav_msgs/html/msg/Odometry.html" target="_blank"></a>Hope this helps,</div><div><br></div><div>Eitan<br><br><div class="gmail_quote"><div><div></div><div class="h5">
On Tue, Apr 5, 2011 at 12:01 PM, Wim Meeussen <span dir="ltr"><<a href="mailto:meeussen@willowgarage.com" target="_blank">meeussen@willowgarage.com</a>></span> wrote:<br>
</div></div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><div><div></div><div class="h5">Hitesh,<br>
<div><br>
> From the wiki, the robot is using a front-x, left-y coordinate convention.<br>
> In rviz upon start, my robot faces in the front direction as the laser scan<br>
> data is towards the forward direction. But when I give a goal, for example x<br>
> = 1, y = 0 to frame base_link using simple_navigation_goals, which means it<br>
> should move forward 1m, it is displayed 1m to the right of the robot on the<br>
> odom (world) frame in rviz. In order to move the robot 1m forward, I have to<br>
> give a y = 1, x = 0 goal. It seems the odom frame is following a x-right,<br>
> y-front coordinate system.<br>
> Is there a 90 degrees rotation between the two frames? This means that all<br>
> velocities and distances reported by odometry have to be rotated 90 degrees<br>
> clockwise? Or am I doing something wrong?<br>
<br>
</div>The odom frame is attached to the world. So as the robot drives<br>
around, it is going to be in a different position/orientation relative<br>
to the odom frame. On startup it just happens to be that the robot is<br>
turned 90 degrees relative to the odom frame, but this angle will<br>
change as the robot moves around.<br>
<br>
The navigation goals you send to the robot are specified in the odom<br>
frame. So you tell the robot where to go in absolute world<br>
coordinates.  It sounds like you want to command the robot in relative<br>
coordinates (move 1 meter forward from where ever the robot is right<br>
now). To do that, you have to convert the relative goals in absolute<br>
coordinates. Tf can help you do this.<br>
<br>
Hope this helps,<br>
<br>
Wim<br>
<br>
<br>
--<br>
</div></div><font color="#888888"><div><div></div><div class="h5">--<br>
Wim Meeussen<br>
Willow Garage Inc.<br>
<<a href="http://www.willowgarage.com" target="_blank">http://www.willowgarage.com</a>)<br></div></div>
_______________________________________________<br>
ros-users mailing list<br>
<a href="mailto:ros-users@code.ros.org" target="_blank">ros-users@code.ros.org</a><br>
<a href="https://code.ros.org/mailman/listinfo/ros-users" target="_blank">https://code.ros.org/mailman/listinfo/ros-users</a><br>
</font></blockquote></div><br></div>
<br>_______________________________________________<br>
ros-users mailing list<br>
<a href="mailto:ros-users@code.ros.org">ros-users@code.ros.org</a><br>
<a href="https://code.ros.org/mailman/listinfo/ros-users" target="_blank">https://code.ros.org/mailman/listinfo/ros-users</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br>Regards,<br>Hitesh Dhiman<br>Electrical Engineering<br>National University of Singapore<br>