Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build error when following README #1

Open
chcorbato opened this issue Oct 21, 2020 · 7 comments
Open

Build error when following README #1

chcorbato opened this issue Oct 21, 2020 · 7 comments

Comments

@chcorbato
Copy link
Member

There seem to be a problem with the nav2_msgs package installed because of the first instruction to install some required packages:
$ sudo apt install ros-foxy-slam-toolbox ros-foxy-gazebo-ros-pkgs python3-vcstool

Isn't that colliding with the sources for navigation2 in the ws?

$ sudo apt install ros-foxy-slam-toolbox ros-foxy-gazebo-ros-pkgs python3-vcstool
$ cd [ros2_ws]/src
$ wget https://raw.githubusercontent.com/MROS-RobMoSys-ITP/MROS-Hands-On/main/mros-hands-on.repos
$ vcs import < mros-hands-on.repos
$ cd ..
$ rosdep install -y -r -q --from-paths src --ignore-src --rosdistro foxy --skip-keys="turtlebot2_drivers map_server $ astra_camera amcl"
$ colcon build --symlink-install
[...]
--- stderr: nav2_map_server                  
In file included from /opt/ros/foxy/include/nav2_msgs/srv/load_map.hpp:9,
                 from /home/parallels/handson_ws/src/navigation2/nav2_map_server/include/nav2_map_server/map_server.hpp:26,
                 from /home/parallels/handson_ws/src/navigation2/nav2_map_server/test/unit/test_map_io.cpp:45:
/opt/ros/foxy/include/nav2_msgs/srv/detail/load_map__traits.hpp:23:25: error: expected initializer before ‘<’ token
   23 | inline const char * name<nav2_msgs::srv::LoadMap_Request>()
      |                         ^
/opt/ros/foxy/include/nav2_msgs/srv/detail/load_map__traits.hpp:56:25: error: expected initializer before ‘<’ token
   56 | inline const char * name<nav2_msgs::srv::LoadMap_Response>()
      |                         ^
/opt/ros/foxy/include/nav2_msgs/srv/detail/load_map__traits.hpp:85:25: error: expected initializer before ‘<’ token
   85 | inline const char * name<nav2_msgs::srv::LoadMap>()
      |                         ^
make[2]: *** [test/unit/CMakeFiles/test_map_io.dir/build.make:63: test/unit/CMakeFiles/test_map_io.dir/test_map_io.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:364: test/unit/CMakeFiles/test_map_io.dir/all] Error 2
make: *** [Makefile:141: all] Error 2
---
Failed   <<< nav2_map_server [39.5s, exited with code 2]
Aborted  <<< nav2_behavior_tree [3min 20s]                                           

Summary: 13 packages finished [6min 25s]
  1 package failed: nav2_map_server
  1 package aborted: nav2_behavior_tree
  3 packages had stderr output: dynamixel_sdk hls_lfcd_lds_driver nav2_map_server
  44 packages not processed
@jginesclavero
Copy link
Collaborator

Hi @chcorbato ! I have just installed everything, following the README in an empty lxc ubuntu20:04/foxy container and works well.
Did you do a source /opt/ros/foxy/setup.bash before build the ws?

@chcorbato
Copy link
Member Author

Not sure what I missed to do, but after trying again following the README it worked.

@chcorbato chcorbato reopened this Nov 23, 2020
@chcorbato
Copy link
Member Author

I am trying to install again the Hands-in demo from scratch in a new workspace, and I'm stuck again in this error.
If someone who managed to install and run the demo successfully can shed some light, it is very much welcome.
@estherag @marioney @jginesclavero @fmrico

@estherag
Copy link
Member

I'm not sure if it is required but I had the same issues until I installed these packages by hand required for turtlebot3:

sudo apt install ros-foxy-cartographer
sudo apt install ros-foxy-cartographer-ros
sudo apt install ros-foxy-navigation2
sudo apt install ros-foxy-nav2-bringup

