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

Scripts cannot make reference to roscpp or rospy

asked 2017-10-20 03:41:59 -0500

lsrp1 gravatar image

Hello,

We are using ROS kinetic on a HP elitedesk 800 G2 mini (I7-6700T). Catkin doesn't work when we use any ROS functions in one of the scripts. For example for using the Joy package with a joystick it gives the following error (same error for every statement in the script):

CMakeFiles/joy_node.dir/src/joy_node.cpp.o: In function `main':
joy_node.cpp:(.text+0x70): undefined reference to `ros::init(int&, char**, std::string const&, unsigned int)'

When using the same scripts on other computers (with same ROS version) it works fine. What could be our problem? Can this be a Linux problem? We already tried to make a new workspace, reinstall ROS and adapting the CmakeList.txt according to some other questions asked on this forum.

Thanks in advance.

edit retag flag offensive close merge delete

Comments

This is a linker error, so I suspect you're not linking to the proper libraries.

Can you show us your CMakeLists.txt?

Also: what distribution is this? Are you building ROS from source?

gvdhoorn gravatar image gvdhoorn  ( 2017-10-20 03:55:59 -0500 )edit

re: rospy: I'm not sure I follow. That is a Python library, so there is no linking there (at least not in the way a compiled language does/need it). If you have errors specifically related to rospy, please add those as well.

At most you could get cannot import .. errors I would say.

gvdhoorn gravatar image gvdhoorn  ( 2017-10-20 04:01:19 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2017-10-20 06:15:50 -0500

lsrp1 gravatar image

hallo, the problem has been solved by re-reinstalling ubuntu to generic version. I had the low latancy version, which ddoesn't seem to work with ros.

edit flag offensive delete link more

Comments

I'm not saying it didn't work for you, but that seems a bit strange to me. With "low latency version", are you referring to the low-latency kernel? That doesn't change your userland, so it would seem strange to me that it would impact something like ROS.

It would be good if you could give ..

gvdhoorn gravatar image gvdhoorn  ( 2017-10-20 06:50:41 -0500 )edit

.. some more details about what version of Ubuntu you had/have installed, and what you did specifically. That would help future users coming across the same problem much better.

gvdhoorn gravatar image gvdhoorn  ( 2017-10-20 06:51:21 -0500 )edit

Question Tools

Stats

Asked: 2017-10-20 03:41:59 -0500

Seen: 96 times

Last updated: Oct 20 '17