Hi Leonardo,<br><br>I've just tried the following,<br><br><br><ul><li>roslaunch gazebo_worlds  empty_world.launch</li><li>rosrun gazebo spawn_model -file `rospack find gazebo_worlds`/objects/000.580.67.model -gazebo -model cup -z 2</li>

<li>rosservice call gazebo/get_model_state '{model_name: cup}'<br><blockquote style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;" class="gmail_quote">rosservice call gazebo/get_model_state '{model_name: cup}'<br>

pose: <br>  position: <br>    x: 0.0<br>    y: 0.0<br>    z: 1.99999995232<br>  orientation: <br>    x: 0.0<br>    y: 0.0<br>    z: 0.0<br>    w: 1.0<br>twist: <br>  linear: <br>    x: 0.0<br>    y: 0.0<br>    z: 0.0<br>
  angular: <br>
    x: 0.0<br>    y: 0.0<br>    z: 0.0<br>success: True<br>status_message: GetModelState: got properties<br></blockquote></li><li>rosservice call /gazebo/set_model_state '{model_state: { model_name: cup, pose: { position: { x: 0, y: 0 ,z: 1 }, orientation: {x: 0, y: 0.7071, z: 0, w: 0.7071} }, reference_frame: world } }'<br>

<blockquote style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;" class="gmail_quote">success: True </blockquote><blockquote style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;" class="gmail_quote">

status_message: SetModelState: set model state done<br></blockquote></li><li><div> rosservice call gazebo/get_model_state '{model_name: cup}'<br><blockquote style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;" class="gmail_quote">

pose: <br>  position: <br>    x: 7.45058056917e-10<br>    y: 0.0<br>    z: 1.0<br>  orientation: <br>    x: 0.0<br>    y: 0.70710682869<br>    z: 0.0<br>    w: 0.70710682869<br>twist: <br>  linear: <br>    x: 0.0<br>    y: 0.0<br>

    z: 0.0<br>  angular: <br>    x: 0.0<br>    y: 0.0<br>    z: 0.0<br>success: True<br>status_message: GetModelState: got properties<br></blockquote></div></li></ul>the model state seems to be as expected, not sure if I have the right steps you are referring to in order to recreate the error?<br>

thanks,<br>John<br><br><br><div class="gmail_quote">On Fri, Jun 18, 2010 at 6:10 AM, Leonardo Scandolo <span dir="ltr"><<a href="mailto:lscandolo@gmail.com">lscandolo@gmail.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;">

Hello, I've been trying out the new CTurtle Gazebo API and I've seem to stumbled into a bug, but since I'm not really sure about it maybe you can clarify the behavior I'm seeing before creating a ticket.<div>


<br></div><div>The problem is this: when using the gazebo/set_model_state service, apparently the orientation quaternion appears to be translated to roll pitch and yaw and handed to gazebo, but the problem is that the rpy values handed are in radians and gazebo seems to work with degrees.</div>


<div>Even if I input the orientation quaternion obtained from gazebo/get_model_state back in through gazebo/set_model_state, it will produce the same error (the quat obtained from get_model_state seems to be correct). For example if the rpy in the gazebo gui for a model is '90 0 0', I will get orientation quat '0.707114 0 0 0.7071' from get_model_state, send it back in through set_model_state and it will come up as rpy '0.78 0 0' in gazebo, which is the correct rpy, only that now it is in radians. Am I missing something here ?</div>


<div><br></div><font color="#888888"><div>Leonardo Scandolo</div><div><br></div>
</font><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>