Quantcast

Obstacle Position Detection

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

Obstacle Position Detection

fdant
Hello everyone,

I am trying to implement a method of potential fields, but I'm having problems with the detection of obstacles. I researched a lot before creating this topic, and my question is: is there any drivers or proxies that can detect the exact coordinates of x, y using the laser?

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

Re: Detect Obstacle Position

Rich Mattes-2
> -----Original Message-----
> From: fdant [mailto:[hidden email]]
> Sent: Wednesday, July 06, 2011 1:43 AM
> To: [hidden email]
> Subject: [Playerstage-users] Detect Obstacle Position
>
>
> Hello everyone,
>
> I am trying to implement a method of potential fields, but I'm having
> problems with the detection of obstacles. I researched a lot before
> creating
> this topic, and my question is: is there any drivers or proxies that
> can
> detect the exact coordinates of x, y using the laser?
>
> Thanks

There are a couple of drivers like "laserposeinterpolator" and
"rangerposeinterpolator" that will interpolate position2d (x,y,yaw)
information to the timestamps on the laser/ranger data and attach it to the
range data.  But I don't think either of these do the necessary math to
generate Cartesian laser scan points from the position2d poses + laser
ranges & bearings.  That being said, with the correct position information,
it's trivial to calculate the x,y points of each laser scan.


Rich


------------------------------------------------------------------------------
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security
threats, fraudulent activity, and more. Splunk takes this data and makes
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2d-c2
_______________________________________________
Playerstage-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/playerstage-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Detect Obstacle Position

fdant
Rich Mattes-2 wrote
There are a couple of drivers like "laserposeinterpolator" and
"rangerposeinterpolator" that will interpolate position2d (x,y,yaw)
information to the timestamps on the laser/ranger data and attach it to the
range data.  But I don't think either of these do the necessary math to
generate Cartesian laser scan points from the position2d poses + laser
ranges & bearings.  That being said, with the correct position information,
it's trivial to calculate the x,y points of each laser scan.


Rich


------------------------------------------------------------------------------
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security
threats, fraudulent activity, and more. Splunk takes this data and makes
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2d-c2
_______________________________________________
Playerstage-users mailing list
Playerstage-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/playerstage-users
Thanks for the help. I'll learn how to use one of these drivers.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Detect Obstacle Position

Hunter Allen
There are also tools in the LaserProxy C++ class. I have done work with this very recently using player. The way I achieved it was by using the function GetPoint (uint32_t aIndex). The LaserProxy class is [1]. I use this, which gives the pose of the object with respect to the robot's coordinate frame. If you want to get the Pose of the object in terms of the global coordinate frame, you need to use a little bit of trig. I use the following with my research:

    //index is the index of the laser you are accessing.
    player_pose3d_t point = laserProxy->GetPose();
    player_pose2d_t pose;
    double x = localized->GetXPos();
    double xs = point.px;
    double y = localized->GetYPos();
    double ys = point.py;
    double a = localized->GetYaw();
    double as = laserProxy->GetBearing(index);
    pose.px = x + xs * cos(a) - ys * sin(a) + laserProxy->GetRange(index) * cos(a + as);
    pose.py = y + ys * cos(a) + xs * sin(a) + laserProxy->GetRange(index) * sin(a + as);
    pose.pa = laserProxy->GetBearing(index);

This player_pose2d_t can then be used as the position of the object. This has been working with great success for me.
If you have any questions, you can email me at hunterallen40@gmail.com
-Hunter A.

[1] http://playerstage.sourceforge.net/doc/Player-svn/player/classPlayerCc_1_1LaserProxy.html#a334c2e97a3ee5c31c31c610ed20ea7b5
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Detect Obstacle Position

fdant
Thanks Hunter A.

This a great help, I'll test it and return if it works for me too.

Hunter Allen wrote
There are also tools in the LaserProxy C++ class. I have done work with this very recently using player. The way I achieved it was by using the function GetPoint (uint32_t aIndex). The LaserProxy class is [1]. I use this, which gives the pose of the object with respect to the robot's coordinate frame. If you want to get the Pose of the object in terms of the global coordinate frame, you need to use a little bit of trig. I use the following with my research:

    //index is the index of the laser you are accessing.
    player_pose3d_t point = laserProxy->GetPose();
    player_pose2d_t pose;
    double x = localized->GetXPos();
    double xs = point.px;
    double y = localized->GetYPos();
    double ys = point.py;
    double a = localized->GetYaw();
    double as = laserProxy->GetBearing(index);
    pose.px = x + xs * cos(a) - ys * sin(a) + laserProxy->GetRange(index) * cos(a + as);
    pose.py = y + ys * cos(a) + xs * sin(a) + laserProxy->GetRange(index) * sin(a + as);
    pose.pa = laserProxy->GetBearing(index);

This player_pose2d_t can then be used as the position of the object. This has been working with great success for me.
If you have any questions, you can email me at hunterallen40@gmail.com
-Hunter A.

[1] http://playerstage.sourceforge.net/doc/Player-svn/player/classPlayerCc_1_1LaserProxy.html#a334c2e97a3ee5c31c31c610ed20ea7b5
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Detect Obstacle Position

irobo
Hello,

The reply given here is for stage previous versions, where laserproxy could be used.
In stage 4.1.1, is there any thing like GetPoint(uint32_t aIndex) function, since this function is not available in RangerProxy. Is there any alternate way by which obstacle position can be detected using laser in stage 4.1.1?

Thanks in Advance.
Loading...