Closed KhanMar2019 closed 5 years ago
Hi,
you need to compile libfranka and set the path instead of using
-DFranka_DIR:PATH=~/path/to/libfranka/build
In my blog post I linked to the franka documentation where you can find a tutorial for compiling libfranka
I did all the instructions from the link: sudo apt install build-essential cmake git libpoco-dev libeigen3-dev git clone --recursive https://github.com/frankaemika/libfranka cd libfranka mkdir build cd build cmake -DCMAKE_BUILD_TYPE=Release .. cmake --build .
then after it I do in my workspace: catkin_make -j4 -DCMAKE_BUILD_TYPE=Release -DFranka_DIR:PATH=~/home/pdc-labor/libfranka/build and on this step i got the error
You need to use an absolute path beginning with /.....
What you're currently using is a tilde:
~/home/pdc-.....
Use something like
/home/username/home/pdc-....
It's definetelly worked better :) My absolute path is: /home/pdc-labor/libfranka/build But now new errors I see after 95%:
[ 94%] Built target franka_state_controller
[ 95%] Building CXX object franka_ros/franka_control/CMakeFiles/franka_control_node.dir/src/franka_control_node.cpp.o
[ 98%] Built target franka_example_controllers
In file included from /opt/ros/melodic/include/actionlib/server/handle_tracker_deleter.h:42:0,
from /opt/ros/melodic/include/actionlib/server/action_server.h:51,
from /opt/ros/melodic/include/actionlib/server/simple_action_server.h:42,
from /home/pdc-labor/pandanew_ws/src/franka_ros/franka_gripper/include/franka_gripper/franka_gripper.h:8,
from /home/pdc-labor/pandanew_ws/src/franka_ros/franka_gripper/src/franka_gripper.cpp:3:
/opt/ros/melodic/include/actionlib/destruction_guard.h: In member function ‘void actionlib::DestructionGuard::destruct()’:
/opt/ros/melodic/include/actionlib/destruction_guard.h:62:80: error: no matching function for call to ‘boost::date_time::subsecond_duration<boost::posix_time::time_duration, 1000>::subsecond_duration(float)’
countcondition.timed_wait(lock, boost::posix_time::milliseconds(1000.0f));
^
In file included from /usr/include/boost/date_time/posix_time/posix_time_config.hpp:16:0,
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/detail/platform_time.hpp:11,
from /usr/include/boost/thread/pthread/condition_variable.hpp:9,
from /usr/include/boost/thread/condition_variable.hpp:16,
from /usr/include/boost/thread/condition.hpp:13,
from /opt/ros/melodic/include/actionlib/server/simple_action_server.h:40,
from /home/pdc-labor/pandanew_ws/src/franka_ros/franka_gripper/include/franka_gripper/franka_gripper.h:8,
from /home/pdc-labor/pandanew_ws/src/franka_ros/franka_gripper/src/franka_gripper.cpp:3:
/usr/include/boost/date_time/time_duration.hpp:285:14: note: candidate: template~~~~~
/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~~~~~
/usr/include/boost/date_time/time_duration.hpp:270:30: note: no known conversion for argument 1 from ‘float’ to ‘const boost::date_time::subsecond_duration<boost::posix_time::time_duration, 1000>&’
/usr/include/boost/date_time/time_duration.hpp:270:30: note: candidate: boost::date_time::subsecond_duration<boost::posix_time::time_duration, 1000>::subsecond_duration(boost::date_time::subsecond_duration<boost::posix_time::time_duration, 1000>&&)
/usr/include/boost/date_time/time_duration.hpp:270:30: note: no known conversion for argument 1 from ‘float’ to ‘boost::date_time::subsecond_duration<boost::posix_time::time_duration, 1000>&&’
In file included from /opt/ros/melodic/include/actionlib/server/handle_tracker_deleter.h:42:0,
from /opt/ros/melodic/include/actionlib/server/action_server.h:51,
from /opt/ros/melodic/include/actionlib/server/simple_action_server.h:42,
from /home/pdc-labor/pandanew_ws/src/franka_ros/franka_control/src/franka_control_node.cpp:9:
/opt/ros/melodic/include/actionlib/destruction_guard.h: In member function ‘void actionlib::DestructionGuard::destruct()’:
/opt/ros/melodic/include/actionlib/destruction_guard.h:62:80: error: no matching function for call to ‘boost::date_time::subsecond_duration<boost::posix_time::time_duration, 1000>::subsecond_duration(float)’
countcondition.timed_wait(lock, boost::posix_time::milliseconds(1000.0f));
^
In file included from /usr/include/boost/date_time/posix_time/posix_time_config.hpp:16:0,
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/detail/platform_time.hpp:11,
from /usr/include/boost/thread/pthread/condition_variable.hpp:9,
from /usr/include/boost/thread/condition_variable.hpp:16,
from /usr/include/boost/thread/condition.hpp:13,
from /opt/ros/melodic/include/actionlib/server/simple_action_server.h:40,
from /home/pdc-labor/pandanew_ws/src/franka_ros/franka_control/src/franka_control_node.cpp:9:
/usr/include/boost/date_time/time_duration.hpp:285:14: note: candidate: template~~~~~
/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~~~~~
/usr/include/boost/date_time/time_duration.hpp:270:30: note: no known conversion for argument 1 from ‘float’ to ‘const boost::date_time::subsecond_duration<boost::posix_time::time_duration, 1000>&’
/usr/include/boost/date_time/time_duration.hpp:270:30: note: candidate: boost::date_time::subsecond_duration<boost::posix_time::time_duration, 1000>::subsecond_duration(boost::date_time::subsecond_duration<boost::posix_time::time_duration, 1000>&&)
/usr/include/boost/date_time/time_duration.hpp:270:30: note: no known conversion for argument 1 from ‘float’ to ‘boost::date_time::subsecond_duration<boost::posix_time::time_duration, 1000>&&’
franka_ros/franka_gripper/CMakeFiles/franka_gripper.dir/build.make:62: recipe for target 'franka_ros/franka_gripper/CMakeFiles/franka_gripper.dir/src/franka_gripper.cpp.o' failed
make[2]: [franka_ros/franka_gripper/CMakeFiles/franka_gripper.dir/src/franka_gripper.cpp.o] Error 1
CMakeFiles/Makefile2:1347: recipe for target 'franka_ros/franka_gripper/CMakeFiles/franka_gripper.dir/all' failed
make[1]: [franka_ros/franka_gripper/CMakeFiles/franka_gripper.dir/all] Error 2
make[1]: Waiting for unfinished jobs....
In file included from /opt/ros/melodic/include/actionlib/managed_list.h:38:0,
from /opt/ros/melodic/include/actionlib/client/client_helpers.h:47,
from /opt/ros/melodic/include/actionlib/client/action_client.h:38,
from /opt/ros/melodic/include/actionlib/client/simple_action_client.h:47,
from /opt/ros/melodic/include/moveit/move_group_interface/move_group_interface.h:53,
from /home/pdc-labor/pandanew_ws/src/panda_simulation/src/box_publisher.cpp:2:
/opt/ros/melodic/include/actionlib/destruction_guard.h: In member function ‘void actionlib::DestructionGuard::destruct()’:
/opt/ros/melodic/include/actionlib/destruction_guard.h:62:80: error: no matching function for call to ‘boost::date_time::subsecond_duration<boost::posix_time::time_duration, 1000>::subsecond_duration(float)’
countcondition.timed_wait(lock, boost::posix_time::milliseconds(1000.0f));
^
In file included from /usr/include/boost/date_time/posix_time/posix_time_config.hpp:16:0,
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/detail/platform_time.hpp:11,
from /usr/include/boost/thread/pthread/condition_variable.hpp:9,
from /usr/include/boost/thread/condition_variable.hpp:16,
from /usr/include/boost/thread/condition.hpp:13,
from /opt/ros/melodic/include/actionlib/client/simple_action_client.h:38,
from /opt/ros/melodic/include/moveit/move_group_interface/move_group_interface.h:53,
from /home/pdc-labor/pandanew_ws/src/panda_simulation/src/box_publisher.cpp:2:
/usr/include/boost/date_time/time_duration.hpp:285:14: note: candidate: template~~~~~
/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~~~~~
/usr/include/boost/date_time/time_duration.hpp:270:30: note: no known conversion for argument 1 from ‘float’ to ‘const boost::date_time::subsecond_duration<boost::posix_time::time_duration, 1000>&’
/usr/include/boost/date_time/time_duration.hpp:270:30: note: candidate: boost::date_time::subsecond_duration<boost::posix_time::time_duration, 1000>::subsecond_duration(boost::date_time::subsecond_duration<boost::posix_time::time_duration, 1000>&&)
/usr/include/boost/date_time/time_duration.hpp:270:30: note: no known conversion for argument 1 from ‘float’ to ‘boost::date_time::subsecond_duration<boost::posix_time::time_duration, 1000>&&’
In file included from /opt/ros/melodic/include/actionlib/server/simple_action_server.h:256:0,
from /home/pdc-labor/pandanew_ws/src/franka_ros/franka_control/src/franka_control_node.cpp:9:
/opt/ros/melodic/include/actionlib/server/simple_action_server_imp.h: In instantiation of ‘void actionlib::SimpleActionServer~~~~~~~~~~~~
In file included from /usr/include/boost/date_time/posix_time/posix_time_config.hpp:16:0,
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/detail/platform_time.hpp:11,
from /usr/include/boost/thread/pthread/condition_variable.hpp:9,
from /usr/include/boost/thread/condition_variable.hpp:16,
from /usr/include/boost/thread/condition.hpp:13,
from /opt/ros/melodic/include/actionlib/server/simple_action_server.h:40,
from /home/pdc-labor/pandanew_ws/src/franka_ros/franka_control/src/franka_control_node.cpp:9:
/usr/include/boost/date_time/time_duration.hpp:285:14: note: candidate: template~~~~~
/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~~~~~
/usr/include/boost/date_time/time_duration.hpp:270:30: note: no known conversion for argument 1 from ‘double’ to ‘const boost::date_time::subsecond_duration<boost::posix_time::time_duration, 1000>&’
/usr/include/boost/date_time/time_duration.hpp:270:30: note: candidate: boost::date_time::subsecond_duration<boost::posix_time::time_duration, 1000>::subsecond_duration(boost::date_time::subsecond_duration<boost::posix_time::time_duration, 1000>&&)
/usr/include/boost/date_time/time_duration.hpp:270:30: note: no known conversion for argument 1 from ‘double’ to ‘boost::date_time::subsecond_duration<boost::posix_time::time_duration, 1000>&&’
franka_ros/franka_control/CMakeFiles/franka_control_node.dir/build.make:62: recipe for target 'franka_ros/franka_control/CMakeFiles/franka_control_node.dir/src/franka_control_node.cpp.o' failed
make[2]: ** [franka_ros/franka_control/CMakeFiles/franka_control_node.dir/src/franka_control_node.cpp.o] Error 1
CMakeFiles/Makefile2:5972: recipe for target 'franka_ros/franka_control/CMakeFiles/franka_control_node.dir/all' failed
make[1]:
I just cloned the repositories as they are and built them and my compile was successful.
Make sure that you run the Ubuntu 18.04 with ros-desktop-full and have not altered your compiler or anything else.
Also make sure to run the rosdep install instruction from the README from within the workspace.
Hi!
Thank you a lot for this tutorial. But i have a problem while doing: catkin_make -j4 -DCMAKE_BUILD_TYPE=Release -DFranka_DIR:PATH=~/path/to/libfranka/build
I got an error:
CMake Error at franka_ros/franka_gripper/CMakeLists.txt:17 (find_package): By not providing "FindFranka.cmake" in CMAKE_MODULE_PATH this project has asked CMake to find a package configuration file provided by "Franka", but CMake did not find one.
Could not find a package configuration file provided by "Franka" (requested version 0.5.0) with any of the following names:
Add the installation prefix of "Franka" to CMAKE_PREFIX_PATH or set "Franka_DIR" to a directory containing one of the above files. If "Franka" provides a separate development package or SDK, be sure it has been installed.
-- Configuring incomplete, errors occurred! See also "/home/pdc-labor/pandanew_ws/build/CMakeFiles/CMakeOutput.log". See also "/home/pdc-labor/pandanew_ws/build/CMakeFiles/CMakeError.log". Makefile:3498: recipe for target 'cmake_check_build_system' failed make: *** [cmake_check_build_system] Error 1 Invoking "make cmake_check_build_system" failed pdc-labor@pdclabor-ThinkPad-E480:~/pandanew_ws$
Why can it happen?