在DJI无人机上运行VINS-FUISON(PSDK 转 ROS)
安装ceres出现以下报错,将2版本的ceres换成1版本的ceres
CMake did not find one.Could not find a package configuration file provided by "absl" with any ofthe following names:abslConfig.cmakeabsl-config.cmakeAdd the installation prefix of "absl" to CMAKE_PREFIX_PATH or set"absl_DIR" to a directory containing one of the above files. If "absl"provides a separate development package or SDK, be sure it has beeninstalled.
衔接桥梁
dajiang SDK psdk
https://developer.dji.com/doc/payload-sdk-api-reference/cn/
psdk->ros2
https://github.com/umdlife/psdk_ros2
https://umdlife.github.io/psdk_ros2/api/library_root.html
ros2 <-> ros1
ros1_bridge
ROS 1 和 ROS 2 的环境变量不能同时写入 .bashrc 文件中,因为它们的环境变量会相互冲突=>>手动切换环境
sudo apt update
sudo apt install ros-galactic-ros1-bridge
https://blog.csdn.net/2302_80225397/article/details/141167175
标定
- IMU标定
IMU标定参考港科大imu_utils框架:https://blog.csdn.net/qq_35616298/article/details/116190164
要先下载code_util编译,再下载imu_utils
code_util可能出现opencv版本号不符合的报错,更换opencv写法
注意:当工作空间里面有非ros包时,要用catkin_make_isolated
,而非catkin_make
编译imu_utils出现以下报错,在mu_an.cpp加入#include <fstream>
的头文件
/home/liuchengyi/imuCali_ws/src/imu_utils/src/imu_an.cpp:90:19: error: aggregate ‘std::ofstream out_t’ has incomplete type and cannot be defined90 | std::ofstream out_t;
- screen是后台运行一个终端
查看所有后台的终端
screen -ls
关闭某个名为172199.pts-1.nvidia-desktop的终端
screen -X -S 172199.pts-1.nvidia-desktop quit
- 远程拷贝录制bag
scp 20250103_102425.bag liuchengyi@192.168.111.171:/home/liuchengyi/Desktop
- roscore端口占用
查看端口占用情况
sudo lsof -i :11311
终止占用端口的进程
sudo kill <PID>
# 1
screen
sudo sucd /home/nvidia/psdk_ros2
sh /home/nvidia/change_device_mode.sh source /opt/ros/galactic/setup.bash
source install/setup.bash
ros2 launch psdk_wrapper wrapper.launch.py # 2
screen
cd /home/nvidia/psdk_ros2
source /opt/ros/galactic/setup.bash
source install/setup.bash
ros2 service call /wrapper/psdk_ros2/start_perception psdk_interfaces/srv/PerceptionStereoVisionSetup \"{stereo_cameras_direction: 'FRONT', start_stop: true}"DATE_STR=$(date +%Y%m%d_%H%M%S)ros2 bag record -o outputs/$DATE_STR \/wrapper/psdk_ros2/acceleration_body_raw \/wrapper/psdk_ros2/angular_rate_body_raw \/wrapper/psdk_ros2/perception_stereo_left_stream \/wrapper/psdk_ros2/perception_stereo_right_stream ## ros2 bag to ros1
rosbags-convert outputs/$DATE_STR --dst $DATE_STR.bag