@jginesclavero
Copy link
Collaborator

@chcorbato Could we meeting tomorrow to reproduce the issue? How did you fix it last time?

@chcorbato
Copy link
Member Author

I'm not sure if it is required but I had the same issues until I installed these packages by hand required for turtlebot3:

sudo apt install ros-foxy-cartographer
sudo apt install ros-foxy-cartographer-ros
sudo apt install ros-foxy-navigation2
sudo apt install ros-foxy-nav2-bringup

This did not solve it for me. This is the error I keep getting:

--- stderr: nav2_map_server                                               
In file included from /opt/ros/foxy/include/nav2_msgs/srv/save_map.hpp:9,
                 from /home/parallels/test_mros_ws/src/navigation2/nav2_map_server/include/nav2_map_server/map_saver.hpp:24,
                 from /home/parallels/test_mros_ws/src/navigation2/nav2_map_server/test/component/test_map_saver_node.cpp:23:
/opt/ros/foxy/include/nav2_msgs/srv/detail/save_map__traits.hpp:23:25: error: expected initializer before ‘<’ token
   23 | inline const char * name<nav2_msgs::srv::SaveMap_Request>()
      |                         ^
/opt/ros/foxy/include/nav2_msgs/srv/detail/save_map__traits.hpp:52:25: error: expected initializer before ‘<’ token
   52 | inline const char * name<nav2_msgs::srv::SaveMap_Response>()
      |                         ^
/opt/ros/foxy/include/nav2_msgs/srv/detail/save_map__traits.hpp:81:25: error: expected initializer before ‘<’ token
   81 | inline const char * name<nav2_msgs::srv::SaveMap>()
      |                         ^
In file included from /opt/ros/foxy/include/nav2_msgs/srv/load_map.hpp:9,
                 from /home/parallels/test_mros_ws/src/navigation2/nav2_map_server/include/nav2_map_server/map_server.hpp:26,
                 from /home/parallels/test_mros_ws/src/navigation2/nav2_map_server/test/unit/test_map_io.cpp:45:
/opt/ros/foxy/include/nav2_msgs/srv/detail/load_map__traits.hpp:23:25: error: expected initializer before ‘<’ token
   23 | inline const char * name<nav2_msgs::srv::LoadMap_Request>()
      |                         ^
/opt/ros/foxy/include/nav2_msgs/srv/detail/load_map__traits.hpp:56:25: error: expected initializer before ‘<’ token
   56 | inline const char * name<nav2_msgs::srv::LoadMap_Response>()
      |                         ^
/opt/ros/foxy/include/nav2_msgs/srv/detail/load_map__traits.hpp:85:25: error: expected initializer before ‘<’ token
   85 | inline const char * name<nav2_msgs::srv::LoadMap>()
      |                         ^
make[2]: *** [test/unit/CMakeFiles/test_map_io.dir/build.make:63: test/unit/CMakeFiles/test_map_io.dir/test_map_io.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:364: test/unit/CMakeFiles/test_map_io.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
make[2]: *** [test/component/CMakeFiles/test_map_saver_node.dir/build.make:63: test/component/CMakeFiles/test_map_saver_node.dir/test_map_saver_node.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:475: test/component/CMakeFiles/test_map_saver_node.dir/all] Error 2
make: *** [Makefile:141: all] Error 2
---
Failed   <<< nav2_map_server [4.75s, exited with code 2]
Aborted  <<< nav2_waypoint_follower [0.41s]                                  

Summary: 11 packages finished [8.99s]
  1 package failed: nav2_map_server
  1 package aborted: nav2_waypoint_follower
  1 package had stderr output: nav2_map_server
  49 packages not processed

@chcorbato
Copy link
Member Author

@chcorbato Could we meeting tomorrow to reproduce the issue? How did you fix it last time?

Thanks @jginesclavero , I am available before 10am and after 13pm, except 15.00-16.00

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants