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

controller_spawner node missing

asked 2018-04-09 22:18:33 -0500

nm46nm gravatar image

updated 2018-04-12 09:26:58 -0500

I want to simulate many uavs in gazebo, when I launched 20uavs in gazebo, I found 17th-20th uav can't be controlled. I checked the rqt_graph and found that the node /gazebo had subscribed all uavs' topic (/pose_action) but the last four. So I want to know is there any limitation on topics a node can subscribe?

update1: I found 17th-20th uavs didn't have the topic "cmd_vel". On the other hand, I checked the rqt_graph and found that the node /gazebo had subscribed all uavs' topic (/command/pose) but the last four. I checked the log and found that the four uavs' log had the following warning:

Controller Spawner couldn't find the expected controller_manager ROS interface.

But other uavs all correctly load controller_manager and upload the controller. I had tried many times and sometimes there were 5 wrong and sometimes 3 and etc. Why some of them can't?

update2: I also found the four uavs' node (controller_spawner) were not created.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2018-04-10 00:01:56 -0500

ahendrix gravatar image

updated 2018-04-10 11:36:58 -0500

There aren't any hard limits in ROS on the number of subscribers, but your operating system may have some limits that indirectly limit the number of publishers or subscribers. For example the maximum number of open file descriptors limits the number of open TCP connections that a process can have.

On most common versions of Ubuntu Linux, for example, the maximum number of open file descriptors is 1024. I suspect your subscriber is nowhere near this limit, but if gazebo is publishing and subscribing to many topics per uav, it may be close to this limit.

You should be able to find the PID (process ID) for gazebo through ps; something like ps a | grep gazebo will probably help. Once you have the process ID, you can show all of the open file descriptors for gazebo with lsof -p {PID} (where {PID} is the process ID for gazebo), or you can count the number of open file descriptors with lsof -p {PID} | wc -l.

edit flag offensive delete link more



Additionally: it might be good to check whether the (Gazebo) plugins used impose any (artificial) limits. 20 - 4 == 16. That is too nice a number to be a coincidence.

gvdhoorn gravatar image gvdhoorn  ( 2018-04-10 03:28:56 -0500 )edit

I had changed the ulimit by ulimit -n 20480 before, it seemingly didn't work. Besides, when I try lsof -P {PID} , it says "No such file or directory", why?(I had replaced the pid)

nm46nm gravatar image nm46nm  ( 2018-04-10 06:26:38 -0500 )edit

oops; that should be a lowercase p: lsof -p {PID}

ahendrix gravatar image ahendrix  ( 2018-04-10 11:37:26 -0500 )edit

Thank you but it toled me "lsof: WARNING: can't stat() tracefs file system /sys/kernel/debug/tracing ,Output information may be incomplete." When I put sudo in front of the lsof, it said "lsof: WARNING: can't stat() fuse.gvfsd-fuse file system /run/user/1000/gvfs ,Output information may be incom..."

nm46nm gravatar image nm46nm  ( 2018-04-11 07:05:24 -0500 )edit

@gvdhoorn, it is not always 16. If we want to simu 30 uavs, there are just 9 or 14 or 11 etc uavs connected.

nm46nm gravatar image nm46nm  ( 2018-04-11 07:08:38 -0500 )edit

Question Tools


Asked: 2018-04-09 22:18:33 -0500

Seen: 385 times

Last updated: Apr 12 '18