Quantcast

robot don't spin correctly

classic Classic list List threaded Threaded
21 messages Options
12
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

robot don't spin correctly

light86
hi every one i've make p2dProxy.SetSpeed(0, 2*3.1415926535897) in my code
but the robot don't  spin in a complete circle
this is the definition of my robot

        size [1 1 1]
        drive "diff"
        bitmap "circle.png"
        robot_laser()
        laser_return 1                
        localization "gps"
localization_origin [0 0 0 0]
Thank you
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: robot don't spin correctly

Richard Vaughan-4
Please read Jenny Owen's tutorial to get to grips with the basic stuff.

Rtv

Sent from a mobile gadget

On 2013-05-12, at 19:09, light86 <[hidden email]> wrote:

> hi every one i've make p2dProxy.SetSpeed(0, 2*3.1415926535897) in my code
> but the robot don't  spin in a complete circle
> this is the definition of my robot
>
>    size [1 1 1]
>    drive "diff"
>    bitmap "circle.png"
>    robot_laser()
>    laser_return 1
>    localization "gps"
> localization_origin [0 0 0 0]
> Thank you
>
>
>
> --
> View this message in context: http://player-stage-gazebo.10965.n7.nabble.com/robot-don-t-spin-correctly-tp18796.html
> Sent from the playerstage-developers mailing list archive at Nabble.com.
>
> ------------------------------------------------------------------------------
> Learn Graph Databases - Download FREE O'Reilly Book
> "Graph Databases" is the definitive new guide to graph databases and
> their applications. This 200-page book is written by three acclaimed
> leaders in the field. The early access version is available now.
> Download your free book today! http://p.sf.net/sfu/neotech_d2d_may
> _______________________________________________
> Playerstage-developers mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/playerstage-developers

------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and
their applications. This 200-page book is written by three acclaimed
leaders in the field. The early access version is available now.
Download your free book today! http://p.sf.net/sfu/neotech_d2d_may
_______________________________________________
Playerstage-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/playerstage-developers
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: robot don't spin correctly

light86
This post was updated on .
dear thank you for your answers
I've read the tutorial ,i have execute his project
in her example she said to turn the robot use set speed(0,angular speed)

my question please
i've set my angular 2pi in second and my robot is circle  
why the robot don't return in the original pose?
I'm student in computer science
Please explain me I want to learn
Thank you
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: robot don't spin correctly

Richard Vaughan-2
Because you set a speed and not a position. 

On Sunday, May 12, 2013, light86 wrote:
dear thank you for your anwers
I've read the tutorial ,i have execute his project
in her example she said to turn the robot use set speed(0,angular speed)

my question please
i've set my angular 2pi in second and my robot is circle
why the robot don't return in the original pose?
I'm student in computer science
Please explain me I want to learn
Thank you



--
View this message in context: http://player-stage-gazebo.10965.n7.nabble.com/robot-don-t-spin-correctly-tp18796p18798.html
Sent from the playerstage-developers mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and
their applications. This 200-page book is written by three acclaimed
leaders in the field. The early access version is available now.
Download your free book today! http://p.sf.net/sfu/neotech_d2d_may
_______________________________________________
Playerstage-developers mailing list
<a href="javascript:;" onclick="_e(event, &#39;cvml&#39;, &#39;Playerstage-developers@lists.sourceforge.net&#39;)">Playerstage-developers@...
https://lists.sourceforge.net/lists/listinfo/playerstage-developers


--
Sent from a mobile gadget

------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and
their applications. This 200-page book is written by three acclaimed
leaders in the field. The early access version is available now.
Download your free book today! http://p.sf.net/sfu/neotech_d2d_may
_______________________________________________
Playerstage-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/playerstage-developers
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: robot don't spin correctly

light86
dear thank you for answer
please you have said to me
that when i make the angular speed as 2pi the robot a make a complete circle
if the robot don't return to his original pose so what is the meaning of 2pi angular speed

really i'm lost! but i want to learn
Thank you
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: robot don't spin correctly

Fred Labrosse
In reply to this post by light86
On Sunday 12 May 2013 12:03:08 light86 wrote:
> dear thank you for your anwers
> I've read the tutorial ,i have execute his project
> in her example she said to turn the robot use set speed(0,angular speed)
>
> my question please
> i've set my angular 2pi in second and my robot is circle
> why the robot don't return in the original pose?
> I'm student in computer science
> Please explain me I want to learn

