0
$\begingroup$

Rosanswers logo

Long story short... I am trying to get ROS set up to work with my NXT

I've been following the NXT ROS tutorials, and everyhting was going merrily until it came time to create urdf files and visualize them.

Tutorial link:

http://www.ros.org/wiki/nxt_lxf2urdf/Tutorials/Creating%20a%20simple%20robot%20model%20using%20lxf2urdf.py

I managed to create what appears to be a valid urdf file, however, the tutorial says to run the following:

roslaunch learning_nxt robot.launch

after adding the following to the robot.launch file:

<param name="robot_description" textfile="$(find learning_nxt)/robot.urdf"/>

  <node name="robot_state_publisher" pkg="robot_state_publisher" type="state_publisher">
    <param name="publish_frequency" value="100.0"/>
  </node>

The robot.launch file works FINE without that added text. However, with the text in there, this happens:

started roslaunch server http://ubuntu:55334/

SUMMARY
========

PARAMETERS
 * /rosversion
 * /rosdistro
 * /robot_description
 * /robot_state_publisher/publish_frequency
 * /nxt_ros/nxt_robot

NODES
  /
    robot_state_publisher (robot_state_publisher/state_publisher)
    nxt_ros (nxt_ros/nxt_ros.py)
    joint_state_publisher (nxt_ros/joint_states_aggregator.py)

ROS_MASTER_URI=http://localhost:11311

core service [/rosout] found
process[robot_state_publisher-1]: started with pid [5731]
/opt/ros/electric/stacks/robot_model/robot_state_publisher/bin/state_publisher: error while loading shared libraries: libtinyxml.so.2.6.2: cannot open shared object file: No such file or directory
process[nxt_ros-2]: started with pid [5732]
[robot_state_publisher-1] process has died [pid 5731, exit code 127].
log files: /home/george/.ros/log/2c870166-fa26-11e0-abfd-000c29128eed/robot_state_publisher-1*.log

Mainly note the last few lines....

/opt/ros/electric/stacks/robot_model/robot_state_publisher/bin/state_publisher: error while loading shared libraries: libtinyxml.so.2.6.2: cannot open shared object file: No such file or directory

I am deeply confused as to why this is happening, and I can't seem to find any solution. Please, can anyone help? Thankyou :)

EDIT: Same error when excecuting

rosrun rviz rviz

Originally posted by Flynnn on ROS Answers with karma: 76 on 2011-10-18

Post score: 1

$\endgroup$

2 Answers 2

0
$\begingroup$

Rosanswers logo

Hi :) last night I was effed in the mind... Simply tiiirreed.

This morning, something occurred to me: Check out what a shared library even is!

Turns out, longsotry short, they are special kinds of libraries that programs automagically install. What is interesting about them is that different libraries can use older versions of the same library. How is this possible? Through their naming system!

libtinyxml.so.5.x.x is different than libtinyxml.so.6.x.x!

So, it occured to me, there were two possibilities! EITHER: I do not have libtinyxml installed, OR: ROS wants to use a version that I do not have installed, and ROS is refusing to install the correct version.

Turns out, it was the latter.

I went into my /usr/libs directory, and searched for libtinyxml. Guess what I found? libtinyxml.so.2.5.3

Notice that ROS wants to use libtinyxml.so.2.6.2

Now I have no idea why ROS is not attempting to update the tinyxml file, but I do believe that the answer to my issues are either:

To rename libtinyxml.so.2.5.3 to libtinyxml.so.2.6.2 OR Upgrade libtinyxml.so.2.5.3 to libtinyxml.so.2.6.2

I hope this helps anyone who comes across similar issues. If you are getting a "Shared library could not be loaded" issue, go to your usr/lib directory, and use the search function to search for the name of the library (Name being the part that comes BEFORE the .so.x.x.x part).

Some .so files should appear (If they do not, you do not have what ROS wants. Skip down to the bottom for help). Check these versions against the version the version that is being showed in the error (version is seen in the so.x.x.x part). If these versions do not match, you know you have a problem.

The solution to this problem varies:

If ROS wants an OLDER version of what you have, just duplicate the oldest version you own, and rename it to what your ROS wants. Libraries are commonly backwards compatible, and WILL support deprecated operations for a while, for this reason exactly.

If ROS wants a NEWER version, seek help on updating that version. I suggest going to the website that publishes the library you wish to upgrade, and then seeing if it has an install page. If it does not have a legible method of installation, attempt to get help on either an IRC, or help system like this one.

If yo don't have what ROS wants at all... Then just install what ros wants like you normally would, and then repeat the above steps if it still does not work.


Originally posted by Flynnn with karma: 76 on 2011-10-19

This answer was ACCEPTED on the original site

Post score: 5


Original comments

Comment by Flynnn on 2011-10-19:
It worked :) When I tried to update libtinyxml (sudo apt-get libtinyxml-dev) it did told me I was up to date (hmm..) So I instead cd'ed to my /usr/lib, and then ran the command: sudo cp libtinyxml.so.2.5.3 libtinuxml.so.2.6.2 (to copy and rename the library) It worked like a charm! :D

$\endgroup$
0
$\begingroup$

Rosanswers logo

I had the same issue, and I've created a symbolic link which seems to be a more proper way to overcome this problem since copying with a different version name can be misleading later on.

ln -s </path/to/file> <soft_link>

Cheers


Originally posted by Kadir Firat Uyanik with karma: 288 on 2011-11-08

This answer was NOT ACCEPTED on the original site

Post score: 1


Original comments

Comment by 130s on 2011-12-17:
Agreed that symbolic linking is more proper in this case, and this worked out for my environment.

$\endgroup$

Your Answer

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