ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

no matching function for call to ‘boost::date_time::subsecond_duration Ros Melodic jsk_topic_tools

asked 2020-07-20 11:11:56 -0500

Michdo93 gravatar image

updated 2020-07-20 11:33:19 -0500

Hi, I want to install the jsk_topic_tools on my Raspberry Pi 4 with Raspbian Buster and ROS melodic, but I got following error:

 error: no matching function for call to ‘boost::date_time::subsecond_duration<boost::posix_time::time_duration, 1000>::subsecond_duration(double)’
       boost::this_thread::sleep(boost::posix_time::milliseconds(sleep_sec * 1e-6));

I have to install following that the process got so far:

sudo apt-get install libbullet-dev libsdl-image1.2-dev libsdl1.2-dev
sudo -H pip install -U pygithub
sudo -H pip install -U pygithub3

For installing new packages I have done this:

cd ~/ros_catkin_ws
rosinstall_generator image_pipeline --rosdistro melodic --deps --wet-only --tar > melodic-image_pipeline-wet.rosinstall
rosinstall_generator vision_opencv --rosdistro melodic --deps --wet-only --tar > melodic-vision_opencv-wet.rosinstall
rosinstall_generator jsk_common --rosdistro melodic --deps --wet-only --tar > melodic-jsk_common-wet.rosinstall
nano fc.rosinstall
- git:
    local-name: coral_usb_ros
    uri: https://github.com/knorth55/coral_usb_ros.git
    version: master

wstool merge -t src melodic-image_pipeline-wet.rosinstall
wstool merge -t src melodic-vision_opencv-wet.rosinstall
wstool merge -t src melodic-jsk_common-wet.rosinstall
wstool merge -t src fc.rosinstall
wstool update -t src
rosdep install --from-paths src --ignore-src --rosdistro melodic -y
sudo ./src/catkin/bin/catkin_make_isolated --install -DCMAKE_BUILD_TYPE=Release --install-space /opt/ros/melodic -j8

The complete error was:

[ 97%] Built target jsk_topic_tools
Scanning dependencies of target jsk_topic_tools_test
CMake Error: Cannot open file for write: 
/home/pi/ros_catkin_ws/build_isolated/jsk_topic_tools/CMakeFiles/jsk_topic_tools_test.dir/depend.make.tmp
CMake Error: : System Error: Permission denied
make[2]: *** [CMakeFiles/jsk_topic_tools_test.dir/build.make:135: CMakeFiles/jsk_topic_tools_test.dir/depend] 
Error 2
make[1]: *** [CMakeFiles/Makefile2:1899: CMakeFiles/jsk_topic_tools_test.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
/home/pi/ros_catkin_ws/src/jsk_common/jsk_topic_tools/src/topic_buffer_server.cpp: In member function ‘void 
sub_info_t::periodic_update_topic()’:
/home/pi/ros_catkin_ws/src/jsk_common/jsk_topic_tools/src/topic_buffer_server.cpp:45:85: error: no matching 
function for call to ‘boost::date_time::subsecond_duration<boost::posix_time::time_duration, 
1000>::subsecond_duration(double)’
           boost::this_thread::sleep(boost::posix_time::milliseconds(sleep_sec * 1e-6));
                                                                                 ^
In file included from /usr/include/boost/date_time/posix_time/posix_time_config.hpp:16,
                 from /usr/include/boost/date_time/posix_time/posix_time_system.hpp:13,
                 from /usr/include/boost/date_time/posix_time/ptime.hpp:12,
                 from /usr/include/boost/date_time/posix_time/posix_time_types.hpp:12,
                 from /usr/include/boost/thread/thread_time.hpp:11,
                 from /usr/include/boost/thread/lock_types.hpp:18,
                 from /usr/include/boost/thread/pthread/thread_data.hpp:12,
                 from /usr/include/boost/thread/thread_only.hpp:17,
                 from /usr/include/boost/thread/thread.hpp:12,
                 from /usr/include/boost/thread.hpp:13,
                 from /home/pi/ros_catkin_ws/src/jsk_common/jsk_topic_tools/src/topic_buffer_server.cpp:10:
/usr/include/boost/date_time/time_duration.hpp:285:14: note: candidate: ‘template<class T> 
boost::date_time::subsecond_duration<base_duration, frac_of_second>::subsecond_duration(const T&, typename 
boost::enable_if<boost::is_integral<Functor>, void>::type*)’
     explicit subsecond_duration(T const& ss,
          ^~~~~~~~~~~~~~~~~~
/usr/include/boost/date_time/time_duration.hpp:285:14: note:   template argument deduction/substitution failed:
 /usr/include/boost/date_time/time_duration.hpp: In substitution of ‘template<class T> 
boost::date_time::subsecond_duration<boost::posix_time::time_duration, 1000>::subsecond_duration(const T&, 
typename boost::enable_if<boost::is_integral<T> >::type*) [with T = double]’:
/home/pi/ros_catkin_ws/src/jsk_common/jsk_topic_tools/src/topic_buffer_server.cpp:45:85:   required from here
/usr/include/boost/date_time/time_duration.hpp:285:14: error: no type named ‘type’ in ‘struct 
boost::enable_if<boost ...
(more)
edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
1

answered 2020-07-20 11:54:05 -0500

Michdo93 gravatar image

Okay, I got it. You have to fix following

boost::this_thread::sleep(boost::posix_time::milliseconds(sleep_sec * 1e-6));

to

boost::this_thread::sleep(boost::posix_time::milliseconds(int(sleep_sec * 1e-6)));

inside the ./src/jsk_common/jsk_topic_tools/src/topic_buffer_server.cpp file.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2020-07-20 11:11:56 -0500

Seen: 1,873 times

Last updated: Jul 20 '20