Create BaxterRobot.h and BaxterRobot.cpp but compile error #15
Replies: 1 comment
-
cmakelists error,i have solved it. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I want to create BaxterRobot.h BaxterRobot.cpp for my project.At the begining, I put them in a folder /usr/include/dqrobotics/robots/ and /usr/src/dqrobotics/robots.But I could not find the CmakeLists.txt for dqrobotics,So this can't work.So in the second try,I put them in my personal workspace folder /baxter/src/baxter_noetic/baxter_test/include and /baxter/src/baxter_noetic/baxter_test/src,but I encountered some errors while compiling.Below is the error and source code.Can anyone make some suggestions, thank you very much.
/usr/bin/ld: CMakeFiles/BaxterRobot.dir/src/BaxterRobot.cpp.o: in function
BaxterRobot::kinematics()': BaxterRobot.cpp:(.text+0x53d): undefined reference to
DQ_robotics::DQ_SerialManipulatorDH::DQ_SerialManipulatorDH(Eigen::Matrix<double, -1, -1, 0, -1, -1> const&)'/usr/bin/ld: CMakeFiles/BaxterRobot.dir/src/BaxterRobot.cpp.o: in function
__static_initialization_and_destruction_0(int, int)': BaxterRobot.cpp:(.text+0x6ae): undefined reference to
DQ_robotics::DQ::DQ(double const&, double const&, double const&, double const&, double const&, double const&, double const&, double const&)'/usr/bin/ld: BaxterRobot.cpp:(.text+0x73a): undefined reference to
DQ_robotics::DQ::DQ(double const&, double const&, double const&, double const&, double const&, double const&, double const&, double const&)' /usr/bin/ld: BaxterRobot.cpp:(.text+0x7c6): undefined reference to
DQ_robotics::DQ::DQ(double const&, double const&, double const&, double const&, double const&, double const&, double const&, double const&)'/usr/bin/ld: BaxterRobot.cpp:(.text+0x852): undefined reference to `DQ_robotics::DQ::DQ(double const&, double const&, double const&, double const&, double const&, double const&, double const&, double const&)'
collect2: error: ld returned 1 exit status
make[2]: *** [baxter_noetic/baxter_test/CMakeFiles/BaxterRobot.dir/build.make:183:/home/ris/baxter_ws/devel/lib/baxter_test/BaxterRobot] 错误 1
make[1]: *** [CMakeFiles/Makefile2:6741:baxter_noetic/baxter_test/CMakeFiles/BaxterRobot.dir/all] 错误 2
make: *** [Makefile:141:all] 错误 2
#ifndef DQ_ROBOTS_BAXTERROBOT_H
#define DQ_ROBOTS_BAXTERROBOT_H
#include <dqrobotics/robot_modeling/DQ_SerialManipulatorDH.h>
using namespace DQ_robotics;
class BaxterRobot
{
public:
static DQ_SerialManipulatorDH kinematics();
};
#endif
#ifndef DQ_ROBOTICS_BAXTER_DH_H
#define DQ_ROBOTICS_BAXTER_DH_H
#include <baxter_test/BaxterRobot.h>
#include <dqrobotics/utils/DQ_Constants.h>
DQ_SerialManipulatorDH BaxterRobot::kinematics()
{
const double pi2 = pi/2.0;
const double endeffector_z = 0.229525;
};
int main()
{
return 0;
}
#endif
Beta Was this translation helpful? Give feedback.
All reactions