Hi Ben, 2015-02-26 15:08 GMT+01:00 Ben Coman <b...@openinworld.com>:
> > > On Thu, Feb 26, 2015 at 1:10 AM, jannik laval <jannik.la...@gmail.com> > wrote: > >> Hi Dave, >> >> >> >> 2015-02-25 17:05 GMT+01:00 David T. Lewis <le...@mail.msen.com>: >> >>> Hi Jannik, >>> >>> One other thing I just thought of: Check and see if your rostopic program >>> is actually writing to standard output, as opposed to writing directly to >>> /dev/tty. From a terminal window, I think you could do this: >>> >>> $ rostopic > out.txt >>> >> >> Yes, it writes on the file after a ctrl-c. >> > > Is that a hint? So if in one terminal you run $ rostopic > out.txt > then without hitting ctrl-c, in another terminal view the contents of > out.txt, is it empty? > Yes, it is empty. So, the best way I have is: I run the script > I kill it after a while > I receive the infos. But when I want to terminate it , nothing happens: the process is not killed, and I have no error. Jannik > > Do you get different behaviour with this between each of these mode [1]?... > > > - > > *Latching mode* > - > > rostopic will publish a message to /topic_name and keep it *latched* -- > any new subscribers that come online after you start rostopic will > hear this message. You can stop this at any time by pressing ctrl-C. > > *Once mode* > - > > If you don't want to have to stop rostopic with ctrl-C, you can > publish in *once mode*. rostopic will keep the message latched for > 3 seconds, then quit. > > *Rate mode*. > - > > In rate mode, rostopic will publish your message at a specific > rate. For example, -r 10 will publish at 10hz. For file and piped > input, this defaults to 10hz. > > Options: > > - > > -l, --latch New in Diamondback > - > > Enable latch mode. Latching mode is the *default* when using > command-line arguments. > > -r RATE > - > > Enable *rate mode*. Rate mode is the *default* (10hz) when using > piped or file input. > > -1, --once > - > > Enable *once mode*. > > cheers -ben > > [1] http://wiki.ros.org/rostopic#rostopic_pub > [2] > http://answers.ros.org/question/59070/disable-latching-for-rostopic-in-piping-mode/ > -- ~~Jannik Laval~~ École des Mines de Douai Enseignant-chercheur http://www.jannik-laval.eu http://www.phratch.com http://www.approchealpes.info http://car.mines-douai.fr/