ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | Q&A
Ask Your Question

Error running ros in docker conatiner

asked 2019-05-09 22:26:37 -0500

vkajjam gravatar image

updated 2019-05-12 04:02:07 -0500

jayess gravatar image


I am getting the following error when the simulator connects with the ros server. The roslaunch is successful. -

Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/engineio/", line 505, in _trigger_event
    return self.handlers[event](*args)
  File "/usr/local/lib/python2.7/dist-packages/socketio/", line 509, in _handle_eio_message
    self._handle_event(sid, pkt.namespace,,
  File "/usr/local/lib/python2.7/dist-packages/socketio/", line 448, in _handle_event
    self._handle_event_internal(self, sid, data, namespace, id)
  File "/usr/local/lib/python2.7/dist-packages/socketio/", line 451, in _handle_event_internal
    r = server._trigger_event(data[0], namespace, sid, *data[1:])
  File "/usr/local/lib/python2.7/dist-packages/socketio/", line 480, in _trigger_event
    return self.handlers[namespace][event](*args)
  File "/capstone/ros/src/styx/", line 44, in control
  File "/capstone/ros/src/styx/", line 145, in publish_controls
  File "/capstone/ros/src/styx/", line 102, in create_steer
    st.steering_wheel_angle_cmd = val * math.pi/180.
AttributeError: 'SteeringReport' object has no attribute 'steering_wheel_angle_cmd'


I am trying to run this app in a docker container. The are the steps I followed -

git clone
cd CarND-Capstone
docker build . -t capstone
docker run -p 4567:4567 -v $PWD:/capstone -v /tmp/log:/root/.ros/ --rm -it capstone

from inside the container, I run the following commands

cd /capstone/ros
source devel/
roslaunch launch/styx.launch

I was able to verify that the dbw_mkz_msgs package is available on the conatiner at /opt/ros/kinetic/share path. When the same code is run on VirtiualBox I do not get this error. It could be the way docker sources ENV variables. Any help with this will be greatly appreciated.

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted

answered 2019-08-28 15:35:34 -0500

I also faced the above issue and the proposed solution didn't resolve. After some digging around, it appears that an update to the dbw_mkz_msgs package has renamed steering_wheel_angle_cmd to steering_wheel_angle. The recommended solution is to downgrade the dbw_mkz_msgs package to 1.1.1:

sudo apt-get install ros-$ROS_DISTRO-dbw-mkz=1.1.1* ros-$ROS_DISTRO-dbw-mkz-msgs=1.1.1* ros-$ROS_DISTRO-dbw-mkz-can=1.1.1* ros-$ROS_DISTRO-dbw-mkz-description=1.1.1* ros-$ROS_DISTRO-dbw-mkz-joystick-demo=1.1.1*

Update: it appears the issue has been resolved and pushed to a new version on github.

edit flag offensive delete link more

answered 2019-05-10 08:33:31 -0500

vkajjam gravatar image

I was able to fix the error by taking these steps -

  • Downloading the dbw_mkz_msgs module to ros/src
  • Running pip install pillow --upgrade inside the container

It was an issue with the package path.

edit flag offensive delete link more

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


Asked: 2019-05-09 22:26:37 -0500

Seen: 528 times

Last updated: May 12 '19