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

Teleop_twist_joy problem

asked 2017-06-23 19:31:02 -0600

renanmb gravatar image

updated 2017-06-24 10:58:06 -0600

I just made the git clone from their repository https://github.com/ros-teleop/teleop_... and modified to test it with the turtle sim and ROS throw me back the following message:

cant locate node [teleop_node] in package [teleop_twist_joy]

My code is at: https://github.com/renanmb/teleop_test

The only changes were the topic name and the launch file that I added the turtle sim node.

Since this was a git clone I was not expecting ROS to throw especially this error message.

on GIthub catkin_make.txt is what catkin_make shows on terminal.

edit retag flag offensive close merge delete

Comments

Since this was a git clone I was not expecting ROS to throw especially this error message.

And this is slightly pedantic, but when asking questions I feel it's important to be accurate: 'ROS' isn't throwing any error, it's either roslaunch or rosrun which give you this error.

gvdhoorn gravatar image gvdhoorn  ( 2017-06-24 03:50:10 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2017-06-24 03:48:39 -0600

gvdhoorn gravatar image

updated 2017-06-24 11:40:36 -0600

Please add the full output of catkin_make (or catkin build) after building your workspace from scratch to your question. Use the edit button for that.

Similar to your other question, make sure that the node actually gets built and that you source the devel/setup.bash when needed.

You typically get these errors if:

  1. there really is no binary with the name teleop_twist_joy under devel|install/lib/$pkg_name
  2. the (search) path is not setup correctly
  3. the package cache is stale / not up-to-date

Compilers/linkers failing (or mistakes in build scripts) can cause 1, nr 2 is often forgetting to source devel/setup.bash. Nr 3 is unfortunately not something that can really be helped (there is no easy way to detect it automatically), but can be remedied by executing rospack profile (after having made sure that you have sourced the correct setup.bash).


Edit:

It Worked. Thanks So every time I basically run into these errors I can solve by finding Compilers/linkers failing (or mistakes in build scripts), or because forgetting of source devel/setup.bash , or out-of-date rospkg cache ???

Making sure that your code compiles is a standard thing to make sure, I would say. Nothing ROS specific. If the compiler or linker don't run successfully, you don't get a binary.

If you're sure that is not the case, and your CMakeLists.txt is correct (which is also important, as you found out in #q264506), then a stale pkg cache is indeed often the cause.

edit flag offensive delete link more

Comments

I added what catkin_make shows me in the terminal at the github

This is the explanation that was lacking on the Wiki, how to find and fix the problems. There is a binary under devel|install/lib/$pkg_name called teleop_node. So if I did source devel/setup.bash how do I setup correctly the path?

renanmb gravatar image renanmb  ( 2017-06-24 10:57:07 -0600 )edit

Can you please be a little more specific? I'm having a hard time understanding what you are trying to say.

What was 'lacking on the wiki'? catkin == basically CMake, and I guess some familiarity with that is assumed.

If the binary is there, and you have sourced, try rospack profile.

gvdhoorn gravatar image gvdhoorn  ( 2017-06-24 11:01:41 -0600 )edit

rospack profile had show me the directories without manifest.

renanmb gravatar image renanmb  ( 2017-06-24 11:02:10 -0600 )edit

rospack profile updates the package cache. Yes, it outputs some other lines, but you can ignore those.

gvdhoorn gravatar image gvdhoorn  ( 2017-06-24 11:03:01 -0600 )edit

It Worked. Thanks So every time I basically run into these errors I can solve by finding Compilers/linkers failing (or mistakes in build scripts), or because forgetting of source devel/setup.bash , or out-of-date rospkg cache ???

renanmb gravatar image renanmb  ( 2017-06-24 11:07:45 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2017-06-23 19:31:02 -0600

Seen: 1,352 times

Last updated: Jun 24 '17