常用命令
安装过程可能遇到的问题:
解决方案E: Unable to locate package ros-kinetic-rgbd-launch
roslaunch astra_camera astra.launch
rosrun camera_calibration cameracalibrator.py --size 12x9 --square 0.020 image:=/image_raw camera:=/camera --no-service-check
乐视体感astra pro深度摄像头在ros系统获取 深度图像 彩色图像 无色彩点云数据 彩色点云数据
1.Pull the repository into your ROS workspace
/catkin_ws/src
git clone https://github.com/orbbec/ros_astra_camera
Create astra udev rule
roscd astra_camera
./scripts/create_udev_rules
Go to catkin workspace and compile astra_camera
/catkin_ws
catkin_make --pkg astra_camera
若:
Could not find a package configuration file provided by "libuvc" with any of the following names:
libuvcConfig.cmake
libuvc-config.cmake
安装解决之:
sudo apt-get install ros-kinetic-uvc-camera
发布压缩图像话题需要安装插件:
sudo apt-get install ros-kinetic-image-*
2.无法打开摄像头解决方法
[ INFO] [1485844378.430540517]: No matching device found.... waiting for devices. Reason: astra_wrapper::AstraDevice::AstraDevice(const string&) @ /home/dwikyerl/catkin_ws/src/ros_astra_camera/src/astra_device.cpp @ 76 : Device open failed
Could not open "2bc5/0401@3/6": Failed to set USB interface!
之前在两个x64的ubuntu下使用很正常,不知道nano上是为什么报错;
突然想起来好像没写udev/rules.d,就赶紧写了一下:
cd /etc/udev/rules.d/ sudo gedit 56-orbbec.rules
复制下面内容进去:
SUBSYSTEM=="usb", ATTR{idProduct}=="0400", ATTR{idVendor}=="2bc5", MODE:="0666", OWNER:="root", GROUP:="video"
SUBSYSTEM=="usb", ATTR{idProduct}=="0401", ATTR{idVendor}=="2bc5", MODE:="0666", OWNER:="root", GROUP:="video"
SUBSYSTEM=="usb", ATTR{idProduct}=="0402", ATTR{idVendor}=="2bc5", MODE:="0666", OWNER:="root", GROUP:="video"
SUBSYSTEM=="usb", ATTR{idProduct}=="0403", ATTR{idVendor}=="2bc5", MODE:="0666", OWNER:="root", GROUP:="video"
SUBSYSTEM=="usb", ATTR{idProduct}=="0404", ATTR{idVendor}=="2bc5", MODE:="0666", OWNER:="root", GROUP:="video"
SUBSYSTEM=="usb", ATTR{idProduct}=="0405", ATTR{idVendor}=="2bc5", MODE:="0666", OWNER:="root", GROUP:="video"
SUBSYSTEM=="usb", ATTR{idProduct}=="0406", ATTR{idVendor}=="2bc5", MODE:="0666", OWNER:="root", GROUP:="video"
SUBSYSTEM=="usb", ATTR{idProduct}=="0407", ATTR{idVendor}=="2bc5", MODE:="0666", OWNER:="root", GROUP:="video"
SUBSYSTEM=="usb", ATTR{idProduct}=="0408", ATTR{idVendor}=="2bc5", MODE:="0666", OWNER:="root", GROUP:="video"
SUBSYSTEM=="usb", ATTR{idProduct}=="0409", ATTR{idVendor}=="2bc5", MODE:="0666", OWNER:="root", GROUP:="video"
SUBSYSTEM=="usb", ATTR{idProduct}=="040a", ATTR{idVendor}=="2bc5", MODE:="0666", OWNER:="root", GROUP:="video"
写完突然又发现openni没安装,赶紧
sudo apt-get install ros-kinetic-openni-*
和
sudo apt-get install ros-kinetic-opnenni2-*
再次驱动astra就没问题了!
重启udev
sudo service udev reload
sudo service udev restart
重插底盘和乐视的USB线
启用环境
source /opt/ros/kinetic/setup.bash
没有彩色图像
sudo apt-get install ros-kinetic-uvc-camera
sudo apt-get install ros-melodic-uvc-camera
sudo apt-get install v4l-utils
sudo v4l2-ctl --list-devices
Astra Pro FHD Camera (usb-fe3c0000.usb-1.3.2):
/dev/video10
/dev/video11
/dev/v4l-subdev3
/dev/v4l-subdev2
/dev/v4l-subdev1
/dev/v4l-subdev0
</include>
<include file="$(find astra_camera)/launch/uvc.launch">
</include>
astra.launch包含uvc
</include>
<include file="$(find astra_camera)/launch/uvc.launch">
</include>
uvc.launch内容
<launch>
<node pkg="uvc_camera" type="uvc_camera_node" name="uvc_camera" output="screen">
<param name="device" type="string" value="/dev/video1" />
<param name="width" type="int" value="640" />
<param name="height" type="int" value="480" />
<param name="fps" type="int" value="30" />
<param name="frame_id" type="string" value="camera_rgb_optical_frame" />
</node>
</launch>
sudo apt-get install ros-kinetic-astra-camera
sudo apt-get install ros-kinetic-astra-launch
sudo apt-get install ros-kinetic-libuvc-*
sudo apt-get install ros-kinetic-openni2-camera
sudo apt-get install ros-kinetic-rgbd-launch
melodic安装使用
UBUNTU18.04+ROS-MELODIC (包括UBUNTU16.04+ROS-KINETIC)乐视奥比中光相机在NANO、TX2、PC等设备上的安装与使用,并解决无法显示RGB信息的问题
ORB-SLAM安装使用
安装问题
No rule to make target '/home/tarmy/work/buding/Pangolin/build/src/libpangolin.so', needed by '../lib/libORB_SLAM2.so'. Stop.
解决:sudo make install即可
问题:
Building ROS nodes
mkdir: cannot create directory ‘build’: File exists
[rosbuild] Building package ORB_SLAM2
[rosbuild] Error from directory check: /opt/ros/kinetic/share/ros/core/rosbuild/bin/check_same_directories.py /home/nvidia/ORBSLAM2/ORB_SLAM2/Examples/ROS/ORB_SLAM2
1
Traceback (most recent call last):
File “/opt/ros/kinetic/share/ros/core/rosbuild/bin/check_same_directories.py”, line 46, in
raise Exception
Exception
CMake Error at /opt/ros/kinetic/share/ros/core/rosbuild/private.cmake:102 (message):
[rosbuild] rospack found package “ORB_SLAM2” at “”, but the current
directory is “/home/nvidia/ORBSLAM2/ORB_SLAM2/Examples/ROS/ORB_SLAM2”. You
should double-check your ROS_PACKAGE_PATH to ensure that packages are found
in the correct precedence order.
Call Stack (most recent call first):
/opt/ros/kinetic/share/ros/core/rosbuild/public.cmake:177 (_rosbuild_check_package_location)
CMakeLists.txt:4 (rosbuild_init)
– Configuring incomplete, errors occurred!
See also “/home/nvidia/ORBSLAM2/ORB_SLAM2/Examples/ROS/ORB_SLAM2/build/CMakeFiles/CMakeOutput.log”.
make: *** No targets specified and no makefile found. Stop.
问题2:
sudo ln -s /home/tarmy/ros/fsb/catkin_orb2/src/ORB_SLAM2/Examples/ROS/ORB_SLAM2 /opt/ros/kinetic/share/ORB_SLAM2
解决2:
ORB_SLAM2编译出现问题
ros标定乐视双目
方法:kalibr
Kalibr supports the following projection models:
pinhole camera model (pinhole)
(intrinsics vector: [fu fv pu pv])
标定步骤
2.rosrun kalibr kalibr_calibrate_cameras --bag /home/tarmy/work/tools/catkin_kalibr/result/camera_calib1.bag --topics /left --models pinhole-radtan --target ~/work/tools/april_6x6_50x50cm.yaml