You set a speed of 2pi per second, ie you instructed the robot to turn at a
speed of 2pi per second, until you tell it to stop.

You need to understand the difference between setting the speed and setting
the position.  In player, you can only control the speed of your robot, not
its position.  If you need to control the position, then you need to use what
I described to you a few days ago.

BTW, 2pi per second is fast.

Fred


> Thank you
>
>
>
> --
> View this message in context:
> http://player-stage-gazebo.10965.n7.nabble.com/robot-don-t-spin-correctly-t
> p18796p18798.html Sent from the playerstage-developers mailing list archive
> at Nabble.com.
>
> ----------------------------------------------------------------------------
> -- Learn Graph Databases - Download FREE O'Reilly Book
> "Graph Databases" is the definitive new guide to graph databases and
> their applications. This 200-page book is written by three acclaimed
> leaders in the field. The early access version is available now.
> Download your free book today! http://p.sf.net/sfu/neotech_d2d_may
> _______________________________________________
> Playerstage-developers mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/playerstage-developers

------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and
their applications. This 200-page book is written by three acclaimed
leaders in the field. The early access version is available now.
Download your free book today! http://p.sf.net/sfu/neotech_d2d_may
_______________________________________________
Playerstage-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/playerstage-developers
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: robot don't spin correctly

light86
This post was updated on .
dear thank you for your help.
really i'm trying to understand
i've read " If you set a yaw speed  of 2*pi radians/second, it will spin in a complete circle"

for me it mean that the robot return in his original pose ,but in the simulation he don't return exactly to his original pose
Please could you explain
Thank you
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: robot don't spin correctly

Fred Labrosse
On Monday 13 May 2013 07:01:48 light86 wrote:
> dear thank you for your help.
> please what i don't understand if when i make the angular speed 2pi in
> second ,what is the duration of the instruction setspeed ) ( it  one
> second?)

It sets the speed, for ever, until you change it.  The speed is in radian per
second for the rotation (like you have in Europe kilometre per hour for cars).

Fred

> Thank you
>
>
>
> --
> View this message in context:
> http://player-stage-gazebo.10965.n7.nabble.com/robot-don-t-spin-correctly-t
> p18796p18802.html Sent from the playerstage-developers mailing list archive
> at Nabble.com.
>
> ----------------------------------------------------------------------------
> -- Learn Graph Databases - Download FREE O'Reilly Book
> "Graph Databases" is the definitive new guide to graph databases and
> their applications. This 200-page book is written by three acclaimed
> leaders in the field. The early access version is available now.
> Download your free book today! http://p.sf.net/sfu/neotech_d2d_may
> _______________________________________________
> Playerstage-developers mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/playerstage-developers

------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and
their applications. This 200-page book is written by three acclaimed
leaders in the field. The early access version is available now.
Download your free book today! http://p.sf.net/sfu/neotech_d2d_may
_______________________________________________
Playerstage-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/playerstage-developers
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: robot don't spin correctly

light86
dear thank you for help
please if i make the angular speed 2*pi par second ,so can explain me why i don't seen that the robot spin in a complete circle


really i don't understand
Thank you
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: robot don't spin correctly

Fred Labrosse
On Monday 13 May 2013 07:59:24 light86 wrote:
> dear thank you for help
> please if i make the angular speed 2*pi par second ,so can explain me why i
> don't seen that the robot spin in a complete circle
>

I don't understand what that means.  Do you mean that the robot stops turning
after a while?

You don't say much about the robot you use, so I can only guess (if the answer
to the above is yes).  Some robots have a watchdog that makes them stop if
they don't receive regular instructions (a safety feature).

Otherwise, does your program crash (stop)?

Fred

>
> really i don't understand
> Thank you
>
>
>
> --
> View this message in context:
> http://player-stage-gazebo.10965.n7.nabble.com/robot-don-t-spin-correctly-t
> p18796p18804.html Sent from the playerstage-developers mailing list archive
> at Nabble.com.
>
> ----------------------------------------------------------------------------
> -- Learn Graph Databases - Download FREE O'Reilly Book
> "Graph Databases" is the definitive new guide to graph databases and
> their applications. This 200-page book is written by three acclaimed
> leaders in the field. The early access version is available now.
> Download your free book today! http://p.sf.net/sfu/neotech_d2d_may
> _______________________________________________
> Playerstage-developers mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/playerstage-developers

