Ask Your Question
0

ROS2 colcon build nav2_regulated_pure_pursuit_controller error

asked 2021-08-16 13:08:29 -0600

updated 2021-08-17 11:53:54 -0600

I am attempting to build the nav2 repo and I have run into the following error while running colcon build --symlink-install

When sourcing my enviroment I also get the following error: Input: ~/ros2_foxy$ . ~/ros2_foxy/install/local_setup.bash

Error:

not found: "/home/me/ros2_foxy/install/nav2_regulated_pure_pursuit_controller/share/nav2_regulated_pure_pursuit_controller/local_setup.bash"

I understand that the errors are redundant redeclaration and such, but why? shouldn't this code work(I cant seem to find any relevant information online)? What am i doing wrong and/or how do I fix this? when building this is the output I get:

   Finished <<< logging_demo [4.68s]                                                                         
    Starting >>> nav2_planner
    Finished <<< demo_nodes_cpp

 [5.07s]                                                                       

Starting >>> nav2_recoveries
Finished <<< tf2_eigen [2.09s]                                                             
Starting >>> nav2_regulated_pure_pursuit_controller
Finished <<< turtlesim [8.07s]                                                                               
Starting >>> smac_planner
Finished <<< nav2_navfn_planner [2.48s]                                                                    
Starting >>> tf2_tools
Finished <<< ros2bag [6.27s]                                                              
Starting >>> lifecycle                                                                                    

Finished <<< dwb_core [3.86s]                                                                             
Starting >>> dwb_critics                                                                                        
Finished <<< nav2_controller [3.91s]                                                                            
Starting >>> dwb_plugins
Finished <<< tf2_tools [3.31s]                                                                                    
Starting >>> ros2action
Finished <<< lifecycle [6.05s]                                                                                    
Starting >>> ros2doctor
Finished <<< ros2action [17.7s]                                                                                   
Starting >>> ros2interface
--- stderr: nav2_regulated_pure_pursuit_controller                              
In file included from /opt/ros/foxy/include/rcl_interfaces/msg/parameter_type.hpp:7,
                 from /opt/ros/foxy/include/rclcpp/parameter_value.hpp:25,
                 from /opt/ros/foxy/include/rclcpp/parameter.hpp:26,
                 from /opt/ros/foxy/include/rclcpp/node_options.hpp:25,
                 from /home/mustafa-not/ros2_foxy/install/rclcpp_lifecycle/include/rclcpp_lifecycle/lifecycle_node.hpp:63,
                 from /home/mustafa-not/ros2_foxy/install/nav2_costmap_2d/include/nav2_costmap_2d/costmap_2d_publisher.hpp:46,
                 from /home/mustafa-not/ros2_foxy/install/nav2_costmap_2d/include/nav2_costmap_2d/costmap_2d_ros.hpp:47,
                 from /home/mustafa-not/ros2_foxy/install/nav2_core/include/nav2_core/controller.hpp:42,
                 from /home/mustafa-not/ros2_foxy/src/navigation2/nav2_regulated_pure_pursuit_controller/include/nav2_regulated_pure_pursuit_controller/regulated_pure_pursuit_controller.hpp:24,
                 from /home/mustafa-not/ros2_foxy/src/navigation2/nav2_regulated_pure_pursuit_controller/src/regulated_pure_pursuit_controller.cpp:20:
/opt/ros/foxy/include/rcl_interfaces/msg/detail/parameter_type__struct.hpp:139:19: error: redundant redeclaration of ‘constexpr’ static data member ‘rcl_interfaces::msg::ParameterType_<ContainerAllocator>::PARAMETER_NOT_SET’ [-Werror=deprecated]
  139 | constexpr uint8_t ParameterType_<ContainerAllocator>::PARAMETER_NOT_SET;
      |                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/opt/ros/foxy/include/rcl_interfaces/msg/detail/parameter_type__struct.hpp:61:28: note: previous declaration of ‘rcl_interfaces::msg::ParameterType_<ContainerAllocator>::PARAMETER_NOT_SET’
   61 |   static constexpr uint8_t PARAMETER_NOT_SET =
      |                            ^~~~~~~~~~~~~~~~~
/opt/ros/foxy/include/rcl_interfaces/msg/detail/parameter_type__struct.hpp:141:19: error: redundant redeclaration of ‘constexpr’ static data member ‘rcl_interfaces::msg::ParameterType_<ContainerAllocator>::PARAMETER_BOOL’ [-Werror=deprecated]
  141 | constexpr uint8_t ParameterType_<ContainerAllocator>::PARAMETER_BOOL;
      |                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/opt/ros/foxy/include/rcl_interfaces/msg/detail/parameter_type__struct.hpp:63:28: note: previous declaration of ‘rcl_interfaces::msg::ParameterType_<ContainerAllocator>::PARAMETER_BOOL’
   63 |   static constexpr uint8_t PARAMETER_BOOL =
      |                            ^~~~~~~~~~~~~~
/opt/ros/foxy/include/rcl_interfaces/msg/detail/parameter_type__struct.hpp:143:19: error: redundant redeclaration of ‘constexpr’ static data member ‘rcl_interfaces::msg::ParameterType_<ContainerAllocator>::PARAMETER_INTEGER’ [-Werror=deprecated]
  143 | constexpr uint8_t ParameterType_<ContainerAllocator>::PARAMETER_INTEGER;
      |                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/opt/ros/foxy/include/rcl_interfaces/msg/detail/parameter_type__struct.hpp:65:28: note: previous declaration of ‘rcl_interfaces::msg::ParameterType_<ContainerAllocator>::PARAMETER_INTEGER’
   65 |   static constexpr uint8_t PARAMETER_INTEGER =
      |                            ^~~~~~~~~~~~~~~~~
/opt/ros/foxy/include/rcl_interfaces/msg/detail/parameter_type__struct.hpp:145:19: error: redundant redeclaration of ‘constexpr’ static data member ‘rcl_interfaces::msg::ParameterType_<ContainerAllocator>::PARAMETER_DOUBLE’ [-Werror=deprecated]
  145 | constexpr uint8_t ParameterType_<ContainerAllocator>::PARAMETER_DOUBLE;
      |                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/opt/ros/foxy/include/rcl_interfaces/msg/detail/parameter_type__struct.hpp:67:28: note: previous declaration of ‘rcl_interfaces ...
(more)
edit retag flag offensive close merge delete

Comments

Instead of building from source I installed the packages with sudo apt install ros-<distro>-navigation2 ros-<distro>-nav2-bringup

This works for my use case, but I did not explore the above problem at all. I have also noticed that switching to galactic seems to remedy all problems/issues I was running into.

MustafaTatli gravatar image MustafaTatli  ( 2021-08-20 17:35:44 -0600 )edit

1 Answer

Sort by » oldest newest most voted
0

answered 2021-08-16 14:31:50 -0600

If I were to make an educated guess, you're trying to build a branch of Nav2 that isn't the Foxy branch (if you're building with Foxy binaries).

edit flag offensive delete link more

Comments

git clone https://github.com/ros-planning/navig... --branch foxy-devel

Branch is foxy, unless im missing something.

MustafaTatli gravatar image MustafaTatli  ( 2021-08-17 12:58:09 -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

1 follower

Stats

Asked: 2021-08-16 13:08:29 -0600

Seen: 48 times

Last updated: Aug 17