Can't configure the laser

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Can't configure the laser

Blanca A. Vargas Govea
Hi,
 
I can't set the laser's configuration. In the previous version of Player and stage, the following chunk of code operated properly:
 
  double min,max;
  int resolution, rang_res, intensity;
 
  min = -G_PI_2;
  max = +G_PI_2;
  resolution = 50;
  range_res = 1;
  intensity = 1;
 
  printf("Configuring laser .............");
  if ( playerc_laser_set_config(laser, min, max, resolution, range_res, intensity) == 0 ) printf("[ok]\n");
  else printf("[ERROR]\n");
 

but when I run it in Player 1.6.5 and Stage 1.6.2 it doesn't works. The output's program shows "ok" but the laser doesn't report anything, it seems to be disconnected. If I remove the config line, the program works fine but I need to configure the laser in order to obtain the same results as the original program.
 
┬┐How can I configure the laser?
 
Thanks in advance,
Blanca
Reply | Threaded
Open this post in threaded view
|

Re: Can't configure the laser

Brian Gerkey

On Oct 4, 2005, at 12:13 AM, Blanca A. Vargas Govea wrote:


> I can't set the laser's configuration. In the previous version of  
> Player and stage, the following chunk of code operated properly:
>
>   double min,max;
>   int resolution, rang_res, intensity;
>
>   min = -G_PI_2;
>   max = +G_PI_2;
>   resolution = 50;
>   range_res = 1;
>   intensity = 1;
>
>   printf("Configuring laser .............");
>   if ( playerc_laser_set_config(laser, min, max, resolution,  
> range_res, intensity) == 0 ) printf("[ok]\n");
>   else printf("[ERROR]\n");
>
>
> but when I run it in Player 1.6.5 and Stage 1.6.2 it doesn't works.  
> The output's program shows "ok" but the laser doesn't report  
> anything, it seems to be disconnected. If I remove the config line,  
> the program works fine but I need to configure the laser in order  
> to obtain the same results as the original program.

Do you see any output on the console where you ran player & stage?  
Maybe a complaint about an unimplemented configuration request?

When you say the laser seems disconnected, do you mean that your  
client program stops receiving data from it?

     brian.


-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
Playerstage-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/playerstage-users
Reply | Threaded
Open this post in threaded view
|

Re: Can't configure the laser

Blanca A. Vargas Govea
In reply to this post by Blanca A. Vargas Govea
Hi,

> Do you see any output on the console where you ran player & stage?
> Maybe a complaint about an unimplemented configuration request?

When I run the program without the config line I don't get the last "got
laser request" messages. Here is the output:

trying to load /usr/local/lib/libstage...success
invoking player_driver_init()...success
  Stage driver creating 1 device
    mapping device 6665.31.0 => "b1.world" [Include pioneer.inc][Include
map.inc] done.
  Stage driver creating 1 device
    mapping device 6665.4.0 => "robot"
  Stage driver creating 1 device
    mapping device 6665.5.0 => "robot.ranger:0"
  Stage driver creating 1 device
    mapping device 6665.6.0 => "robot.laser:0"
Using device table:
------------------------------------------------------------
driver stage provides 6665:simulation:0
driver stage provides 6665:position:0
driver stage provides 6665:sonar:0
driver stage provides 6665:laser:0
------------------------------------------------------------
listening on ports: 6665
** Player [port 6665] client accepted from 127.0.0.1 on socket 9 **
got laser request
got laser request

===========================================

>
> When you say the laser seems disconnected, do you mean that your
> client program stops receiving data from it?

Yes, it's what I mean. Here is the program's output with the
configuration line:

blanca@ubuntu:~/idmarcas/solo_marcas$ ./test_marcas
Connecting to the server ......[ok]
Suscribing laser ..............[ok]
Suscribing position ......Configuring laser .............

and here is the output without the configuration line. The program works
fine but only with the default laser's configuration:

blanca@ubuntu:~/idmarcas/solo_marcas$ ./test_marcas
Connecting to the server ......[ok]
Suscribing laser ..............[ok]
Suscribing position ...... 180 laser readings
   n  |    d    theta     A  
    0 |  1.72   -9.81   0.00  
    1 |  1.74  -17.73   0.00  
    2 |  2.62   48.60   0.00  
    3 |  0.54  -88.50   1.55  
    4 |  1.69   -1.00   2.15  
    5 |  2.03   88.50   1.59  


What could be the problem?
Thanks in advance for your help.

Regards,
Blanca

From: Brian Gerkey <[hidden email]>

> Subject: Re: [Playerstage-users] Can't configure the laser
> Date: Thu, 6 Oct 2005 09:52:45 -0700
> To: [hidden email]
> Reply-To: [hidden email]
>
>
> On Oct 4, 2005, at 12:13 AM, Blanca A. Vargas Govea wrote:
>
>
>> I can't set the laser's configuration. In the previous version of
>> Player and stage, the following chunk of code operated properly:
>>
>>   double min,max;
>>   int resolution, rang_res, intensity;
>>
>>   min = -G_PI_2;
>>   max = +G_PI_2;
>>   resolution = 50;
>>   range_res = 1;
>>   intensity = 1;
>>
>>   printf("Configuring laser .............");
>>   if ( playerc_laser_set_config(laser, min, max, resolution,
>> range_res, intensity) == 0 ) printf("[ok]\n");
>>   else printf("[ERROR]\n");
>>
>>
>> but when I run it in Player 1.6.5 and Stage 1.6.2 it doesn't works.
>> The output's program shows "ok" but the laser doesn't report
>> anything, it seems to be disconnected. If I remove the config line,
>> the program works fine but I need to configure the laser in order
>> to obtain the same results as the original program.
>
> Do you see any output on the console where you ran player & stage?
> Maybe a complaint about an unimplemented configuration request?
>
> When you say the laser seems disconnected, do you mean that your
> client program stops receiving data from it?
>
>     brian.


-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
Playerstage-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/playerstage-users