------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and
their applications. This 200-page book is written by three acclaimed
leaders in the field. The early access version is available now.
Download your free book today! http://p.sf.net/sfu/neotech_d2d_may
_______________________________________________
Playerstage-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/playerstage-developers
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: robot don't spin correctly

light86
This post was updated on .
dear thank you this is the configuration of my robot
define robot position
(
        size [1 1 1]
        drive "diff"
        bitmap "circle.png"
        robot_laser()
        laser_return 1                
        ranger_return 1
        localization "gps"robot

localization_origin [0 0 0 0]
)
my world file
robot
(
        name "r1"
        color "green"
        pose [-5.000 -6.000 0 90]
)
my code c++
p2dProxy.RequestGeom();  
 robot.Read();

p2dProxy.SetSpeed(0, 2*3.1415926535897);

in some execution  i have a crash
 
Thank you
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: robot don't spin correctly

Fred Labrosse
On Monday 13 May 2013 08:12:58 light86 wrote:

> dear thank you this is the configuration of my robot
> define robot position
> (
> size [1 1 1]
> drive "diff"
> bitmap "circle.png"
> robot_laser()
> laser_return 1
> ranger_return 1
> localization "gps"robot
> (
> name "r1"
> color "green"
> pose [-5.000 -6.000 0 90]
>
> )
> localization_origin [0 0 0 0]
> )
> my world file
> robot
> (
> name "r1"
> color "green"
> pose [-5.000 -6.000 0 90]
> )
> my code c++
> p2dProxy.RequestGeom();
>  robot.Read();
>
> p2dProxy.SetSpeed(0, 2*3.1415926535897);
>
> in some execution  i have a crash

If you want help about a crash you will have to send a bit more of your code.

Fred

>
> Thank you
>
>
>
> --
> View this message in context:
> http://player-stage-gazebo.10965.n7.nabble.com/robot-don-t-spin-correctly-t
> p18796p18806.html Sent from the playerstage-developers mailing list archive
> at Nabble.com.
>
> ----------------------------------------------------------------------------
> -- Learn Graph Databases - Download FREE O'Reilly Book
> "Graph Databases" is the definitive new guide to graph databases and
> their applications. This 200-page book is written by three acclaimed
> leaders in the field. The early access version is available now.
> Download your free book today! http://p.sf.net/sfu/neotech_d2d_may
> _______________________________________________
> Playerstage-developers mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/playerstage-developers

------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and
their applications. This 200-page book is written by three acclaimed
leaders in the field. The early access version is available now.
Download your free book today! http://p.sf.net/sfu/neotech_d2d_may
_______________________________________________
Playerstage-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/playerstage-developers
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: robot don't spin correctly

light86
This post was updated on .
dear it is the final code just i didn't write here the initialization and declaration of variable to be easy to read
Please I want to know why when i use setspeed with 2*pi the robot didn't return in the original pose

this is the code
#include <stdio.h>
#include <unistd.h>
#include <time.h>
#include <libplayerc++/playerc++.h>
#include <math.h>
using namespace PlayerCc;
 PlayerClient    robot("localhost", 6665);
Position2dProxy p2dProxy(&robot,0);

int main(int argc, char *argv[])
{   using namespace PlayerCc;

robot.Read();
   p2dProxy.SetMotorEnable(1);
p2dProxy.RequestGeom();

 
//p2dProxy.SetSpeed(0, 2*3.1415926535897);
}
Thank you
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: robot don't spin correctly

Fred Labrosse
On Monday 13 May 2013 09:54:29 light86 wrote:
> dear it is the final code just i didn't write here the initialization and
> declaration of variable to be easy to read
> Please I want to know why when i use setspeed with 2*pi the robot didn't
> return in the original pose

When I ask for the code, there is a reason.  The problem is likely to be in
the bits you have not sent.

This definitely looks like a coding issue (computer science), not a player
issue...

Fred

>
> Thank you
>
>
>
> --
> View this message in context:
> http://player-stage-gazebo.10965.n7.nabble.com/robot-don-t-spin-correctly-t
> p18796p18808.html Sent from the playerstage-developers mailing list archive
> at Nabble.com.
>
> ----------------------------------------------------------------------------
> -- Learn Graph Databases - Download FREE O'Reilly Book
> "Graph Databases" is the definitive new guide to graph databases and
> their applications. This 200-page book is written by three acclaimed
> leaders in the field. The early access version is available now.
> Download your free book today! http://p.sf.net/sfu/neotech_d2d_may
> _______________________________________________
> Playerstage-developers mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/playerstage-developers

