Ask Your Question
0

Trouble making rviz plugin

asked 2016-11-08 12:01:38 -0500

jacksonkr_ gravatar image

I'm learning how to make a simple rviz plugin and I'm running into some trouble. The errors sound like maybe some includes are missing but I'm not sure. What is the next logical troubleshooting step after this?

 $ make_catkin
make_catkin: command not found
jackson@jackson-VirtualBox:~/catkin_ws$ catkin_make
Base path: /home/jackson/catkin_ws
Source space: /home/jackson/catkin_ws/src
Build space: /home/jackson/catkin_ws/build
Devel space: /home/jackson/catkin_ws/devel
Install space: /home/jackson/catkin_ws/install
####
#### Running command: "make cmake_check_build_system" in "/home/jackson/catkin_ws/build"
####
####
#### Running command: "make -j2 -l2" in "/home/jackson/catkin_ws/build"
####
[ 50%] [100%] Built target polygon_plugins
Building CXX object pluginlib_tutorials_/CMakeFiles/polygon_loader.dir/src/polygon_loader.cpp.o
/home/jackson/catkin_ws/src/pluginlib_tutorials_/src/polygon_loader.cpp: In function ‘int main(int, char**)’:
/home/jackson/catkin_ws/src/pluginlib_tutorials_/src/polygon_loader.cpp:6:26: error: ‘polygon_base’ was not declared in this scope
   pluginlib::ClassLoader<polygon_base::RegularPolygon> poly_loader("pluginlib_tutorials_", "polygon_base::RegularPolygon");
                          ^
/home/jackson/catkin_ws/src/pluginlib_tutorials_/src/polygon_loader.cpp:6:54: error: template argument 1 is invalid
   pluginlib::ClassLoader<polygon_base::RegularPolygon> poly_loader("pluginlib_tutorials_", "polygon_base::RegularPolygon");
                                                      ^
/home/jackson/catkin_ws/src/pluginlib_tutorials_/src/polygon_loader.cpp:6:67: error: invalid type in declaration before ‘(’ token
   pluginlib::ClassLoader<polygon_base::RegularPolygon> poly_loader("pluginlib_tutorials_", "polygon_base::RegularPolygon");
                                                                   ^
/home/jackson/catkin_ws/src/pluginlib_tutorials_/src/polygon_loader.cpp:6:122: error: expression list treated as compound expression in initializer [-fpermissive]
   pluginlib::ClassLoader<polygon_base::RegularPolygon> poly_loader("pluginlib_tutorials_", "polygon_base::RegularPolygon");
                                                                                                                          ^
/home/jackson/catkin_ws/src/pluginlib_tutorials_/src/polygon_loader.cpp:6:122: error: invalid conversion from ‘const char*’ to ‘int’ [-fpermissive]
/home/jackson/catkin_ws/src/pluginlib_tutorials_/src/polygon_loader.cpp:10:51: error: type/value mismatch at argument 1 in template parameter list for ‘template<class T> class boost::shared_ptr’
     boost::shared_ptr<polygon_base::RegularPolygon> triangle = poly_loader.createInstance("polygon_plugins::Triangle");
                                                   ^
/home/jackson/catkin_ws/src/pluginlib_tutorials_/src/polygon_loader.cpp:10:51: error:   expected a type, got ‘polygon_base’
/home/jackson/catkin_ws/src/pluginlib_tutorials_/src/polygon_loader.cpp:10:62: error: invalid type in declaration before ‘=’ token
     boost::shared_ptr<polygon_base::RegularPolygon> triangle = poly_loader.createInstance("polygon_plugins::Triangle");
                                                              ^
/home/jackson/catkin_ws/src/pluginlib_tutorials_/src/polygon_loader.cpp:10:76: error: request for member ‘createInstance’ in ‘poly_loader’, which is of non-class type ‘int’
     boost::shared_ptr<polygon_base::RegularPolygon> triangle = poly_loader.createInstance("polygon_plugins::Triangle");
                                                                            ^
/home/jackson/catkin_ws/src/pluginlib_tutorials_/src/polygon_loader.cpp:11:13: error: base operand of ‘->’ is not a pointer
     triangle->initialize(10.0);
             ^
/home/jackson/catkin_ws/src/pluginlib_tutorials_/src/polygon_loader.cpp:13:51: error: type/value mismatch at argument 1 in template parameter list for ‘template<class T> class boost::shared_ptr’
     boost::shared_ptr<polygon_base::RegularPolygon> square = poly_loader.createInstance("polygon_plugins::Square");
                                                   ^
/home/jackson/catkin_ws/src/pluginlib_tutorials_/src/polygon_loader.cpp:13:51: error:   expected a type, got ‘polygon_base’
/home/jackson/catkin_ws/src/pluginlib_tutorials_/src/polygon_loader.cpp:13:60: error: invalid type in declaration before ‘=’ token
     boost::shared_ptr<polygon_base::RegularPolygon> square = poly_loader.createInstance("polygon_plugins::Square");
                                                            ^
/home/jackson/catkin_ws/src/pluginlib_tutorials_/src/polygon_loader.cpp:13:74: error: request for member ‘createInstance’ in ‘poly_loader’, which is of non-class type ‘int’
     boost::shared_ptr<polygon_base::RegularPolygon> square = poly_loader.createInstance("polygon_plugins::Square");
                                                                          ^
/home/jackson/catkin_ws/src/pluginlib_tutorials_/src/polygon_loader ...
(more)
edit retag flag offensive close merge delete

Comments

1

If you don't include your package.xml and your CMakeLists.txt (please without all the comments), it's going to be difficult to help you.

gvdhoorn gravatar image gvdhoorn  ( 2016-11-08 12:14:45 -0500 )edit

Great point @gvdhoorn. Fortunately I found my error because I was able to respond to this. I'm willing to bet you would have quickly noticed what I eventually found.

jacksonkr_ gravatar image jacksonkr_  ( 2016-11-08 13:49:49 -0500 )edit

1 Answer

Sort by » oldest newest most voted
0

answered 2016-11-08 13:48:29 -0500

jacksonkr_ gravatar image

I needed to add include_directories(include) to my CMakeLists.txt

Also, I found that in the CMakeLists.txt already with some notes about it. What I needed to do was uncommented it and then catkin_make ran 100%.

As far as I can tell, they forgot to mention this step in the tutorial.

edit flag offensive delete link more

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: 2016-11-08 12:01:38 -0500

Seen: 109 times

Last updated: Nov 08 '16