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

Unable to run rviz in ubuntu 20.04.02 noetic due to error in accessing library

asked 2021-03-10 04:03:39 -0500

niranjan gravatar image

updated 2021-03-10 06:02:41 -0500

I'm working on a project with kuka. After the moveit setup configeration of my kuka model i'm not able to launch rviz through demo.launch file generated. I checked if there is a problem with rviz but it runs properly (separately as default rviz) when i launch it. (Running roscore in background).

rosrun rviz rviz

This is the error message i get when i run rviz from demo.launch

/opt/ros/noetic/lib/rviz/rviz: symbol lookup error: /opt/ros/noetic/lib/libmoveit_dynamics_solver.so.1.1.0: undefined symbol: _ZNK3KDL6Vector4NormEv
[rviz_rbcserver101_422390_1667505097478654005-5] process has died [pid 422427, exit code 127, cmd /opt/ros/noetic/lib/rviz/rviz -d /home/rbc-server-101/catkin_ws/src/moveit_config/launch/moveit.rviz __name:=rviz_rbcserver101_422390_1667505097478654005 __log:=/home/rbc-server-101/.ros/log/f3ddbbc0-817f-11eb-ae26-73f9a6c10b53/rviz_rbcserver101_422390_1667505097478654005-5.log].

Assuming that rviz is not able to find the library file i added the path to lib in .bashrc file at the end export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/ros/noetic/lib

This didn't change anything. I would appreciate if anybody would give hints and help to understand how to go about debugging this error. I also wanted to know if this error is related to linkers?

(Note- Roslaunch rviz rviz gives an error) RLException: Invalid roslaunch XML syntax: not well-formed (invalid token): line 1, column 0 The traceback for the exception was written to the log file

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2021-03-10 04:26:24 -0500

Ranjit Kathiriya gravatar image

Hello Niranjan,

Instead of this try this command:

roslaunch rviz rviz

rosrun rviz rviz

Note: try to run roscore before running rosrun command.

edit flag offensive delete link more

Comments

Thank you, this launches rviz but it doesn't allow me to add the model in it.

niranjan gravatar image niranjan  ( 2021-03-10 06:03:48 -0500 )edit

it doesn't allow me to add the model in it.

Can you describe the steps followed by you to add the robot model into the rviz?

You are using move it packages or loading model using xacro file to view into rviz?

Ranjit Kathiriya gravatar image Ranjit Kathiriya  ( 2021-03-10 06:32:22 -0500 )edit

I'm able to launch rviz and load robot model from xacro file directly. When i use moveit to launch rviz model i get the above error: /opt/ros/noetic/lib/rviz/rviz: symbol lookup error: /opt/ros/noetic/lib/libmoveit_dynamics_solver.so.1.1.0: undefined symbol: _ZNK3KDL6Vector4NormEv

Steps followed to setup move it configuration is same as that should in this link http://docs.ros.org/en/kinetic/api/mo... but im using kuka urdf file for this.

niranjan gravatar image niranjan  ( 2021-03-10 08:14:29 -0500 )edit

I think you are using the wrong tutorials. 1. Try to use Ros noetic tutorials for moveit. 2. Use Xacro file instead of urdf file.

And if you want to directly launch your xacro model then follow the below step.

Ranjit Kathiriya gravatar image Ranjit Kathiriya  ( 2021-03-10 10:18:53 -0500 )edit

Follow this steps:

<launch>

          <arg name="model" default="$(find kuka_kr16_support)/urdf/__CHANGE__XACRO__FILE_NAME__"/> 
          <arg name="gui" default="true" />
          <arg name="rvizconfig" default="$(find urdf_tutorial)/rviz/urdf.rviz" />

          <param name="robot_description" command="$(find xacro)/xacro $(arg model)" />

          <node if="$(arg gui)" name="joint_state_publisher" pkg="joint_state_publisher_gui" type="joint_state_publisher_gui" />
          <node unless="$(arg gui)" name="joint_state_publisher" pkg="joint_state_publisher" type="joint_state_publisher" />
          <node name="robot_state_publisher" pkg="robot_state_publisher" type="robot_state_publisher" />
          <node name="rviz" pkg="rviz" type="rviz" args="-d $(arg rvizconfig)" required="true" />

        </launch>

Make a launch file in which robot you want to launch and change xacro file and try to launch this file.

Ranjit Kathiriya gravatar image Ranjit Kathiriya  ( 2021-03-10 10:20:22 -0500 )edit

For more details about this try to have urdf basic tutorials given in below link.

Ranjit Kathiriya gravatar image Ranjit Kathiriya  ( 2021-03-10 10:25:17 -0500 )edit

Thank you for your reply. This doesn't work and i end up with a similar error. I think i found out the culprit that is causing this error. I installed moveit from binaries which is why proper linking to the the particular .so file was not taking place. I then installed moveit package by source and now when i build it i get this below warning:

Warnings
CMake Warning at /home/rbc-server-101/ws_moveit/src/industrial_core/industrial_trajectory_filters/CMakeLists.txt:20 (add_library): Cannot generate a safe runtime search path for target industrial_trajectory_filters because files in some directories may conflict with libraries in implicit directories:

runtime library [liborocos-kdl.so.1.4] in /usr/lib may be hidden by files in:
  /home/rbc-server-101/ws_moveit/devel/lib

Some of these libraries may not be found correctly.

This .so file is present in devel folder as well as usr/lib. This could be causing an ...(more)

niranjan gravatar image niranjan  ( 2021-03-11 23:34:00 -0500 )edit

Hello @niranjan,

I think you should raise the new question with the move-it tag.

Ranjit Kathiriya gravatar image Ranjit Kathiriya  ( 2021-03-12 03:35:02 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2021-03-10 04:03:39 -0500

Seen: 1,225 times

Last updated: Mar 10 '21