mzy8329 / gazebo_crp450

二轴飞行机械臂Crp450 gazebo仿真环境
0 stars 0 forks source link

在编译时报错 #1

Open wch1234567890 opened 1 month ago

wch1234567890 commented 1 month ago

/home/ros/catkin_ws/src/gazebo_crp450/plugins/joint_plugin.cc: In member function ‘void gazebo::JointPlugin::OnTorqueMsg(const Float32ConstPtr&)’: /home/ros/catkin_ws/src/gazebo_crp450/plugins/joint_plugin.cc:129:39: error: ‘class gazebo::physics::JointController’ has no member named ‘SetForce’; did you mean ‘GetForces’? this->model->GetJointController()->SetForce(joint_name_gz, _msg->data); ^~~~ GetForces gazebo_crp450/CMakeFiles/joint_plugin.dir/build.make:62: recipe for target 'gazebo_crp450/CMakeFiles/joint_plugin.dir/plugins/joint_plugin.cc.o' failed make[2]: [gazebo_crp450/CMakeFiles/joint_plugin.dir/plugins/joint_plugin.cc.o] Error 1 CMakeFiles/Makefile2:2730: recipe for target 'gazebo_crp450/CMakeFiles/joint_plugin.dir/all' failed make[1]: [gazebo_crp450/CMakeFiles/joint_plugin.dir/all] Error 2 Makefile:140: recipe for target 'all' failed make: *** [all] Error 2 Invoking "make -j2 -l2" failed 请问该如何解决

mzy8329 commented 1 month ago

看起来像是gazebo版本不一致,我用的是gazebo11发自我的 iPhone在 2024年5月20日,16:21,wch1234567890 @.> 写道: /home/ros/catkin_ws/src/gazebo_crp450/plugins/joint_plugin.cc: In member function ‘void gazebo::JointPlugin::OnTorqueMsg(const Float32ConstPtr&)’: /home/ros/catkin_ws/src/gazebo_crp450/plugins/joint_plugin.cc:129:39: error: ‘class gazebo::physics::JointController’ has no member named ‘SetForce’; did you mean ‘GetForces’? this->model->GetJointController()->SetForce(joint_name_gz, _msg->data); ^~~~ GetForces gazebo_crp450/CMakeFiles/joint_plugin.dir/build.make:62: recipe for target 'gazebo_crp450/CMakeFiles/joint_plugin.dir/plugins/joint_plugin.cc.o' failed make[2]: [gazebo_crp450/CMakeFiles/joint_plugin.dir/plugins/joint_plugin.cc.o] Error 1 CMakeFiles/Makefile2:2730: recipe for target 'gazebo_crp450/CMakeFiles/joint_plugin.dir/all' failed make[1]: [gazebo_crp450/CMakeFiles/joint_plugin.dir/all] Error 2 Makefile:140: recipe for target 'all' failed make: [all] Error 2 Invoking "make -j2 -l2" failed 请问该如何解决

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you are subscribed to this thread.Message ID: @.***>