Ask Your Question
0

Error: ‘tf’ has not been declared

asked 2018-08-22 14:49:24 -0600

bkmen97 gravatar image

I'm following the MoveIt Tutorials.
I'm try to catkin_make, but have a issue with package "moveit_tutorials" .

    /home/bkmen/catkin_ws/src/moveit_tutorials/doc/pick_place/src/pick_place_tutorial.cpp: In function ‘void pick(moveit::planning_interface::MoveGroupInterface&)’:
/home/bkmen/catkin_ws/src/moveit_tutorials/doc/pick_place/src/pick_place_tutorial.cpp:94:43:             error: ‘tf’ has not been declared
   grasps[0].grasp_pose.pose.orientation = tf::createQuaternionMsgFromRollPitchYaw(-M_PI / 2, -M_PI / 4, -M_PI / 2);
                                           ^~
/home/bkmen/catkin_ws/src/moveit_tutorials/doc/pick_place/src/pick_place_tutorial.cpp: In function ‘void place(moveit::planning_interface::MoveGroupInterface&)’:
/home/bkmen/catkin_ws/src/moveit_tutorials/doc/pick_place/src/pick_place_tutorial.cpp:149:51:             error: ‘tf’ has not been declared
   place_location[0].place_pose.pose.orientation = tf::createQuaternionMsgFromRollPitchYaw(0, 0, M_PI / 2);
                                                   ^~
moveit_tutorials/doc/pick_place/CMakeFiles/pick_place_tutorial.dir/build.make:62: recipe for target 'moveit_tutorials/doc/pick_place/CMakeFiles/pick_place_tutorial.dir/src/pick_place_tutorial.cpp.o' failed
make[2]: *** [moveit_tutorials/doc/pick_place/CMakeFiles/pick_place_tutorial.dir/src/pick_place_tutorial.cpp.o] Error 1
CMakeFiles/Makefile2:29312: recipe for target 'moveit_tutorials/doc/pick_place/CMakeFiles/pick_place_tutorial.dir/all' failed
make[1]: *** [moveit_tutorials/doc/pick_place/CMakeFiles/pick_place_tutorial.dir/all] Error 2
Makefile:140: recipe for target 'all' failed
make: *** [all] Error 2
Invoking "make -j4 -l4" failed
edit retag flag offensive close merge delete

Comments

2

Please post your source code as well. It's likely that you've forgotten to include the necessary headers for tf.

Geoff gravatar imageGeoff ( 2018-08-22 16:35:06 -0600 )edit

Also, can you please update your question with a link to the tutorial that you're referring to

jayess gravatar imagejayess ( 2018-08-22 19:22:16 -0600 )edit

Is there a reason you are using catkin_make instead of catkin build? The tutorials specifically tell you to use catkin build

mlautman gravatar imagemlautman ( 2018-08-29 19:57:05 -0600 )edit
1

@mlautman: your reply was not an answer, so I've converted it to a comment.

gvdhoorn gravatar imagegvdhoorn ( 2018-08-30 05:13:05 -0600 )edit

1 Answer

Sort by » oldest newest most voted
1

answered 2018-08-22 21:09:22 -0600

bkmen97 gravatar image

Yes, i'm include <tf/transform_broadcaster.h> into pick_place_tutorial.cpp and the issue has solved. Thanks.

edit flag offensive delete link more

Comments

its the same error come while running the rrt algorithm and this solve the issue by adding this to the error generating file. Thanks for the answer.

pranav1 gravatar imagepranav1 ( 2019-11-07 06:08:46 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2018-08-22 14:49:24 -0600

Seen: 572 times

Last updated: Aug 29 '18