MingshanHe / Compliant-Control-and-Application

Compliant Control: 1) admittance control algorithm 2) impedance control algorithm 3) hybrid force&position algorithm in robotic arm (Universal Robot).
https://mingshanhe.github.io/Compliant-Control-and-Application/
MIT License
346 stars 65 forks source link

Error when catkin_make #33

Open ZZWang21 opened 1 year ago

ZZWang21 commented 1 year ago

Hi, @MingshanHe

When I catkin_make, an error came out. I do not know if it is my ROS problem or?

"In file included from /home/walter/catkin_ws/src/Compliant-Control-and-Application/control_strategy/src/control_strategy/control_strategy.cpp:1: /home/walter/catkin_ws/src/Compliant-Control-and-Application/control_strategy/include/control_strategy/control_strategy.h:11:10: fatal error: cartesian_state_msgs/PoseTwist.h: No such file or directory 11 | #include "cartesian_state_msgs/PoseTwist.h" | ^~~~~~~~~~ compilation terminated. make[2]: [Compliant-Control-and-Application/control_strategy/CMakeFiles/control_strategy.dir/build.make:63: Compliant-Control-and-Application/control_strategy/CMakeFiles/control_strategy.dir/src/control_strategy/control_strategy.cpp.o] Error 1 make[1]: [CMakeFiles/Makefile2:9283: Compliant-Control-and-Application/control_strategy/CMakeFiles/control_strategy.dir/all] Error 2 make[1]: Waiting for unfinished jobs.... In file included from /home/walter/catkin_ws/src/Compliant-Control-and-Application/control_algorithms/admittance/src/Admittance/Admittance.cpp:8: /home/walter/catkin_ws/src/Compliant-Control-and-Application/control_algorithms/admittance/include/admittance/Admittance.h:14:10: fatal error: cartesian_state_msgs/PoseTwist.h: No such file or directory 14 | #include "cartesian_state_msgs/PoseTwist.h" | ^~~~~~~~~~ compilation terminated. make[2]: [Compliant-Control-and-Application/control_algorithms/admittance/CMakeFiles/admittance.dir/build.make:63: Compliant-Control-and-Application/control_algorithms/admittance/CMakeFiles/admittance.dir/src/Admittance/Admittance.cpp.o] Error 1 make[1]: [CMakeFiles/Makefile2:11586: Compliant-Control-and-Application/control_algorithms/admittance/CMakeFiles/admittance.dir/all] Error 2 In file included from /home/walter/catkin_ws/src/Compliant-Control-and-Application/control_algorithms/admittance/src/HybridAdmittance/HybridAdmittance.cpp:1: /home/walter/catkin_ws/src/Compliant-Control-and-Application/control_algorithms/admittance/include/hybridadmittance/HybridAdmittance.h:6:10: fatal error: cartesian_state_msgs/PoseTwist.h: No such file or directory 6 | #include "cartesian_state_msgs/PoseTwist.h" | ^~~~~~~~~~ compilation terminated. make[2]: [Compliant-Control-and-Application/control_algorithms/admittance/CMakeFiles/hybridadmittance.dir/build.make:63: Compliant-Control-and-Application/control_algorithms/admittance/CMakeFiles/hybridadmittance.dir/src/HybridAdmittance/HybridAdmittance.cpp.o] Error 1 make[1]: *** [CMakeFiles/Makefile2:11559: Compliant-Control-and-Application/control_algorithms/admittance/CMakeFiles/hybridadmittance.dir/all] Error 2 "

Thank you very much!

MingshanHe commented 1 year ago

Hello, This is not a serious error. It happens in the previous issues. #6 I think that issue can answer your problem.

ZZWang21 commented 1 year ago

