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
310 stars 63 forks source link

'cartesian_state_msgs/PoseTwist.h' #6

Closed cuggx closed 2 years ago

cuggx commented 2 years ago

hello, the system has the following error after catkin_make. Can you tell me where can I find the 'cartesian_state_msgs/PoseTwist.h'? Thank you for your help.

In file included from /home/gaoxu/catkin_ws/src/Admittance-and-Application-simulation-devel/control_algorithm/hybrid_position_force_control/src/hybrid_position_force_control.cpp:8:0: /home/gaoxu/catkin_ws/src/Admittance-and-Application-simulation-devel/control_algorithm/hybrid_position_force_control/include/hybrid_position_force_control/hybrid_position_force_control.h:14:44: fatal error: cartesian_state_msgs/PoseTwist.h: 没有那个文件或目录 compilation terminated. Admittance-and-Application-simulation-devel/control_algorithm/hybrid_position_force_control/CMakeFiles/hybrid_position_force_control.dir/build.make:75: recipe for target 'Admittance-and-Application-simulation-devel/control_algorithm/hybrid_position_force_control/CMakeFiles/hybrid_position_force_control.dir/src/hybrid_position_force_control.cpp.o' failed make[2]: [Admittance-and-Application-simulation-devel/control_algorithm/hybrid_position_force_control/CMakeFiles/hybrid_position_force_control.dir/src/hybrid_position_force_control.cpp.o] Error 1 CMakeFiles/Makefile2:3049: recipe for target 'Admittance-and-Application-simulation-devel/control_algorithm/hybrid_position_force_control/CMakeFiles/hybrid_position_force_control.dir/all' failed make[1]: [Admittance-and-Application-simulation-devel/control_algorithm/hybrid_position_force_control/CMakeFiles/hybrid_position_force_control.dir/all] Error 2 Makefile:145: recipe for target 'all' failed make: *** [all] Error 2 Invoking "make -j2 -l2" failed

MingshanHe commented 2 years ago

you could try to source the workspace and build it again. I have written it in the cartesian_state_msgs folder exactly. But I don't know why the error exists in the build process.

cuggx commented 2 years ago

Could you offer PoseTwist.h ? I only found PoseTwist .msg

MingshanHe commented 2 years ago

I recommend you to search that how to use a self-definition ros_msg. I have added the msg file in the project and during the compile process, it will make a PoseTwist.h file autonomously.

cuggx commented 2 years ago

Okay I get it, thanks!!

TYUT-Sailor-Liu commented 2 years ago

MingshanHe,你好,还是没有明白您的意思,在melodic下,我直接catkin_make,提示相同的错误,是需要cmake、make等进行编译吗?(Compliant-Control-and-Application-sim-devel)

MingshanHe commented 2 years ago

First, I am sorry that I using English to reply because my PC has not installed any Chinese Language input. Then, you have the same compile error in the melodic version, exactly the PoseTwist.h. I hope you can source the workspace after compiling the project as source devel/setup.bash.

TYUT-Sailor-Liu commented 2 years ago

已经和作者取得联系,这里将我的编译方法贴在这里。

我的环境是:ubuntu18.04+ROS melodic,在此做Compliant-Control-and-Application-sim-devel 此分支的编译。

  1. cartesian_state_msgs文件夹中创建build文件夹;
  2. 进入此文件夹,打开终端,输入cmake..
  3. 输入make
  4. 在此路径下便能找到PoseTwist.h image
YuHoChau commented 2 years ago

noetic实测了一下这个问题应该是用catkin_make才会出现,用catkin build没有这个问题。

ZZWang21 commented 1 year ago

noetic实测了一下这个问题应该是用catkin_make才会出现,用catkin build没有这个问题。

After catkin build, another error came out:
"Errors << 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=] "

have you encountered error like this? @YuHoChau Thanks.

ZZWang21 commented 1 year ago

已经和作者取得联系,这里将我的编译方法贴在这里。

我的环境是:ubuntu18.04+ROS melodic,在此做Compliant-Control-and-Application-sim-devel 此分支的编译。

  1. cartesian_state_msgs文件夹中创建build文件夹;
  2. 进入此文件夹,打开终端,输入cmake..
  3. 输入make
  4. 在此路径下便能找到PoseTwist.h image

Followed this, I have created PoseTwist.h file, but the catkin_make failed again. Should I move the file or ? Thanks. @MingshanHe @YuHoChau