0
$\begingroup$

Rosanswers logo

Hello, I'm trying to start the rosbridge_tcp.launch - file. But I always get to following error-messages. All other nodes in my workspace run successful. So the rosbridge_server is the only one that doesn't work. I'm using the packages lms1xx and other packages for a stereocamera too and they work fine. I installed ROS kinetic for Ubuntu 16.04 like described in ros-wiki installation.

previous procedure:

  • installing Ubuntu 16.04 on pc
  • installing ROS kinetic like described in ros-wiki
  • also installing CUDA 9.1 Toolkit and ZED SDK
  • set up ros catkin_ws-workspace like described in the ros-wiki
  • copy the packages from the previus pc to the workspace of the new pc (rosbridge_suite, lms1xx, zed_wrapper, and other self implemented packages)
  • added the lines described futher down to the .bashrc-file
  • catkin_make of workspace
  • sudo apt-get install ..... for all packages in the workspace
  • rosdep install .... for all packages

-> I thought, that I did everything like it was on the previous pc

roslaunch rosbridge_server rosbridge_tcp.launch

 SUMMARY
========

PARAMETERS
 * /rosapi/params_glob: [*]
 *
 /rosapi/services_glob: [*]
 * /rosapi/topics_glob: [*]
 * /rosbridge_tcp/authenticate: False
 * /rosbridge_tcp/bson_only_mode: False
 * /rosbridge_tcp/delay_between_messages: 0
 * /rosbridge_tcp/fragment_timeout: 600
 * /rosbridge_tcp/host: 
 * /rosbridge_tcp/incoming_buffer: 65536
 * /rosbridge_tcp/max_message_size: None
 * /rosbridge_tcp/params_glob: [*]
 * /rosbridge_tcp/port: 9090
 * /rosbridge_tcp/retry_startup_delay: 5
 * /rosbridge_tcp/services_glob: [*]
 * /rosbridge_tcp/socket_timeout: 10
 * /rosbridge_tcp/timestamp_delay: 0.0
 * /rosbridge_tcp/topics_glob: [*]
 * /rosdistro: kinetic
 * /rosversion: 1.12.12

NODES
  /
    rosapi (rosapi/rosapi_node)
    rosbridge_tcp (rosbridge_server/rosbridge_tcp)

auto-starting new master
process[master]: started with pid [20473]
ROS_MASTER_URI=http://localhost:11311

setting /run_id to d724bef2-0c0c-11e8-9136-00012e8036c4
process[rosout-1]: started with pid [20488]
started core service [/rosout]
ERROR: cannot launch node of type [rosbridge_server/rosbridge_tcp]: can't locate node [rosbridge_tcp] in package [rosbridge_server]
ERROR: cannot launch node of type [rosapi/rosapi_node]: can't locate node [rosapi_node] in package [rosapi]

I cloned the package from github and only added parameters for a timedelay, nothing else. Any ideas why it does not work and what I can do?

output of env | grep -i ros | sort :

serva-eve@servaeve-ZBOX-EN1080-1080K:~$ env | grep -i ros | sort
CMAKE_PREFIX_PATH=/home/serva-eve/catkin_ws/devel:/opt/ros/kinetic
LD_LIBRARY_PATH=/home/serva-eve/catkin_ws/devel/lib:/opt/ros/kinetic/lib
PATH=/opt/ros/kinetic/bin:/home/serva-eve/bin:/home/serva-eve/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
PKG_CONFIG_PATH=/home/serva-eve/catkin_ws/devel/lib/pkgconfig:/opt/ros/kinetic/lib/pkgconfig
PYTHONPATH=/home/serva-eve/catkin_ws/devel/lib/python2.7/dist-packages:/opt/ros/kinetic/lib/python2.7/dist-packages
ROS_DISTRO=kinetic
ROS_ETC_DIR=/opt/ros/kinetic/etc/ros
ROSLISP_PACKAGE_DIRECTORIES=/home/serva-eve/catkin_ws/devel/share/common-lisp
ROS_MASTER_URI=http://localhost:11311
ROS_PACKAGE_PATH=/home/serva-eve/catkin_ws/src:/opt/ros/kinetic/share
ROS_ROOT=/opt/ros/kinetic/share/ros

ouput of ls -al /home/serva-eve/catkin_ws/src/rosbridge_suite/rosbridge_server/scripts

serva-eve@servaeve-ZBOX-EN1080-1080K:~/catkin_ws/src$ ls -al /home/serva-eve/catkin_ws/src/rosbridge_suite/rosbridge_server/scripts
total 40
drwxr-xr-x 2 serva-eve serva-eve  4096 Feb  7 12:00 .
drwxr-xr-x 5 serva-eve serva-eve  4096 Aug 22 13:13 ..
lrwxrwxrwx 1 serva-eve serva-eve    16 Feb  7 12:00 rosbridge_tcp -> rosbridge_tcp.py
-rw-r--r-- 1 serva-eve serva-eve 10119 Jul 25  2017 rosbridge_tcp.py
lrwxrwxrwx 1 serva-eve serva-eve    16 Feb  7 12:00 rosbridge_udp -> rosbridge_udp.py
-rw-r--r-- 1 serva-eve serva-eve  8177 Jul 25  2017 rosbridge_udp.py
lrwxrwxrwx 1 serva-eve serva-eve    22 Feb  7 12:00 rosbridge_websocket -> rosbridge_websocket.py
-rw-r--r-- 1 serva-eve serva-eve  9597 Jul 25  2017 rosbridge_websocket.py

I checked the output for this command on the previous pc. for the links to phyton files i've got there lrwxrwrxrwx and for the python skripts -rwxrwxr-x Could that be the problem?


