WHILL / ros_whill

ROS Package for WHILL Model CR
https://whill.jp/model-cr
MIT License
34 stars 25 forks source link

catkin_make on Ubuntu 18.04 & ros-melodic failed #1

Closed WHILL-sysdev closed 5 years ago

WHILL-sysdev commented 6 years ago
In file included from /home/seiya/catkin_ws/src/ros_whill/src/whill_modelc_publisher.cpp:41:0:
/home/xxxxx/catkin_ws/src/ros_whill/src/./odom.h:42:33: error: ‘constexpr’ needed for in-class initialization of static data member ‘const double Odometry::wheel_radius_’ of non-integral type [-fpermissive]
             static const double wheel_radius_ = 0.1325;
                                 ^~~~~~~~~~~~~
/home/xxxxx/catkin_ws/src/ros_whill/src/./odom.h:43:33: error: ‘constexpr’ needed for in-class initialization of static data member ‘const double Odometry::wheel_tread_’ of non-integral type [-fpermissive]
             static const double wheel_tread_  = 0.248;
                                 ^~~~~~~~~~~~
mfogelson commented 5 years ago

This is because of the update to the compiler.
I have fixed this issue by changing the following in odom.h:

static const double wheel_radius_ = 0.1325;
static const double wheel_tread_  = 0.248;

to

static constexpr double wheel_radius_ = 0.1325;
static constexpr double wheel_tread_  = 0.248;
seiya0412 commented 5 years ago

Thank you for the comment. It will be fixed in melodic-devel.