配置
参考 website
添加相机
- 在
px4/launch 中找mavros_posix_sitl.launch - 拷贝一份作备份
- 修改如下
<arg name="est" default="ekf2"/>
<arg name="vehicle" default="iris"/>
<arg name="my_camera" default="iris_fpv_cam"/>
<arg name="world" default="$(find mavlink_sitl_gazebo)/worlds/empty.world"/>
<arg name="sdf" default="$(find mavlink_sitl_gazebo)/models/$(arg my_camera)/$(arg my_camera).sdf"/>
运行
双目时,我用的:
$ rosrun ORB_SLAM2 Stereo
~/catkin_ws/src/ORB_SLAM2/Vocabulary/ORBvoc.txt
~/catkin_ws/src/ORB_SLAM2/Examples/Stereo/px4_sitl.yaml true
/camera/left/image_raw:=/stereo/left/image_raw
/camera/right/image_raw:=/stereo/right/image_raw
/orbslam2/vision_pose/pose:=/mavros/vision_pose/pose
但是单目用类似的一直报错,直到我删掉了true:
$ rosrun ORB_SLAM2 Mono
~/catkin_ws/src/ORB_SLAM2/Vocabulary/ORBvoc.txt ~/catkin_ws/src/ORB_SLAM2/Examples/Monocular/px4_sitl.yaml
/camera/image_raw:=/iris/usb_cam/image_raw
/orbslam2/vision_pose/pose:=/mavros/vision_pose/pose
特征点较少,初始化失败;
|