Originally posted by DBServ on ROS Answers with karma: 3 on 2018-02-07

Post score: 0


Original comments

Comment by gvdhoorn on 2018-02-07:
can you clarify how this is related to #q281917?

Comment by DBServ on 2018-02-07:
it's the same project and I closed #q281917 right now. I added the paths to my .bashrc-file. So like explained the other nodes can be launched, except the ones mentioned above.

Comment by gvdhoorn on 2018-02-07:\

I added the paths to my .bashrc-file

which paths?

Comment by DBServ on 2018-02-08:
source /opt/ros/kinetic/setup.bash and source ~/catkin_ws/devel/setup.bash

Comment by gvdhoorn on 2018-02-08:
Please always edit your original question with that sort of info, comments aren't really suited for it.

As to your problem: how did you install ROS, which OS is this, how did you install the pkgs that you are using (specifically rosbridge_suite), how do you build your workspace (exact steps).

Comment by gvdhoorn on 2018-02-08:
Also: what is the output of env | grep -i ros | sort?

Comment by DBServ on 2018-02-08:
I opened a new question because the problem was different to the other ones. I was using a rosbridge_suite package (like the other packages) on a previous pc. I copied the packages to the new pc and installed them using sudo apt-get install .... . I added the System-specifications and the output

Comment by gvdhoorn on 2018-02-08:\

I copied the packages to the new pc

which pkgs?

and installed them using sudo apt-get install

what did you install specifically? 'copying pkgs' and 'installed them using apt-get' only makes sense if what you copied were .deb files (which are typically downloaded, not copied).

Comment by gvdhoorn on 2018-02-08:
Also: how do you build your workspace? That is really important here as your problem either has to with:

  1. files / binaries that are really not there
  2. search paths that are not getting set correctly

Please include all steps (files you source, commands you run, in which order, etc).

Comment by DBServ on 2018-02-08:
see now above ;-)

Comment by gvdhoorn on 2018-02-08:
For me, rosbridge_tcp can be found in /opt/ros/kinetic/lib/rosbridge_server when installed using apt. If you have it in your workspace, it should be in catkin_ws/src/rosbridge_suite/rosbridge_server/scripts.

Comment by gvdhoorn on 2018-02-08:\

sudo apt-get install ..... for all packages in the workspace

Can you clarify why you do this?

Comment by gvdhoorn on 2018-02-08:\

copy the packages from the previus pc to the workspace of the new pc

how did you copy the packages? Did you use a usb stick? SSH, rsync, something else?

What is the output of ls -al /home/serva-eve/catkin_ws/src/rosbridge_suite/rosbridge_server/scripts?

Comment by gvdhoorn on 2018-02-08:
Btw: it's ok to use comments to interact with other posters. But copy-pasting console output into comments is not really convenient, so those typically are added to the original question as an edit.

Prefixing new info with Edit (1, 2, 3, etc) is also customary, so the chronology is clear.

Comment by DBServ on 2018-02-08:
I added the output. The rights of the files are different that they're on the previous pc. Could that be the problem? How can I change them? I did the sudo apt-get install... process because i thought that i have to do that.

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

The rights of the [copied] files are different that they're on the previous pc. Could that be the problem?

yes, the missing permissions are most likely the problem.

You still haven't answered how you copied 'the packages'.

I did the sudo apt-get install... process because i thought that i have to do that.

no, that is not needed (but it should also not matter, as the pkgs in your workspace will/should take precedence over the ones installed in /opt/ros/$distro).

See #q252478 for the process that is typically used for building packages from sources. Note that instead of using git clone .., you copied the packages, but the idea is the same.


Edit:

sry. yes i copied them via usb stick. and i added the python link-files by hand, because they could not be copied by usb stick

If you still have the packages on your 'other pc', I would recommend creating a tarbal of your source space, copying the archive and then extract it on the other machine. That way, permissions should be retained.


Edit 2: final comment: you might also want to look into using a version control system, as besides keeping track of changes for you (which is really convenient when developing software), some of the hosted infrastructures (such as Github, BitBucket, etc) also solve the problem of how to make your source files accessible on other machines.


Originally posted by gvdhoorn with karma: 86574 on 2018-02-08

This answer was ACCEPTED on the original site

Post score: 0


Original comments

Comment by DBServ on 2018-02-08:
sry. yes i copied them via usb stick. and i added the python link-files by hand, because they could not be copied by usb stick

Comment by gvdhoorn on 2018-02-08:
In general I would recommend not to do a cp -R .. /path/to/usb/stick when copying files on a Linux machine, unless:

  1. the usb stick is formatted using a Linux FS (ie: ext3, ext4 or something else)
  2. you're copying simple files (ie: text documents or music)

In other cases creating an ..

Comment by gvdhoorn on 2018-02-08:
.. archive (.tar.gz, .tar.bz2, .tar.xz) is probably the easiest and most failsafe way to copy files with permissions.

Alternatives could be: rsync, scp or bare SSH. But those are slighty more complicated.

Comment by DBServ on 2018-02-08:
I will try this!

Comment by DBServ on 2018-02-08:
I made on the privious pc an archiv with tar. Then I followed the descriptions on your link.

Now I can launch the rosbridge! THANK YOU SOOO MUCH!

The rights of the Phytonskript-Linkfiles were the problem!

Comment by gvdhoorn on 2018-02-08:
Good to hear you got things to work.

In addition to my other comments: you might want to pick up a book or follow a tutorial or two about general use of Linux and the command line.

That will probably allow you to avoid these kind of situations in the future.

Comment by DBServ on 2018-02-08:
Yes maybe I should do that. ;-)

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.