Ask Your Question
1

error when run rosbridge

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

Thang Nguyen gravatar image

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

gvdhoorn gravatar image

Hi, I tried to run rosbridge after following instruction: http://wiki.ros.org/rosbridge_suite/T... 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/

SUMMARY
========

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

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

ROS_MASTER_URI=http://localhost:11311

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/__init__.py", line 1, in <module>
    from websocket_handler import RosbridgeWebSocket
  File "/home/viki/Documents/ROS_Packages/src/rosbridge_suite/rosbridge_server/src/rosbridge_server/websocket_handler.py", 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/rosbridge_protocol.py", line 33, in <module>
    from rosbridge_library.protocol import Protocol
  File "/home/viki/Documents/ROS_Packages/src/rosbridge_suite/rosbridge_library/src/rosbridge_library/protocol.py", 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
2

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

gvdhoorn gravatar image

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

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

Comments

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

BennyRe gravatar imageBennyRe ( 2015-11-24 07:16:26 -0600 )edit

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

rtoris288 gravatar imagertoris288 ( 2015-11-24 11:06:29 -0600 )edit

Should I install rosdep first before use it? (follow link: http://wiki.ros.org/rosdep ) 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 imageThang Nguyen ( 2015-11-25 01:00:59 -0600 )edit

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

Thang Nguyen gravatar imageThang Nguyen ( 2015-11-25 01:01:08 -0600 )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 imageThang Nguyen ( 2015-11-25 01:09:11 -0600 )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 imageBennyRe ( 2015-11-25 01:53:59 -0600 )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 imagegvdhoorn ( 2015-11-25 02:12:55 -0600 )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: 2015-11-23 23:03:34 -0600

Seen: 2,395 times

Last updated: Nov 24 '15