Ask Your Question
0

Rostopic weird behaviour an Raspberry

asked 2014-05-14 05:36:07 -0500

Maya gravatar image

updated 2014-05-14 07:30:54 -0500

Hellow,

I installed the robot variant on my raspberry Pi. For this I had to get rid of two packages : ros_lisp and collada_urdf. Anyway...

My pi is having a very weird behaviour when publishing on some topic.

Let's say I'm publishing a Twist on the cmd_vel topic like this :

rostopic pub -r 1 cmd_vel geometry_msgs/Twist '{linear: {x: 1.0, y: 0.0, z: 0.0}, angular: {x: 0.0, y: 0.0, z: 0.0}}'

If I use

rostopic echo cmd_vel

I'm going to be able to see what is publish ONLY if I start publish before subscribing. If I publish a new message it is not "printed" "detected" until I stop rostopic echo and start it again.

This behaviour is global to any subscribe publish since I tried it with another node and I have the same problem.

I have no clue as from where does this problem comes from. If someone got any idea...

EDIT :

after reading this thread I must say that I started a roscore in a terminal by itself so I'm not restarting it.

EDIT 2 :

It might be relevant to say that I'm accessing the Pi through the Yaler Interface with ssh. But I'm accessing the Pi so, if I'm not mistaken, everything run on the Pi (I installed ROS through Yaler).

Thanks a lot !

edit retag flag offensive close merge delete

Comments

Are both of these nodes running on your Pi?

ahendrix gravatar imageahendrix ( 2014-05-14 06:35:41 -0500 )edit

Yes both of them are running on the Pi.

Maya gravatar imageMaya ( 2014-05-14 07:03:01 -0500 )edit

2 Answers

Sort by » oldest newest most voted
0

answered 2014-05-16 04:06:08 -0500

Maya gravatar image

updated 2014-05-16 08:19:18 -0500

So I tested again today and it actually work fine...

I have no idea what was happening but my guess is that one of my friend tried to launch a roscore from a ssh session on his computer that didn't work (lots of error messages) and, even though I though it stopped cleanly, it might have not and that would be the reason. At least, this is my guess.

Sorry for the false alert and thanks a lot @ahendrix for an answer that will most certainly be useful in the future !

edit flag offensive delete link more
1

answered 2014-05-14 07:16:06 -0500

ahendrix gravatar image

This sounds like the rostopic echo node isn't receiving the callback from the ROS master that tells it that there's a new publisher, which is probably why it isn't subscribing or seeing any messages.

There are a number of things you can do to debug this.

With just the roscore and the rostopic echo node running, inspect the rostopic echo node. First, find the node name with:

rosnode list

And look for a node name that starts with /rostopic. It will probably be something like /rostopic_36138_1400087540700. The inspect the node by running:

rosnode info /rostopic_36138_1400087540700

If it can't contact the node for some reason, troubleshoot your network configuration and your /etc/hosts file to make sure that the name advertised by the node resolves, either through DNS or through your /etc/hosts file.

If you're running the master on a separate machine from your Pi, also try running rosnode info from there, to make sure that the ros master can successfully contact the node to tell it about new publishers.

edit flag offensive delete link more

Comments

It's weird but it seems to be working fine now... I don't know what happen. I'll test tomorrow again, I'll quit it updated !

Maya gravatar imageMaya ( 2014-05-14 07:57:23 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2014-05-14 05:36:07 -0500

Seen: 196 times

Last updated: May 16 '14