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

Error while compiling rviz

asked 2014-02-26 17:56:12 -0500

zero1985 gravatar image

updated 2014-02-26 17:58:23 -0500

Andrew.A gravatar image

Previously I was using rviz from sudo apt-get install ros-groovy-rviz and it encounters some error when I trying to view laser data. So I decided to git clone it and compile the version 1.9.35 of rviz. However, when I catkin_make the rviz it shows me the error below

Linking CXX executable /home/viki/catkin_ws/devel/lib/rviz/rviz
[ 92%] Built target default_plugin
Linking CXX executable /home/viki/catkin_ws/devel/lib/rviz/image_view
/home/viki/catkin_ws/devel/lib/librviz.so: undefined reference to `image_transport::ImageTransport::~ImageTransport()'
/home/viki/catkin_ws/devel/lib/librviz.so: undefined reference to `image_transport::ImageTransport::ImageTransport(ros::NodeHandle const&)'
/home/viki/catkin_ws/devel/lib/librviz.so: undefined reference to `image_transport::ImageTransport::subscribe(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, unsigned int, boost::function<void (boost::shared_ptr<sensor_msgs::Image_<std::allocator<void> > const> const&)> const&, boost::shared_ptr<void> const&, image_transport::TransportHints const&)'
/home/viki/catkin_ws/devel/lib/librviz.so: undefined reference to `image_transport::Subscriber::shutdown()'
collect2: ld returned 1 exit status
make[2]: *** [/home/viki/catkin_ws/devel/lib/rviz/rviz] Error 1
make[1]: *** [rviz/src/rviz/CMakeFiles/executable.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
CMakeFiles/rviz_image_view.dir/image_view.cpp.o: In function `ImageView':
/home/viki/catkin_ws/src/rviz/src/image_view/image_view.cpp:56: undefined reference to `image_transport::ImageTransport::ImageTransport(ros::NodeHandle const&)'
/home/viki/catkin_ws/src/rviz/src/image_view/image_view.cpp:56: undefined reference to `image_transport::ImageTransport::~ImageTransport()'
CMakeFiles/rviz_image_view.dir/image_view.cpp.o: In function `~ImageView':
/home/viki/catkin_ws/src/rviz/src/image_view/image_view.cpp:62: undefined reference to `image_transport::ImageTransport::~ImageTransport()'
/home/viki/catkin_ws/src/rviz/src/image_view/image_view.cpp:62: undefined reference to `image_transport::ImageTransport::~ImageTransport()'
CMakeFiles/rviz_image_view.dir/image_view.cpp.o: In function `image_transport::SubscriberFilter::subscribe(image_transport::ImageTransport&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, unsigned int, image_transport::TransportHints const&)':
/opt/ros/groovy/include/image_transport/subscriber_filter.h:111: undefined reference to `image_transport::ImageTransport::subscribe(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, unsigned int, boost::function<void (boost::shared_ptr<sensor_msgs::Image_<std::allocator<void> > const> const&)> const&, boost::shared_ptr<void> const&, image_transport::TransportHints const&)'
CMakeFiles/rviz_image_view.dir/image_view.cpp.o: In function `image_transport::SubscriberFilter::unsubscribe()':
/opt/ros/groovy/include/image_transport/subscriber_filter.h:119: undefined reference to `image_transport::Subscriber::shutdown()'
collect2: ld returned 1 exit status
make[2]: *** [/home/viki/catkin_ws/devel/lib/rviz/image_view] Error 1
make[1]: *** [rviz/src/image_view/CMakeFiles/rviz_image_view.dir/all] Error 2
make: *** [all] Error 2
Invoking "make" failed

At first I thought it was something to do with the image_transport package and so after I do source /opt/ros/groovy/setup.bash , I can rosrun image_transport but the error still remain the same. Do anyone know how to solve it? Thank you.

edit retag flag offensive close merge delete

2 Answers

Sort by » oldest newest most voted
2

answered 2014-02-27 18:34:07 -0500

Andrew.A gravatar image

updated 2014-02-27 18:36:48 -0500

You can get the source code from git and check out branch 1.9.35. It's a patch to resolve this issue. Read more here.

cd ~/catkin_ws/src
git clone https://github.com/ros-visualization/rviz.git
cd rviz
git checkout 1.9.35
cd ../..
catkin_make

EDIT: If this doesn't work, it's likely that something went wrong with your ROS installation. You might want to try to reinstall ROS!

edit flag offensive delete link more
0

answered 2014-02-26 19:33:16 -0500

Note: I know the below isn´t a direct answer to your question, rather a workaround for your problem (rviz not working on groovy).

What you can do instead of compiling from source is just using the hydro rviz version. If you have space and bandwidth to spare, this should be faster and easier to make work than compiling yourself. To do so, perform the following steps:

Install rviz for hydro:

sudo apt-get install ros-hydro-rviz

In the terminal that you will use to start rviz, source hydro´s setup.bash:

source /opt/ros/hydro/setup.bash

Start rviz:

rosrun rviz rviz
edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2014-02-26 17:56:12 -0500

Seen: 930 times

Last updated: Feb 27 '14