Re: [ros-users] Gazebo C-Turtle API angle translation bug?

Top Page
Attachments:
Message as email
+ (text/plain)
+ (text/html)
Delete this message
Reply to this message
Author: John Hsu
Date:  
To: ros-users
Subject: Re: [ros-users] Gazebo C-Turtle API angle translation bug?
Hi Leonardo,

I've just tried the following,



- roslaunch gazebo_worlds empty_world.launch
- rosrun gazebo spawn_model -file `rospack find
gazebo_worlds`/objects/000.580.67.model -gazebo -model cup -z 2
- rosservice call gazebo/get_model_state '{model_name: cup}'

>    rosservice call gazebo/get_model_state '{model_name: cup}'
>    pose:
>      position:
>        x: 0.0
>        y: 0.0
>        z: 1.99999995232
>      orientation:
>        x: 0.0
>        y: 0.0
>        z: 0.0
>        w: 1.0
>    twist:
>      linear:
>        x: 0.0
>        y: 0.0
>        z: 0.0
>      angular:
>        x: 0.0
>        y: 0.0
>        z: 0.0
>    success: True
>    status_message: GetModelState: got properties

>

- 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 } }'

>    success: True


status_message: SetModelState: set model state done
>

- rosservice call gazebo/get_model_state '{model_name: cup}'

>    pose:
>      position:
>        x: 7.45058056917e-10
>        y: 0.0
>        z: 1.0
>      orientation:
>        x: 0.0
>        y: 0.70710682869
>        z: 0.0
>        w: 0.70710682869
>    twist:
>      linear:
>        x: 0.0
>        y: 0.0
>        z: 0.0
>      angular:
>        x: 0.0
>        y: 0.0
>        z: 0.0
>    success: True
>    status_message: GetModelState: got properties

>


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?
thanks,
John


On Fri, Jun 18, 2010 at 6:10 AM, Leonardo Scandolo <>wrote:

> 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.
>
> 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.
> 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 ?
>
> Leonardo Scandolo
>
>
> _______________________________________________
> ros-users mailing list
>
> https://code.ros.org/mailman/listinfo/ros-users
>
>