Thanks, I am using ROS Noetic, and follow #6 , I used "catkin build", but came another error: "rrors << impedance:make /home/walter/catkin_ws/logs/impedance/build.make.002.log
In file included from /home/walter/catkin_ws/src/Compliant-Control-and-Application/control_algorithms/impedance/src/Impedance.cpp:1: /home/walter/catkin_ws/src/Compliant-Control-and-Application/control_algorithms/impedance/include/impedance/Impedance.h:30:9: error: ‘Matrix’ does not name a type 30 | typedef Matrix<double, 6, 6> Matrix6d; | ^~ In file included from /opt/ros/noetic/include/ros/assert.h:35, from /opt/ros/noetic/include/ros/common.h:36, from /opt/ros/noetic/include/ros/publisher.h:32, from /opt/ros/noetic/include/ros/node_handle.h:32, from /home/walter/catkin_ws/src/Compliant-Control-and-Application/control_algorithms/impedance/include/impedance/Impedance.h:4, from /home/walter/catkin_ws/src/Compliant-Control-and-Application/control_algorithms/impedance/src/Impedance.cpp:1: /home/walter/catkin_ws/src/Compliant-Control-and-Application/control_algorithms/impedance/src/Impedance.cpp: In member function ‘void Impedance::command(const ConstPtr&)’: /home/walter/catkin_ws/src/Compliant-Control-and-Application/control_algorithms/impedance/src/Impedance.cpp:227:18: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 8 has type ‘unsigned int’ [-Wformat=]

"

i have no idea.

MingshanHe commented 1 year ago

Did you clean the files which are generated by catkin make? I hope you can run catkin clean if you have not cleaned it yet.

ZZWang21 commented 1 year ago

Did you clean the files which are generated by catkin make? I hope you can run catkin clean if you have not cleaned it yet.

I used catkin clean and re-do the catkin_make. the error is still there: " 0%] Building CXX object robotiq_85_gripper/robotiq_85_simulation/roboticsgroup_gazebo_plugins/CMakeFiles/roboticsgroup_gazebo_disable_link_plugin.dir/src/disable_link_plugin.cpp.o In file included from /home/walter/catkin_ws/src/Compliant-Control-and-Application/control_strategy/src/control_strategy/control_strategy.cpp:1: /home/walter/catkin_ws/src/Compliant-Control-and-Application/control_strategy/include/control_strategy/control_strategy.h:11:10: fatal error: cartesian_state_msgs/PoseTwist.h: No such file or directory 11 | #include "cartesian_state_msgs/PoseTwist.h" | ^~~~~~~~~~ compilation terminated. make[2]: [Compliant-Control-and-Application/control_strategy/CMakeFiles/control_strategy.dir/build.make:63: Compliant-Control-and-Application/control_strategy/CMakeFiles/control_strategy.dir/src/control_strategy/control_strategy.cpp.o] Error 1 make[1]: [CMakeFiles/Makefile2:9283: Compliant-Control-and-Application/control_strategy/CMakeFiles/control_strategy.dir/all] Error 2 make[1]: Waiting for unfinished jobs.... [ 0%] Linking CXX shared library /home/walter/catkin_ws/devel/lib/libfilter.so [ 0%] Built target filter [ 0%] Linking CXX shared library /home/walter/catkin_ws/devel/lib/liblogger.so [ 0%] Built target logger [ 0%] Linking CXX shared library /home/walter/catkin_ws/devel/lib/libroboticsgroup_gazebo_disable_link_plugin.so [ 0%] Built target roboticsgroup_gazebo_disable_link_plugin make: [Makefile:141: all] Error 2 Invoking "make -j4 -l4" failed "

and according to the #6 , i have created the PoseTwist.h file. But the error is still there.

should I move the file to somewhere or?

Thanks.

MingshanHe commented 1 year ago

Actually, I don't know what's wrong with this. But you could strictly refer to that issue, who has successfully compiled

ZZWang21 commented 1 year ago

I am using ROS Noetic, and using the noetic devel, used catkin build to compile, still errors. I am not sure how they did it..

ZZWang21 commented 1 year ago

sorry, i am using ROS NOETIC in VMWare and I tried noetic and sim-devel branch, but both failed when compiling. even with PoseTwist.h file. I tried both catkin_make and catkin build, but both failed. when catkin_make, there is no PoseTwist.h, even with the file in folder. When catkin build, it cannot recognise Matrix "‘Matrix’ does not name a type", I have upgraded eigen3 library, but error is still. I am not sure why. I do not want to reinstall Linux. Sigh.

MingshanHe commented 1 year ago

Actually, the error is not related to VMWare. When I tried to develop this project in the kinetic, melodic, and noetic versions, I used VMWare. I think this project needs someone who has experience with ROS and Ubuntu to cover the compiling error. I hope you could get some help from your research members or others.

MingshanHe commented 1 year ago

我已经在仿真环境下维护了导纳控制,请尝试运行,谢谢对本项目的关注 I have update this repo, please test in your environment if it is possible