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

ROS Master does not appear to be running.

asked 2021-06-07 13:05:29 -0500

trevor gravatar image

I run roscore, and the output is as follows:

root@ecorosdocker:~/src/f-ecoation-ros# roscore
... logging to /mnt/log/e19e7520-c7b2-11eb-a61d-505bc264e453/roslaunch-ecorosdocker-143.log
Checking log directory for disk usage. This may take a while.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.

started roslaunch server http://127.0.0.1:43373/
ros_comm version 1.14.11


SUMMARY
========

PARAMETERS
* /rosdistro: melodic
* /rosversion: 1.14.11

NODES

auto-starting new master

but when I run roswtf this is the output:

root@ecorosdocker:~# roswtf
Loaded plugin tf.tfwtf
No package or stack in the current directory
================================================================================
Static checks summary:

No errors or warnings
================================================================================

ROS Master does not appear to be running.
Online graph checks will not be run.
ROS_MASTER_URI is [http://ecorosdocker:11311]

These are my ROS environment variables:

root@ecorosdocker:~# env | grep ROS
ROS_LOG_DIR=/mnt/log
ROSCONSOLE_FORMAT=[${severity}] [${node}] [${time}]: ${message}
ROS_ETC_DIR=/opt/ros/melodic/etc/ros
ROS_ROOT=/opt/ros/melodic/share/ros
ROS_MASTER_URI=http://ecorosdocker:11311
ROS_VERSION=1
ROS_PYTHON_VERSION=2
ROS_IP=127.0.0.1
ROS_PACKAGE_PATH=/opt/ros/melodic/share
ROSLISP_PACKAGE_DIRECTORIES=
ROS_DISTRO=melodic

I guess I should ask a question: why can't I communicate with the master!? I'm running this in a docker container, which I am using as a test environment, and have a very very similar setup running on some hardware as a production environment, and it works just fine.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2021-06-10 15:36:51 -0500

trevor gravatar image

I've traced this down to a call to subprocess.Popen in roslaunch/nodeprocess.py. I have no idea why that line is failing [yet]

edit flag offensive delete link more

Comments

After more looking, I learned that this came down to an issue with python 2.7's implementation of subprocess.Popen being buggy. Installing subprocess32 via pip, then running this command fixed it.

sed -i "s/import subprocess/import subprocess32 as subprocess/g" /opt/ros/kinetic/lib/python2.7/dist-packages/roslaunch/nodeprocess.py

trevor gravatar image trevor  ( 2021-06-10 17:13:43 -0500 )edit

I'm confused: you state you're running Melodic, but then also show a sed command line which points to /opt/ros/kinetic?

gvdhoorn gravatar image gvdhoorn  ( 2021-06-11 11:18:35 -0500 )edit

You're right: that's confusing.

We recently migrated to melodic, and I started trying to solve this on melodic, then went back to kinetic.

trevor gravatar image trevor  ( 2021-06-11 15:23:15 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2021-06-07 12:18:38 -0500

Seen: 630 times

Last updated: Jun 10 '21