ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
1

ROS-Error why is it occurring?

asked 2015-02-11 15:27:53 -0600

215 gravatar image

updated 2015-02-12 04:47:31 -0600

I created a tread before in which i had problems roslaunch flir_ptu_driver package, but now i am able to do so.. The problem is now connection to the PTU itself.

This problems occurs when it runs.

 SUMMARY
========

PARAMETERS
  * /ptu/ptu_driver/port: /dev/ttyS0
  * /robot_description: <?xml version="1....
  * /rosdistro: indigo
  * /rosversion: 1.11.10

NODES   /ptu/
    ptu_driver (flir_ptu_driver/ptu_node)   /
    robot_state_publisher (robot_state_publisher/state_publisher)

ROS_MASTER_URI=http://localhost:11311

core service [/rosout] found
process[robot_state_publisher-1]: started with pid [22448]
process[ptu/ptu_driver-2]: started with pid [22471]
[ERROR] [1423666094.360529213]: Error getting pan-tilt res
[ERROR] [1423666094.567848519]: Error getting pan-tilt res
[ERROR] [1423666094.775231719]: Error getting pan-tilt limit
[ERROR] [1423666094.982708429]: Error getting pan-tilt limit
[ERROR] [1423666095.189972127]: Error getting pan-tilt limit
[ERROR] [1423666095.397236971]: Error getting pan-tilt limit
[ERROR] [1423666095.604498868]: Error getting pan-tilt limit
[ERROR] [1423666095.811768242]: Error getting pan-tilt limit
[ERROR] [1423666096.019039689]: Error getting pan-tilt limit
[ERROR] [1423666096.226318569]: Error getting pan-tilt limit
[ERROR] [1423666096.226392784]: Could not initialize FLIR PTU on /dev/ttyS0

It seems like that the first error messages end, so they seem to resolve somehow, but the last one freezes and never gets resolved. How come?...

edit retag flag offensive close merge delete

Comments

I'm having the same problem at this very moment. Thanks for asking

Pototo gravatar image Pototo  ( 2015-02-11 18:19:34 -0600 )edit

3 Answers

Sort by » oldest newest most voted
1

answered 2015-02-13 04:32:33 -0600

215 gravatar image

updated 2015-02-13 10:00:41 -0600

I 've been debugging the code and can see that during the initializing phase, RX receives garbage values.. eg. write("px ") returns |n8 and not a 7311. pr therefore get the value -1, and automatically lead the boolean initialize to false, which is why it freezes.

--- Edit

problem resolved baudrate was incorrect.

edit flag offensive delete link more

Comments

Can you be a bit more specific? I'm currently having the exact same problem. Thanks in advance.

kokirits gravatar image kokirits  ( 2015-03-03 05:24:43 -0600 )edit

The code is preset to run on a baud rate 9600. I changed that to one I had specified, and it worked.

215 gravatar image 215  ( 2015-03-04 03:55:41 -0600 )edit

Do you remember the baud rate you set ?

kokirits gravatar image kokirits  ( 2015-03-04 04:14:40 -0600 )edit

´stty -F /dev/ttyXX´ will tell you what your baud rate should be

215 gravatar image 215  ( 2015-03-04 04:32:08 -0600 )edit

Thanks for answering. Still having the same error though. My question at ros answers can be found here.

kokirits gravatar image kokirits  ( 2015-03-04 06:16:55 -0600 )edit
0

answered 2015-02-12 20:42:20 -0600

Pototo gravatar image

hhmm...ironically I get that error when the wrong device is connected to the port I roslaunched to. Maybe there is data being transmitted through ttyS0 from another device connected to it, and that might be why we "can't get the pan-tilt information."

My solution was to go through every port that had a device connected, and roslaunched to it. Eventually I found the right port name. Now I can move the PTU from the command line.

I used a program called "gtkterm" to find just the ports that had devices connected to them, rather than going through every single port in the computer:

sudo gtkterm

I hope this helps.

edit flag offensive delete link more

Comments

I would suggest to look into using udev rules to give your ptu a recognisable name under /dev/. That would remove much of the guess work. See Clearpath Robotics - Do More with Udev for some more info.

gvdhoorn gravatar image gvdhoorn  ( 2015-02-13 02:18:09 -0600 )edit

I tried dmesg | grep tty and got this response [ 0.000000] console [tty0] enabled [ 0.621767] 00:08: ttyS0 at I/O 0x3f8 (irq = 4, base_baud = 115200) is a 16550A

I am certain that this must be the port

215 gravatar image 215  ( 2015-02-13 04:22:55 -0600 )edit
0

answered 2015-02-11 20:14:10 -0600

tfoote gravatar image

It looks like you cannot connect to your device. Maybe it's not on or not plugged in to port /dev/ttyS0

edit flag offensive delete link more

Comments

I am able to connect to it using screen. So it is connected.

215 gravatar image 215  ( 2015-02-12 04:10:26 -0600 )edit

What are the command arguments that you used in order to connect to it through screen?

Pototo gravatar image Pototo  ( 2015-02-12 13:11:27 -0600 )edit

screen /dev/ttyS0 19200

215 gravatar image 215  ( 2015-02-12 14:09:25 -0600 )edit

Question Tools

2 followers

Stats

Asked: 2015-02-11 15:27:53 -0600

Seen: 2,646 times

Last updated: Feb 13 '15