Skip to content

Compile error in moveit_cpp_tutorial: ‘moveit_cpp’ was not declared in this scope; did you mean ‘moveit_cpp_ptr’? #613

@robotrapta

Description

@robotrapta

Description

I'm getting a compiler error when following the getting started instructions for the tutorial on a clean Ubuntu 20.04+Noetic machine. (Arm64 FWIW)

Overview of your issue here.

Your environment

  • ROS Distro: Noetic
  • OS Version: Ubuntu 20.04 Linux ip-172-31-3-122 5.4.0-1039-aws Added Trac-IK tutorial #41-Ubuntu SMP Wed Feb 24 23:14:54 UTC 2021 aarch64 aarch64 aarch64 GNU/Linux
  • Source or Binary build? Source
  • If binary, which release version?
  • If source, which git commit or tag? 186f9c4

Steps to reproduce

On a fresh EC2 graviton instance with Ubuntu 20.04, install Noetic, and follow the tutorial setup instructions https://ros-planning.github.io/moveit_tutorials/doc/getting_started/getting_started.html

When I get to catkin build it crashes. Same results regardless of whether I include MoveIt source or not.

Expected behaviour

Successful build

Backtrace or Console output

Errors     << moveit_tutorials:make /home/ubuntu/ws_moveit/logs/moveit_tutorials/build.make.000.log                                           
/home/ubuntu/ws_moveit/src/moveit_tutorials/doc/moveit_cpp/src/moveit_cpp_tutorial.cpp: In function ‘int main(int, char**)’:
/home/ubuntu/ws_moveit/src/moveit_tutorials/doc/moveit_cpp/src/moveit_cpp_tutorial.cpp:34:42: error: ‘moveit_cpp’ was not declared in this scope; did you mean ‘moveit_cpp_ptr’?
   34 |   auto moveit_cpp_ptr = std::make_shared<moveit_cpp::MoveItCpp>(nh);
      |                                          ^~~~~~~~~~
      |                                          moveit_cpp_ptr
/home/ubuntu/ws_moveit/src/moveit_tutorials/doc/moveit_cpp/src/moveit_cpp_tutorial.cpp:34:30: error: parse error in template argument list
   34 |   auto moveit_cpp_ptr = std::make_shared<moveit_cpp::MoveItCpp>(nh);
      |                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/ubuntu/ws_moveit/src/moveit_tutorials/doc/moveit_cpp/src/moveit_cpp_tutorial.cpp:34:67: error: no matching function for call to ‘make_shared<<expression error> >(ros::NodeHandle&)’
   34 |   auto moveit_cpp_ptr = std::make_shared<moveit_cpp::MoveItCpp>(nh);
      |                                                                   ^
In file included from /usr/include/c++/9/memory:81,
                 from /usr/include/boost/config/no_tr1/memory.hpp:21,
                 from /usr/include/boost/smart_ptr/shared_ptr.hpp:23,
                 from /usr/include/boost/shared_ptr.hpp:17,
                 from /opt/ros/noetic/include/ros/forwards.h:37,
                 from /opt/ros/noetic/include/ros/common.h:37,
                 from /opt/ros/noetic/include/ros/ros.h:43,
                 from /home/ubuntu/ws_moveit/src/moveit_tutorials/doc/moveit_cpp/src/moveit_cpp_tutorial.cpp:1:
/usr/include/c++/9/bits/shared_ptr.h:714:5: note: candidate: ‘template<class _Tp, class ... _Args> std::shared_ptr<_Tp> std::make_shared(_Args&& ...)’
  714 |     make_shared(_Args&&... __args)
      |     ^~~~~~~~~~~
/usr/include/c++/9/bits/shared_ptr.h:714:5: note:   template argument deduction/substitution failed:
/home/ubuntu/ws_moveit/src/moveit_tutorials/doc/moveit_cpp/src/moveit_cpp_tutorial.cpp:34:67: error: template argument 1 is invalid
   34 |   auto moveit_cpp_ptr = std::make_shared<moveit_cpp::MoveItCpp>(nh);
      |                                                                   ^
/home/ubuntu/ws_moveit/src/moveit_tutorials/doc/moveit_cpp/src/moveit_cpp_tutorial.cpp:37:35: error: parse error in template argument list
   37 |   auto planning_components = std::make_shared<moveit_cpp::PlanningComponent>(PLANNING_GROUP, moveit_cpp_ptr);
      |                                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
make[2]: *** [doc/moveit_cpp/CMakeFiles/moveit_cpp_tutorial.dir/build.make:63: doc/moveit_cpp/CMakeFiles/moveit_cpp_tutorial.dir/src/moveit_cpp_tutorial.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:4801: doc/moveit_cpp/CMakeFiles/moveit_cpp_tutorial.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
make: *** [Makefile:141: all] Error 2
cd /home/ubuntu/ws_moveit/build/moveit_tutorials; catk

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions