Ask Your Question
1

turtlesim initialises at x=[inf], y=[inf], theta=[0.000000]

asked 2012-05-01 04:37:30 -0500

Need More Input gravatar image

When I execute

~$ rosrun turtlesim turtlesim_node

an empty blue "TurtleSim" simulation window pops up and the following messages are issued:

$ rosrun turtlesim turtlesim_node
QGtkStyle was unable to detect the current GTK+ theme.
[ INFO] [1335558676.993640551]: Starting turtlesim with node name /turtlesim
[ INFO] [1335558677.369623672]: Spawning turtle [turtle1] at x=[inf], y=[inf], theta=[0.000000]


Question 1 (of 2): Why is turtle1 spawned at a location beyond the end of the universe, instead of at its origin [0,0] ?


I executed

~$ rosrun turtlesim turtle_teleop_key

to see if the [x,y] coordinates would change when the up/down arrow keys were pressed, but unfortunately this is not the case. The [theta] value however -does- respond when the left/right arrow keys are pressed.

Output of the /turtle1/command_velocity topic:

$ rostopic echo /turtle1/command_velocity
linear: 2.0
angular: 0.0
---
linear: -2.0
angular: 0.0
---
linear: 0.0
angular: 2.0
---
...

Output of the /turtle1/pose topic:

...
---
x: inf
y: nan
theta: -3.06081461906
linear_velocity: 0.0
angular_velocity: 2.0
---
x: inf
y: nan
theta: -3.02881479263
linear_velocity: 0.0
angular_velocity: 2.0
---
x: inf
y: nan
theta: -2.99681472778
linear_velocity: 0.0
angular_velocity: 2.0
---
...


Question 2 (of 2): Is there perhaps a way to hard-set the [x,y] location ? E.g. something in the line of a command like "set turtle_pos=[0,0]" ?

edit retag flag offensive close merge delete

4 Answers

Sort by ยป oldest newest most voted
0

answered 2012-05-03 01:02:03 -0500

jamuraa gravatar image

Hard setting anything will not work in this case, because turtlesim has no clue how large a meter is supposed to be (it is initialized by the size of a turtle in the images directory). To get turtlesim working without updating your ROS, you can copy the image files into /opt/ros/fuerte/share/turtlesim/images from the source download.

edit flag offensive delete link more
2

answered 2012-05-01 08:54:41 -0500

mmwise gravatar image

A ticket for this problem has been filed here: https://code.ros.org/trac/ros/ticket/3942

edit flag offensive delete link more
0

answered 2012-05-04 11:19:16 -0500

Need More Input gravatar image

answering my own question 2) : it turns out that it -is- possible to hard-set the location and orientation of the turtle. This can be accomplished by issuing the following command:

$ rosservice call /turtle1/teleport_absolute -- [X] [Y] [theta]

where [X],[Y], and [theta] are float numbers.

For example:

$ rosservice call /turtle1/teleport_absolute -- 0.0 0.0 90.0

puts the turtle in the lower left corner pointed upward.

edit flag offensive delete link more
-1

answered 2012-05-02 08:51:42 -0500

ezex gravatar image

im getting the same issue, and not turtle anywhere to see it.

edit flag offensive delete link more

Comments

1

See @mwise_wg's answer. A ticket was filed, a fix applied and it will go out with the next update of the binaries.

Eric Perko gravatar image Eric Perko  ( 2012-05-02 12:27:27 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2012-05-01 04:37:30 -0500

Seen: 1,378 times

Last updated: May 04 '12