------------------------------------------------------------------------------
AlienVault Unified Security Management (USM) platform delivers complete
security visibility with the essential security capabilities. Easily and
efficiently configure, manage, and operate all of your security controls
from a single console and one unified framework. Download a free trial.
_______________________________________________
Playerstage-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/playerstage-developers
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: robot don't spin correctly

light86
dear   thank you  please what is the issue with code?
(the compilation  work ,the execution work also )
i see the motion of the robot

Thank you
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: robot don't spin correctly

Richard Vaughan-2

Your question has been answered a couple of times already. Please read the answers carefully.

You are setting a rotational velocity for the robot. You are asking it to turn at 2 pi radians per second. it will turn at that speed (or probably slower since that is very fast) until you tell it to stop.

You are not telling it to turn 2 pi radians. Consider the difference between commanding a speed of 1m/s and a position of 1m. Same thing here only for rotation.

Rtv

On May 13, 2013 6:24 PM, "light86" <[hidden email]> wrote:
dear   thank you  please what is the issue with code?
(the compilation  work ,the execution work also )
i see the motion of the robot

Thank you



--
View this message in context: http://player-stage-gazebo.10965.n7.nabble.com/robot-don-t-spin-correctly-tp18796p18810.html
Sent from the playerstage-developers mailing list archive at Nabble.com.

------------------------------------------------------------------------------
AlienVault Unified Security Management (USM) platform delivers complete
security visibility with the essential security capabilities. Easily and
efficiently configure, manage, and operate all of your security controls
from a single console and one unified framework. Download a free trial.
_______________________________________________
Playerstage-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/playerstage-developers

------------------------------------------------------------------------------
AlienVault Unified Security Management (USM) platform delivers complete
security visibility with the essential security capabilities. Easily and
efficiently configure, manage, and operate all of your security controls
from a single console and one unified framework. Download a free trial.
http://p.sf.net/sfu/alienvault_d2d
_______________________________________________
Playerstage-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/playerstage-developers
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: robot don't spin correctly

light86
dear thank you i've  really read  all the answers
please is there any mean to set the time of motion
Thank you
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: robot don't spin correctly

Richard Vaughan-2

No. You have to write a controller yourself, as described in a previous reply.

On May 14, 2013 2:50 PM, "light86" <[hidden email]> wrote:
dear thank you i've  really read  all the answers
please is there any mean to set the time of motion
Thank you



--
View this message in context: http://player-stage-gazebo.10965.n7.nabble.com/robot-don-t-spin-correctly-tp18796p18817.html
Sent from the playerstage-developers mailing list archive at Nabble.com.

------------------------------------------------------------------------------
AlienVault Unified Security Management (USM) platform delivers complete
security visibility with the essential security capabilities. Easily and
efficiently configure, manage, and operate all of your security controls
from a single console and one unified framework. Download a free trial.
http://p.sf.net/sfu/alienvault_d2d
_______________________________________________
Playerstage-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/playerstage-developers

------------------------------------------------------------------------------
AlienVault Unified Security Management (USM) platform delivers complete
security visibility with the essential security capabilities. Easily and
efficiently configure, manage, and operate all of your security controls
from a single console and one unified framework. Download a free trial.
http://p.sf.net/sfu/alienvault_d2d
_______________________________________________
Playerstage-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/playerstage-developers
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: robot don't spin correctly

light86
dear thank you for your answer
(i'm student of computer science )
also i've notice that if i use setspeed(1,0) the robot move really 1 meter
i appreciate  your help
thank you
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: robot don't spin correctly

Rich Mattes-2
On Tue, May 14, 2013 at 10:05 AM, light86 <[hidden email]> wrote:
dear thank you for your answer
(i'm student of computer science )
also i've notice that if i use setspeed(1,0) the robot move really 1 meter
i appreciate  your help
thank you

As soon as your Player client program exits, Stage will stop moving the robot.  You have to keep your Player C++ program running for Stage to keep moving the robot.

------------------------------------------------------------------------------
AlienVault Unified Security Management (USM) platform delivers complete
security visibility with the essential security capabilities. Easily and
efficiently configure, manage, and operate all of your security controls
from a single console and one unified framework. Download a free trial.
http://p.sf.net/sfu/alienvault_d2d
_______________________________________________
Playerstage-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/playerstage-developers
12
Loading...