Open ShuiYunXi opened 3 years ago
Hey, make sure crab_msgs
is compiled before crab_body_kinematics
. The latter can't find these messages compiled when it's required.
Thanks~
发件人:Emiliano Borghi @.> 发送时间:2021年11月4日(星期四) 18:54 收件人:eborghi10/Hexapod-ROS @.> 抄 送:ShuiYunXi @.>; Author @.> 主 题:Re: [eborghi10/Hexapod-ROS] got a error when I build the code. (Issue #2)
Hey, make sure crab_msgs is compiled before crab_body_kinematics. The latter can't find these messages compiled when it's required. — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.
Sure,
Add crab_msgs
as build_depend
and run_depend
here.
Move this line after 15 so the package is in the list of catkin REQUIRED COMPONENTS
.
Finally, according to this documentation, add ${catkin_EXPORTED_TARGETS}
before this line:
add_dependencies(body_kinematics ${catkin_EXPORTED_TARGETS})
If this works for you, will you open a PR, please?
Thanks~,I have receive you reply.I will try again later.But I don't know the "PR".Can you explain the "PR"?
发件人:Emiliano Borghi @.> 发送时间:2021年11月11日(星期四) 19:22 收件人:eborghi10/Hexapod-ROS @.> 抄 送:ShuiYunXi @.>; Author @.> 主 题:Re: [eborghi10/Hexapod-ROS] got a error when I build the code. (Issue #2)
Sure, Add crab_msgs as build_depend and run_depend here. Move this line after 15 so the package is in the list of catkin REQUIRED COMPONENTS. Finally, according to this documentation, add ${catkin_EXPORTED_TARGETS} before this line: add_dependencies(body_kinematics ${catkin_EXPORTED_TARGETS})
If this works for you, will you open a PR, please? — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.
I mean a pull request: https://opensource.com/article/19/7/create-pull-request-github
Excuse me,I got a error when I used the repositories code constructed a workspace to build .Can you tell why?
The error information is:
In file included from /home/zys/HexapodAlgorithm/Hexapod-ROS/src/crab_imu/src/IMU/DCM.cpp:9:0: /usr/include/stdlib.h:837:12: error: expected unqualified-id before ‘int’ extern int abs (int x) THROW attribute ((const)) __wur; ^ /usr/include/stdlib.h:837:12: error: expected ‘)’ before ‘int’ /usr/include/stdlib.h:837:12: error: expected ‘)’ before ‘int’ In file included from /usr/include/c++/7/cmath:47:0, from /usr/include/c++/7/math.h:36, from /home/zys/HexapodAlgorithm/Hexapod-ROS/src/crab_imu/src/IMU/DCM.cpp:12: /usr/include/c++/7/bits/std_abs.h:52:11: error: ‘::abs’ has not been declared using ::abs; ^~~ crab_imu/CMakeFiles/imu.dir/build.make:86: recipe for target 'crab_imu/CMakeFiles/imu.dir/src/IMU/DCM.cpp.o' failed make[2]: [crab_imu/CMakeFiles/imu.dir/src/IMU/DCM.cpp.o] Error 1 CMakeFiles/Makefile2:1764: recipe for target 'crab_imu/CMakeFiles/imu.dir/all' failed make[1]: [crab_imu/CMakeFiles/imu.dir/all] Error 2 make[1]: *** Waiting for unfinished jobs.... In file included from /home/zys/HexapodAlgorithm/Hexapod-ROS/src/crab_body_kinematics/src/body_kinematics.cpp:1:0: /home/zys/HexapodAlgorithm/Hexapod-ROS/src/crab_body_kinematics/src/body_kinematics.hpp:7:10: fatal error: crab_msgs/GetLegIKSolver.h: No such file or directory
include <crab_msgs/GetLegIKSolver.h>
compilation terminated. crab_body_kinematics/CMakeFiles/body_kinematics.dir/build.make:62: recipe for target 'crab_body_kinematics/CMakeFiles/body_kinematics.dir/src/body_kinematics.cpp.o' failed make[2]: [crab_body_kinematics/CMakeFiles/body_kinematics.dir/src/body_kinematics.cpp.o] Error 1 CMakeFiles/Makefile2:1707: recipe for target 'crab_body_kinematics/CMakeFiles/body_kinematics.dir/all' failed make[1]: [crab_body_kinematics/CMakeFiles/body_kinematics.dir/all] Error 2 Makefile:140: recipe for target 'all' failed make: *** [all] Error 2 Invoking "make -j2 -l2" failed The terminal process "bash '-c', 'catkin_make'" terminated with exit code: 1.