赞
踩
cd ORB_SLAM2
chmod +x build.sh
./build.sh
ORB_SLAM2
to catkin_ws/src
export ROS_PACKAGE_PATH=$ROS_PACKAGE_PATH:~/catkin_ws/src/ORB_SLAM2/Examples/ROS
to .bashrc
source ~/.bashrc
in file catkin_ws/src/ORB_SLAM2
chmod +x build_ros.sh
./build_ros.sh
遇到的BUG基本上找关键词然后在网上可以解决,也可以参考ORB SLAM2 configuration(with bugs fixed),我应该是遇到了比较多的bug
px4/launch
中找mavros_posix_sitl.launch
<!-- vehicle model and world -->
<arg name="est" default="ekf2"/>
<arg name="vehicle" default="iris"/>
<!-- add stereo camera for iris -->
<arg name="my_camera" default="iris_stereo_camera"/>
<arg name="world" default="$(find mavlink_sitl_gazebo)/worlds/empty.world"/>
<!-- also need to revise sdf -->
<arg name="sdf" default="$(find mavlink_sitl_gazebo)/models/$(arg my_camera)/$(arg my_camera).sdf"/>
<!-- <arg name="sdf" default="$(find mavlink_sitl_gazebo)/models/$(arg vehicle)/$(arg vehicle).sdf"/> -->
.gazebo/models
中删除stereo_camera
,因为默认先选这个,这里要用px4/tools/sitl_gazebo/models
里面的我在launch了mavros_posix_sitl.launch
后,使用rostopic list
命令,发现有:
/stereo/left/camera_info /stereo/left/image_raw /stereo/left/image_raw/compressed /stereo/left/image_raw/compressed/parameter_descriptions /stereo/left/image_raw/compressed/parameter_updates /stereo/left/image_raw/compressedDepth /stereo/left/image_raw/compressedDepth/parameter_descriptions /stereo/left/image_raw/compressedDepth/parameter_updates /stereo/left/image_raw/theora /stereo/left/image_raw/theora/parameter_descriptions /stereo/left/image_raw/theora/parameter_updates /stereo/left/parameter_descriptions /stereo/left/parameter_updates /stereo/right/camera_info /stereo/right/image_raw /stereo/right/image_raw/compressed /stereo/right/image_raw/compressed/parameter_descriptions /stereo/right/image_raw/compressed/parameter_updates /stereo/right/image_raw/compressedDepth /stereo/right/image_raw/compressedDepth/parameter_descriptions /stereo/right/image_raw/compressedDepth/parameter_updates /stereo/right/image_raw/theora /stereo/right/image_raw/theora/parameter_descriptions /stereo/right/image_raw/theora/parameter_updates /stereo/right/parameter_descriptions /stereo/right/parameter_updates
存在,于是构建对应的.sh
文件
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
结果如下:
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。