[ros-users] ROS-NXT: Doubt about the usage of Ultrasonic Sensor

Melonee Wise mwise at willowgarage.com
Sun Sep 5 20:23:20 UTC 2010


As written on the nxt wiki page the nxt stack only works with the default Lego firmware v1.28 or greater. It will no work with the lejos firmware installed anything that is working is a fluke.

Thanks

-Melonee

On Sep 5, 2010, at 1:54 PM, Juan Antonio Breña Moral <bren at juanantonio.info> wrote:

> Good Evening,
> 
> I was testing Ultrasonic sensor over LeJOS firmware. When I use other
> sensor as Touch sensor or motors with LeJOS, I don't receive any
> problem, but Ultrasonic sensor generate an exception.
> 
> I think that both sensors send data in the same way using LCP. Isn't it?
> 
> The output that I receive when I use a NXT brick with LeJOS firmware:
> 
> domotica at domotica-laptop:~/nxtros/nxt/nxt/learning_nxt$ roslaunch robot.laun=
> ch
> ... logging to 
> /home/domotica/.ros/log/1daf418c-b907-11df-ab31-00130221cf70/roslaunch-domot=
> ica-laptop-12739.log
> Checking log directory for disk usage. This may take awhile.
> Press Ctrl-C to interrupt
> Done checking log file disk usage. Usage is <1GB.
> 
> started roslaunch server http://domotica-laptop:60973/
> 
> SUMMARY
> 
> PARAMETERS
>   * /nxt_ros/nxt_robot
> 
> NODES
>    /
>      nxt_ros (nxt_ros/nxt_ros.py)
> 
> ROS_MASTER_URI=3Dhttp://domotica-laptop:11311/
> 
> core service [/rosout] found
> process[nxt_ros-1]: started with pid [12758]
> [INFO] 1283710295.354657: Creating ultrasonic with name us1 on PORT_2
> Traceback (most recent call last):
>    File "/home/domotica/nxtros/nxt/nxt/nxt_ros/scripts/nxt_ros.py", =20
> line 406, in <module>
>      main()
>    File "/home/domotica/nxtros/nxt/nxt/nxt_ros/scripts/nxt_ros.py", =20
> line 395, in main
>      c.do_trigger()
>    File "/home/domotica/nxtros/nxt/nxt/nxt_ros/scripts/nxt_ros.py", =20
> line 98, in do_trigger
>      self.trigger()
>    File "/home/domotica/nxtros/nxt/nxt/nxt_ros/scripts/nxt_ros.py", =20
> line 193, in trigger
>      ds.range =3D self.ultrasonic.get_sample()/100.0
>    File "/home/domotica/nxtros/nxt/nxt/nxt_python/src/nxt/sensor.py", =20
> line 319, in get_sample
>      self.set_command_state(CommandState.SINGLE_SHOT)
>    File "/home/domotica/nxtros/nxt/nxt/nxt_python/src/nxt/sensor.py", =20
> line 164, in command
>      self.i2c_command(address, value)
>    File "/home/domotica/nxtros/nxt/nxt/nxt_python/src/nxt/sensor.py", =20
> line 125, in i2c_command
>      self.brick.ls_write(self.port, msg, 0)
>    File "/home/domotica/nxtros/nxt/nxt/nxt_python/src/nxt/brick.py", =20
> line 23, in poll
>      igram =3D Telegram(opcode=3Dopcode, pkt=3Dself.sock.recv())
>    File "/home/domotica/nxtros/nxt/nxt/nxt_python/src/nxt/usbsock.py", =20
> line 69, in recv
>      data =3D self.handle.bulkRead(self.blk_in.address, 64)
> usb.USBError: No error
> [nxt_ros-1] process has died [pid 12758, exit code 1].
> log files: =20
> /home/domotica/.ros/log/1daf418c-b907-11df-ab31-00130221cf70/nxt_ros-1*.log
> 
> When I use a NXT brick with NXT-G with firmware 1.29, the output is right:
> 
> header:
>    seq: 1128
>    stamp:
>      secs: 1283710468
>      nsecs: 428602933
>    frame_id: ultrasonic_link
> range: 2.55
> range_min: 0.01
> range_max: 2.5
> spread_angle: 0.2
> 
> 
> Cheers
> -- 
> 
> Juan Antonio Breña Moral
> www.juanantonio.info
> www.roboticaenlaescuela.es
> 
> Este mensaje (incluyendo los archivos adjuntos) es confidencial y reservado. Si Vd. lo ha recibido por error, por favor notifíquelo al emisor del mismo vía e-mail y borre el mensaje de su sistema. Cualquier uso no autorizado o divulgaciín de su contenido, ya sea en todo o en parte, está totalmente prohibido. Tenga en cuenta que los e-mails son susceptibles de ser modificados.El remitente no se hará responsable de la incorrecta o incompleta transmisión de la información contenida en esta comunicación, ni por ningún retraso en la recepción o daño a sus sistemas. el remitente no garantiza que esta comunicación se ha realizado en su integridad ni que la misma no contiene virus, intercepciones o interferencias. Este e-mail ha sido escaneado mediante la utilización de Antivirus.
> 
> El tratamiento de los datos de carácter personal, así como el envío de boletines o comunicaciones realizadas por medios electrónicos, son conforme a la Ley Orgánica 15/1999, de 13 de diciembre, de Protección de Datos de Carácter Personal (B.O.E. de 14 de diciembre de 1999) y a la Ley 34/2002, de 11 de julio, de Servicios de la Sociedad de Información y de Comercio Electrónico (B.O.E. de 12 de julio de 2002). El tratamiento desautorizado de datos de caracter personal puede suponer una infracción de la Ley Orgánica 15/1999, de 13 de diciembre, de Protección de Datos de carácter personal. Si usted no es el destinatario que figura arriba, o la persona responsable de su entrega al mismo, deberá de abstenerse de examinar o utilizar su contenido, realizar copias o entregarlo a persona distinta. Para obtener información sobre la política de privacidad o para el ejercicio de
>  derechos de acceso, rectificación, cancelación y oposición, puede dirigirse a este correo electrónico, indicando en el asunto "Protección de Datos".
> 
> This message (including any attachments) is confidential and may be privileged. If you have received it by mistake, please notify the sender by return e-mail and delete this message from your system. Any unauthorized use or dissemination of this message in whole or in part is strictly prohibited. Please note that e-mails are susceptible to change. The sender shall not be liable for the improper or incomplete transmission of the information contained in this communication, nor for any delay in its receipt or damage to your system. The sender does not guarantee that the integrity of this communication has been maintained or that this communication is free from viruses, interceptions, or interference. This email has been scanned using Antivirus
> 
> 
> _______________________________________________
> ros-users mailing list
> ros-users at code.ros.org
> https://code.ros.org/mailman/listinfo/ros-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ros.org/pipermail/ros-users/attachments/20100905/bff36777/attachment-0003.html>


More information about the ros-users mailing list