-
Notifications
You must be signed in to change notification settings - Fork 398
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
Ubuntu 18.04 and ROS Melodic compile error.Error: call of overloaded ‘round(float)’ is ambiguous #100
Comments
a4zhangfei
changed the title
Ubuntu 18.04 and ROS Melodic.
Ubuntu 18.04 and ROS Melodic compile error
Nov 10, 2018
a4zhangfei
changed the title
Ubuntu 18.04 and ROS Melodic compile error
Ubuntu 18.04 and ROS Melodic compile error.Error: call of overloaded ‘round(float)’ is ambiguous
Nov 10, 2018
Hello,I meet the same error in Ubuntu 18.04 .Have you already solved it? |
I changed the Ubuntu version: 16.04
…------------------ 原始邮件 ------------------
发件人: "Magical-E"<notifications@github.com>;
发送时间: 2019年7月24日(星期三) 上午10:28
收件人: "felixendres/rgbdslam_v2"<rgbdslam_v2@noreply.github.com>;
抄送: "a4zhangfei"<1617315424@qq.com>; "Author"<author@noreply.github.com>;
主题: Re: [felixendres/rgbdslam_v2] Ubuntu 18.04 and ROS Melodic compile error.Error: call of overloaded ‘round(float)’ is ambiguous (#100)
Hello,I meet the same error in Ubuntu 18.04 .Have you already solved it?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
I have the same problem under debian 10 and ros melodic |
there is an inline function named "round" in misc.cpp, you can solve this problem by simply rename the function and the revoke to anything like "myround" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
error: ‘int round(float)’ conflicts with a previous declaration
inline int round(float d)
^
In file included from /opt/ros/melodic/include/ros/time.h:55:0,
from /opt/ros/melodic/include/ros/ros.h:38,
from /home/zhangzhihao/kinetic_rgbdslam_catkin_ws/src/kinetic_slam/src/misc.cpp:16:
/usr/include/c++/7/cmath:1771:3: note: previous declaration ‘constexpr float std::round(float)’
round(float __x)
^~~~~
/home/zhangzhihao/kinetic_rgbdslam_catkin_ws/src/kinetic_slam/src/misc.cpp: In function ‘void observationLikelihood(const Matrix4f&, pcl::PointCloudpcl::PointXYZRGB::Ptr, pcl::PointCloudpcl::PointXYZRGB::Ptr, const CameraInfo&, double&, double&, unsigned int&, unsigned int&, unsigned int&, unsigned int&)’:
/home/zhangzhihao/kinetic_rgbdslam_catkin_ws/src/kinetic_slam/src/misc.cpp:880:53: error: call of overloaded ‘round(float)’ is ambiguous
int old_rx_center = round((p.x / p.z)* fx + cx);
^
In file included from /usr/include/features.h:424:0,
from /usr/include/x86_64-linux-gnu/c++/7/bits/os_defines.h:39,
from /usr/include/x86_64-linux-gnu/c++/7/bits/c++config.h:533,
from /usr/include/c++/7/cstdlib:41,
from /usr/include/c++/7/stdlib.h:36,
from /opt/ros/melodic/include/ros/platform.h:53,
from /opt/ros/melodic/include/ros/time.h:53,
from /opt/ros/melodic/include/ros/ros.h:38,
from /home/zhangzhihao/kinetic_rgbdslam_catkin_ws/src/kinetic_slam/src/misc.cpp:16:
/usr/include/x86_64-linux-gnu/bits/mathcalls.h:298:1: note: candidate: double round(double)
__MATHCALLX (round,, (Mdouble __x), (const));
^
In file included from /opt/ros/melodic/include/ros/time.h:55:0,
from /opt/ros/melodic/include/ros/ros.h:38,
from /home/zhangzhihao/kinetic_rgbdslam_catkin_ws/src/kinetic_slam/src/misc.cpp:16:
/usr/include/c++/7/cmath:1771:3: note: candidate: constexpr float std::round(float)
round(float __x)
^~~~~
/usr/include/c++/7/cmath:1775:3: note: candidate: constexpr long double std::round(long double)
round(long double __x)
^~~~~
/home/zhangzhihao/kinetic_rgbdslam_catkin_ws/src/kinetic_slam/src/misc.cpp:804:12: note: candidate: int round(float)
inline int round(float d)
^~~~~
/home/zhangzhihao/kinetic_rgbdslam_catkin_ws/src/kinetic_slam/src/misc.cpp:881:53: error: call of overloaded ‘round(float)’ is ambiguous
int old_ry_center = round((p.y / p.z)* fy + cy);
^
The text was updated successfully, but these errors were encountered: