Skip to content

Build Error on foxy ubnto 20.04 #13

@MF-Ahmed

Description

@MF-Ahmed

Hi I'm getting the following error while building the foxy branch
--- stderr: mppic
In file included from /home/usr/nav2_ws/install/nav2_costmap_2d/include/nav2_costmap_2d/costmap_2d_publisher.hpp:47,
from /home/usr/nav2_ws/install/nav2_costmap_2d/include/nav2_costmap_2d/costmap_2d_ros.hpp:47,
from /home/usr/data/ros2_ws/src/mppic/src/PathHandler.cpp:1:
/home/usr/nav2_ws/install/nav2_costmap_2d/include/nav2_costmap_2d/costmap_2d.hpp: In member function ‘void nav2_costmap_2d::Costmap2D::raytraceLine(ActionType, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int)’:
/home/usr/nav2_ws/install/nav2_costmap_2d/include/nav2_costmap_2d/costmap_2d.hpp:415:38: error: use of old-style cast to ‘unsigned int’ [-Werror=old-style-cast]
415 | (unsigned int)(scale * abs_dx));
| ^
/home/usr/nav2_ws/install/nav2_costmap_2d/include/nav2_costmap_2d/costmap_2d.hpp:423:36: error: use of old-style cast to ‘unsigned int’ [-Werror=old-style-cast]
423 | (unsigned int)(scale * abs_dy));
| ^
/home/usr/nav2_ws/install/nav2_costmap_2d/include/nav2_costmap_2d/costmap_2d.hpp: In member function ‘void nav2_costmap_2d::Costmap2D::bresenham2D(ActionType, unsigned int, unsigned int, int, int, int, unsigned int, unsigned int)’:
/home/usr/nav2_ws/install/nav2_costmap_2d/include/nav2_costmap_2d/costmap_2d.hpp:442:25: error: use of old-style cast to ‘unsigned int’ [-Werror=old-style-cast]
442 | if ((unsigned int)error_b >= abs_da) {
| ^~~~~~~
In file included from /home/usr/nav2_ws/install/nav2_costmap_2d/include/nav2_costmap_2d/costmap_2d_publisher.hpp:47,
from /home/usr/nav2_ws/install/nav2_costmap_2d/include/nav2_costmap_2d/costmap_2d_ros.hpp:47,
from /home/usr/nav2_ws/install/nav2_core/include/nav2_core/controller.hpp:42,
from /home/usr/data/ros2_ws/src/mppic/include/mppi/Controller.hpp:5,
from /home/usr/data/ros2_ws/src/mppic/src/Controller.cpp:1:
/home/usr/nav2_ws/install/nav2_costmap_2d/include/nav2_costmap_2d/costmap_2d.hpp: In member function ‘void nav2_costmap_2d::Costmap2D::raytraceLine(ActionType, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int)’:
/home/usr/nav2_ws/install/nav2_costmap_2d/include/nav2_costmap_2d/costmap_2d.hpp:415:38: error: use of old-style cast to ‘unsigned int’ [-Werror=old-style-cast]
415 | (unsigned int)(scale * abs_dx));
| ^
/home/usr/nav2_ws/install/nav2_costmap_2d/include/nav2_costmap_2d/costmap_2d.hpp:423:36: error: use of old-style cast to ‘unsigned int’ [-Werror=old-style-cast]
423 | (unsigned int)(scale * abs_dy));
| ^
/home/usr/nav2_ws/install/nav2_costmap_2d/include/nav2_costmap_2d/costmap_2d.hpp: In member function ‘void nav2_costmap_2d::Costmap2D::bresenham2D(ActionType, unsigned int, unsigned int, int, int, int, unsigned int, unsigned int)’:
/home/usr/nav2_ws/install/nav2_costmap_2d/include/nav2_costmap_2d/costmap_2d.hpp:442:25: error: use of old-style cast to ‘unsigned int’ [-Werror=old-style-cast]
442 | if ((unsigned int)error_b >= abs_da) {
| ^~~~~~~
In file included from /home/usr/nav2_ws/install/nav2_costmap_2d/include/nav2_costmap_2d/costmap_2d_publisher.hpp:53,
from /home/usr/nav2_ws/install/nav2_costmap_2d/include/nav2_costmap_2d/costmap_2d_ros.hpp:47,
from /home/usr/data/ros2_ws/src/mppic/src/PathHandler.cpp:1:
/home/usr/nav2_ws/install/nav2_util/include/nav2_util/lifecycle_node.hpp: In member function ‘void nav2_util::LifecycleNode::add_parameter(const string&, const rclcpp::ParameterValue&, nav2_util::LifecycleNode::integer_range, const string&, const string&, bool)’:
/home/usr/nav2_ws/install/nav2_util/include/nav2_util/lifecycle_node.hpp:113:50: error: conversion to ‘rcl_interfaces::msg::IntegerRange_<std::allocator >::step_type’ {aka ‘long unsigned int’} from ‘int’ may change the sign of the result [-Werror=sign-conversion]
113 | descriptor.integer_range[0].step = int_range.step;
| ~~~~~~~~~~^~~~
In file included from /home/usr/nav2_ws/install/nav2_costmap_2d/include/nav2_costmap_2d/costmap_2d_publisher.hpp:53,
from /home/usr/nav2_ws/install/nav2_costmap_2d/include/nav2_costmap_2d/costmap_2d_ros.hpp:47,
from /home/usr/nav2_ws/install/nav2_core/include/nav2_core/controller.hpp:42,
from /home/usr/data/ros2_ws/src/mppic/include/mppi/Controller.hpp:5,
from /home/usr/data/ros2_ws/src/mppic/src/Controller.cpp:1:
/home/usr/nav2_ws/install/nav2_util/include/nav2_util/lifecycle_node.hpp: In member function ‘void nav2_util::LifecycleNode::add_parameter(const string&, const rclcpp::ParameterValue&, nav2_util::LifecycleNode::integer_range, const string&, const string&, bool)’:
/home/usr/nav2_ws/install/nav2_util/include/nav2_util/lifecycle_node.hpp:113:50: error: conversion to ‘rcl_interfaces::msg::IntegerRange
<std::allocator >::step_type’ {aka ‘long unsigned int’} from ‘int’ may change the sign of the result [-Werror=sign-conversion]
113 | descriptor.integer_range[0].step = int_range.step;
| ~~~~~~~~~~^~~~
cc1plus: all warnings being treated as errors
make[2]: *** [CMakeFiles/mppic.dir/build.make:76: CMakeFiles/mppic.dir/src/PathHandler.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
In file included from /home/usr/data/ros2_ws/src/mppic/test/optimizer-test.cpp:7:
/home/usr/nav2_ws/install/nav2_costmap_2d/include/nav2_costmap_2d/costmap_2d.hpp: In member function ‘void nav2_costmap_2d::Costmap2D::raytraceLine(ActionType, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int)’:
/home/usr/nav2_ws/install/nav2_costmap_2d/include/nav2_costmap_2d/costmap_2d.hpp:415:38: error: use of old-style cast to ‘unsigned int’ [-Werror=old-style-cast]
415 | (unsigned int)(scale * abs_dx));
| ^
/home/usr/nav2_ws/install/nav2_costmap_2d/include/nav2_costmap_2d/costmap_2d.hpp:423:36: error: use of old-style cast to ‘unsigned int’ [-Werror=old-style-cast]
423 | (unsigned int)(scale * abs_dy));
| ^
/home/usr/nav2_ws/install/nav2_costmap_2d/include/nav2_costmap_2d/costmap_2d.hpp: In member function ‘void nav2_costmap_2d::Costmap2D::bresenham2D(ActionType, unsigned int, unsigned int, int, int, int, unsigned int, unsigned int)’:
/home/usr/nav2_ws/install/nav2_costmap_2d/include/nav2_costmap_2d/costmap_2d.hpp:442:25: error: use of old-style cast to ‘unsigned int’ [-Werror=old-style-cast]
442 | if ((unsigned int)error_b >= abs_da) {
| ^~~~~~~
In file included from /home/usr/nav2_ws/install/nav2_costmap_2d/include/nav2_costmap_2d/costmap_2d_publisher.hpp:53,
from /home/usr/nav2_ws/install/nav2_costmap_2d/include/nav2_costmap_2d/costmap_2d_ros.hpp:47,
from /home/usr/data/ros2_ws/src/mppic/test/optimizer-test.cpp:8:
/home/usr/nav2_ws/install/nav2_util/include/nav2_util/lifecycle_node.hpp: In member function ‘void nav2_util::LifecycleNode::add_parameter(const string&, const rclcpp::ParameterValue&, nav2_util::LifecycleNode::integer_range, const string&, const string&, bool)’:
/home/usr/nav2_ws/install/nav2_util/include/nav2_util/lifecycle_node.hpp:113:50: error: conversion to ‘rcl_interfaces::msg::IntegerRange
<std::allocator >::_step_type’ {aka ‘long unsigned int’} from ‘int’ may change the sign of the result [-Werror=sign-conversion]
113 | descriptor.integer_range[0].step = int_range.step;
| ~~~~~~~~~~^~~~
cc1plus: all warnings being treated as errors
make[2]: *** [CMakeFiles/mppic.dir/build.make:63: CMakeFiles/mppic.dir/src/Controller.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:102: CMakeFiles/mppic.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
cc1plus: all warnings being treated as errors
make[2]: *** [test/CMakeFiles/optimizer-test.dir/build.make:63: test/CMakeFiles/optimizer-test.dir/optimizer-test.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:210: test/CMakeFiles/optimizer-test.dir/all] Error 2
make: *** [Makefile:141: all] Error 2

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions