qiayuanl / cheetah_ros

ros-control interface and basic controllers for quadruped robot
41 stars 11 forks source link

cannot find -lunitree_legged_sdk_amd64 #1

Closed HystericalHilb closed 2 years ago

HystericalHilb commented 2 years ago

Errors << unitree_hw:make /home/hilb/Documents/catkin_ws/logs/unitree_hw/build.make.000.log
/usr/bin/ld: cannot find -lunitree_legged_sdk_amd64 collect2: error: ld returned 1 exit status make[2]: [/home/hilb/Documents/catkin_ws/devel/.private/unitree_hw/lib/unitree_hw/unitree_hw] Error 1 make[1]: [CMakeFiles/unitree_hw.dir/all] Error 2 make: *** [all] Error 2 cd /home/hilb/Documents/catkin_ws/build/unitree_hw; catkin build --get-env unitree_hw | catkin env -si /usr/bin/make --jobserver-fds=6,7 -j; cd - .................................................................................................................................................................................................................. Failed << unitree_hw:make [ Exited with code 2 ]
Failed <<< unitree_hw [ 5.2 seconds ]
Abandoned <<< cheetah_mpc_controllers [ Unrelated job failed ]

qiayuanl commented 2 years ago

You need download unitree_legged_sdk_amd64. I will document it in the future.

HystericalHilb commented 2 years ago

thanks, actually I have installed the unitree_legged_sdk, it has a "lib" directory and I add libunitree_legged_sdk_amd64.so and  libunitree_legged_sdk_arm64.so in env_var, but it's not ok ------------------ 原始邮件 ------------------ 发件人: "qiayuanliao/cheetah_ros" @.>; 发送时间: 2022年3月19日(星期六) 下午3:44 @.>; @.**@.>; 主题: Re: [qiayuanliao/cheetah_ros] cannot find -lunitree_legged_sdk_amd64 (Issue #1)

You need download unitree_legged_sdk_amd64. I will document it in the future.

— Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android. You are receiving this because you authored the thread.Message ID: @.***>

qiayuanl commented 2 years ago

You should copy the unitree_legged_sdk into the unitree_ros/lib directly. Well... it seems strange, but unitree_legged_sdk doesn't provide an install interface officially, and different types of robots use different SDK versions. Please let me know if you have any better ideas.

HystericalHilb commented 2 years ago

you mean that I should install the unitree_ros. I will write the way I build your code, and I hope you can get the file how to install and build. thanks

------------------ 原始邮件 ------------------ 发件人: "qiayuanliao/cheetah_ros" @.>; 发送时间: 2022年3月20日(星期天) 凌晨0:52 @.>; @.**@.>; 主题: Re: [qiayuanliao/cheetah_ros] cannot find -lunitree_legged_sdk_amd64 (Issue #1)

You should copy the unitree_legged_sdk into the unitree_ros/lib directly

— Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android. You are receiving this because you authored the thread.Message ID: @.***>

qiayuanl commented 2 years ago

you mean that I should install the unitree_ros

Unitree's official unitree_ros don't have an "install" option. So I'm not quite sure what installation you are referring to? My file tree of unitree_hw is shown below. Hope it helps you.

unitree_hw
├── CMakeLists.txt
├── config
│   └── default.yaml
├── include
│   ├── unitree_hw
│   │   ├── control_loop.h
│   │   └── hardware_interface.h
│   └── unitree_legged_sdk
│       ├── comm.h
│       ├── quadruped.h
│       ├── safety.h
│       └── udp.h
├── launch
│   └── unitree_hw.launch
├── lib
│   └── libunitree_legged_sdk_amd64.so
├── package.xml
└── src
    ├── control_loop.cpp
    ├── hardware_interface.cpp
    └── unitree_hw.cpp
HystericalHilb commented 2 years ago

I copy the libunitree_legged_sdk_amd64.so into the lib dir, it does work. but I meet the problems as following here I think it's the c++ and ros version... , i use the ros-melodic in ubuntu18

------------------ 原始邮件 ------------------ 发件人: "qiayuanliao/cheetah_ros" @.>; 发送时间: 2022年3月20日(星期天) 下午2:59 @.>; @.**@.>; 主题: Re: [qiayuanliao/cheetah_ros] cannot find -lunitree_legged_sdk_amd64 (Issue #1)

you mean that I should install the unitree_ros

Unitree's official unitree_ros don't have an "install" option. So I'm not quite sure what installation you are referring to? My file tree of unitree_hw is shown below. Hope it helps you. unitree_hw ├── CMakeLists.txt ├── config │   └── default.yaml ├── include │   ├── unitree_hw │   │   ├── control_loop.h │   │   └── hardware_interface.h │   └── unitree_legged_sdk │   ├── comm.h │   ├── quadruped.h │   ├── safety.h │   └── udp.h ├── launch │   └── unitree_hw.launch ├── lib │   └── libunitree_legged_sdk_amd64.so ├── package.xml └── src ├── control_loop.cpp ├── hardware_interface.cpp └── unitree_hw.cpp
— Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android. You are receiving this because you authored the thread.Message ID: @.***>

HystericalHilb commented 2 years ago

Now I meet this problem, I tried to address it, but not fine

Scanning dependencies of target cheetah_mpc_controllers [ 85%] Building CXX object cheetah_ros/cheetah_mpc_controllers/CMakeFiles/cheetah_mpc_controllers.dir/src/mpc_formulation.cpp.o [ 89%] Building CXX object cheetah_ros/cheetah_mpc_controllers/CMakeFiles/cheetah_mpc_controllers.dir/src/mpc_controller.cpp.o [ 89%] Building CXX object cheetah_ros/cheetah_mpc_controllers/CMakeFiles/cheetah_mpc_controllers.dir/src/locomotion.cpp.o [ 91%] Linking CXX shared library /home/regins/Documents/catkin_ws/devel/lib/libcheetah_mpc_controllers.so /usr/bin/ld: /opt/ros/noetic/lib/libqpOASES.a(QProblem.cpp.o): relocation R_X86_64_PC32 against symbol `_ZNK7qpOASES8QProblem5getNZEv' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: final link failed: bad value collect2: error: ld returned 1 exit status make[2]: *** [cheetah_ros/cheetah_mpc_controllers/CMakeFiles/cheetah_mpc_controllers.dir/build.make:148: /home/regins/Documents/catkin_ws/devel/lib/libcheetah_mpc_controllers.so] Error 1

------------------ 原始邮件 ------------------ 发件人: "qiayuanliao/cheetah_ros" @.>; 发送时间: 2022年3月20日(星期天) 下午2:59 @.>; @.**@.>; 主题: Re: [qiayuanliao/cheetah_ros] cannot find -lunitree_legged_sdk_amd64 (Issue #1)

you mean that I should install the unitree_ros

Unitree's official unitree_ros don't have an "install" option. So I'm not quite sure what installation you are referring to? My file tree of unitree_hw is shown below. Hope it helps you. unitree_hw ├── CMakeLists.txt ├── config │   └── default.yaml ├── include │   ├── unitree_hw │   │   ├── control_loop.h │   │   └── hardware_interface.h │   └── unitree_legged_sdk │   ├── comm.h │   ├── quadruped.h │   ├── safety.h │   └── udp.h ├── launch │   └── unitree_hw.launch ├── lib │   └── libunitree_legged_sdk_amd64.so ├── package.xml └── src ├── control_loop.cpp ├── hardware_interface.cpp └── unitree_hw.cpp
— Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android. You are receiving this because you authored the thread.Message ID: @.***>

HystericalHilb commented 2 years ago

I address this with compiling the qpQASES and adding "add_compile_options(-fPIC)". then, I put the "libqpOASES.a" into /opt/ros/neotic/lib

------------------ 原始邮件 ------------------ 发件人: "起床困难户" @.>; 发送时间: 2022年3月20日(星期天) 晚上7:54 @.>;

主题: 回复: [qiayuanliao/cheetah_ros] cannot find -lunitree_legged_sdk_amd64 (Issue #1)

Now I meet this problem, I tried to address it, but not fine

Scanning dependencies of target cheetah_mpc_controllers [ 85%] Building CXX object cheetah_ros/cheetah_mpc_controllers/CMakeFiles/cheetah_mpc_controllers.dir/src/mpc_formulation.cpp.o [ 89%] Building CXX object cheetah_ros/cheetah_mpc_controllers/CMakeFiles/cheetah_mpc_controllers.dir/src/mpc_controller.cpp.o [ 89%] Building CXX object cheetah_ros/cheetah_mpc_controllers/CMakeFiles/cheetah_mpc_controllers.dir/src/locomotion.cpp.o [ 91%] Linking CXX shared library /home/regins/Documents/catkin_ws/devel/lib/libcheetah_mpc_controllers.so /usr/bin/ld: /opt/ros/noetic/lib/libqpOASES.a(QProblem.cpp.o): relocation R_X86_64_PC32 against symbol `_ZNK7qpOASES8QProblem5getNZEv' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: final link failed: bad value collect2: error: ld returned 1 exit status make[2]: *** [cheetah_ros/cheetah_mpc_controllers/CMakeFiles/cheetah_mpc_controllers.dir/build.make:148: /home/regins/Documents/catkin_ws/devel/lib/libcheetah_mpc_controllers.so] Error 1

------------------ 原始邮件 ------------------ 发件人: "qiayuanliao/cheetah_ros" @.>; 发送时间: 2022年3月20日(星期天) 下午2:59 @.>; @.**@.>; 主题: Re: [qiayuanliao/cheetah_ros] cannot find -lunitree_legged_sdk_amd64 (Issue #1)

you mean that I should install the unitree_ros

Unitree's official unitree_ros don't have an "install" option. So I'm not quite sure what installation you are referring to? My file tree of unitree_hw is shown below. Hope it helps you. unitree_hw ├── CMakeLists.txt ├── config │   └── default.yaml ├── include │   ├── unitree_hw │   │   ├── control_loop.h │   │   └── hardware_interface.h │   └── unitree_legged_sdk │   ├── comm.h │   ├── quadruped.h │   ├── safety.h │   └── udp.h ├── launch │   └── unitree_hw.launch ├── lib │   └── libunitree_legged_sdk_amd64.so ├── package.xml └── src ├── control_loop.cpp ├── hardware_interface.cpp └── unitree_hw.cpp
— Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android. You are receiving this because you authored the thread.Message ID: @.***>

qiayuanl commented 2 years ago

The qpQASES now is added as qpoases_catkin package, and will be automatically downloaded while loading CMakeList

qiayuanl commented 2 years ago

The v3.3.1 libunitree_legged_sdk_amd64 is uploaded.

qiayuanl commented 2 years ago

This repository is about to be archived, I will rewrite the code with ocs2.