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

error when run rosbridge

asked 2015-11-23 23:03:34 -0500

Thang Nguyen gravatar image

updated 2015-11-24 01:37:27 -0500

gvdhoorn gravatar image

Hi, I tried to run rosbridge after following instruction: and got below error. Please help me. I am running ROS on virtual machine with 64bit Indigo.

viki@c3po:~/Documents/ROS_Packages$ roslaunch rosbridge_server rosbridge_websocket.launch
... logging to /home/viki/.ros/log/46468e80-9263-11e5-9948-080027b46cdd/roslaunch-c3po-3640.log
Checking log directory for disk usage. This may take awhile.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.

started roslaunch server http://c3po:41824/


 * /rosbridge_websocket/address: 
 * /rosbridge_websocket/authenticate: False
 * /rosbridge_websocket/port: 9090
 * /rosdistro: indigo
 * /rosversion: 1.11.8

    rosapi (rosapi/rosapi_node)
    rosbridge_websocket (rosbridge_server/rosbridge_websocket)


core service [/rosout] found
process[rosbridge_websocket-1]: started with pid [3658]
process[rosapi-2]: started with pid [3659]
Traceback (most recent call last):
  File "/home/viki/Documents/ROS_Packages/src/rosbridge_suite/rosbridge_server/scripts/rosbridge_websocket", line 43, in <module>
    from rosbridge_server import RosbridgeWebSocket
  File "/home/viki/Documents/ROS_Packages/src/rosbridge_suite/rosbridge_server/src/rosbridge_server/", line 1, in <module>
    from websocket_handler import RosbridgeWebSocket
  File "/home/viki/Documents/ROS_Packages/src/rosbridge_suite/rosbridge_server/src/rosbridge_server/", line 42, in <module>
    from rosbridge_library.rosbridge_protocol import RosbridgeProtocol
  File "/home/viki/Documents/ROS_Packages/src/rosbridge_suite/rosbridge_library/src/rosbridge_library/", line 33, in <module>
    from rosbridge_library.protocol import Protocol
  File "/home/viki/Documents/ROS_Packages/src/rosbridge_suite/rosbridge_library/src/rosbridge_library/", line 35, in <module>
    import bson
ImportError: No module named bson
[rosbridge_websocket-1] process has died [pid 3658, exit code 1, cmd /home/viki/Documents/ROS_Packages/src/rosbridge_suite/rosbridge_server/scripts/rosbridge_websocket __name:=rosbridge_websocket __log:=/home/viki/.ros/log/46468e80-9263-11e5-9948-080027b46cdd/rosbridge_websocket-1.log].
log file: /home/viki/.ros/log/46468e80-9263-11e5-9948-080027b46cdd/rosbridge_websocket-1*.log

I have to press Ctrl-C to continue. I have just started leaning ROS.

Regards, Thang Nguyen

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2015-11-24 01:39:49 -0500

gvdhoorn gravatar image

updated 2015-11-24 01:44:03 -0500

Can you tell us why you installed rosbridge_suite from source (ie: git clone ..) instead of sudo apt-get install ros-$distro-rosbridge-suite? Do you want to use rosbridge or develop for it?

If you only want to use it, please throw away your source checkout and just sudo apt-get install ros-indigo-rosbridge-suite in a terminal. That should install everything for you.

    import bson
ImportError: No module named bson

This basically tells you that you didn't install all required dependencies before trying to use the package(s). In a source install, you are responsible for making sure you've checked the requirements. This is also not ROS specific, but basic Python.

Installation of pre-built binaries will take care of dependency resolution and setup.

edit flag offensive delete link more


And if you need the installation from source rosdep install will be your weapon of choice.

BennyRe gravatar image BennyRe  ( 2015-11-24 07:16:26 -0500 )edit

You can run rosdep install --from-paths src --ignore-src --rosdistro indigo -y from your catkin_workspace directory.

rtoris288 gravatar image rtoris288  ( 2015-11-24 11:06:29 -0500 )edit

Should I install rosdep first before use it? (follow link: ) I got error when try your command viki@c3po:~/Documents/ROS_Packages$ rosdep install --from-paths src --ignore-src --rosdistro indigo -y ERROR: the following packages/stacks could not have their rosdep keys resol

Thang Nguyen gravatar image Thang Nguyen  ( 2015-11-25 01:00:59 -0500 )edit

to system dependencies: rosbridge_library: Cannot locate rosdep definition for [python-bson]

Thang Nguyen gravatar image Thang Nguyen  ( 2015-11-25 01:01:08 -0500 )edit

I installed the suite and rosbridge work fine now. But to gain knowledge, I still want to know the answer for my question in above comment. Thank you very much for your help.

Thang Nguyen gravatar image Thang Nguyen  ( 2015-11-25 01:09:11 -0500 )edit

You could add the -r option to your rosdep call. This will continue after errors. Then do again catkin_make then again rosdep install. Try both commands till it works.

BennyRe gravatar image BennyRe  ( 2015-11-25 01:53:59 -0500 )edit

@BennyRe: no, that is not going to help here. @Thang Nguyen: please try a rosdep update and then try again. python-bson is definitely in the rosdep rules, so it should work.

gvdhoorn gravatar image gvdhoorn  ( 2015-11-25 02:12:55 -0500 )edit

Question Tools

1 follower


Asked: 2015-11-23 23:03:34 -0500

Seen: 4,988 times

Last updated: Nov 24 '15