Plus Camera User Manual
1.Installing the ROS SDK
Tips:
- Currently only supported on Linux platform.
- We recommend that users install the Kinetic(ubuntu , debian) or Melodi(ubuntu , debian) versions of ROS
- Not adapted for Noetic
- Windows platform is currently not supported
- ROS2 is currently not supported
- Although ROS can run the version of Indigo, we do not recommend that you install the Indigo version ,as Ubuntu Linux 14.04 reaches the end of its five-year LTS window on April 30th 2019 and will no longer be supported by the vendor (Canonical). This means that this version of Ubuntu will no longer receive security patches or other software updates.This could lead to unexpected version compatibility issues with ROS for subsequent ubuntu 14.04 upgrades of dependent packages.
Before installing the ROS SDK, please make sure you have ROS installed.
Click ROS-Installation-Guide, go to the
ROS-Wiki
website and download the corresponding ROS version for your Linux platform:
Indigo --- linux 14.04Kinetic --- linux 16.04
Melodic --- linux 18.04
After successful installation of ROS, you will need to install the relevant ros dependencies:
> sudo apt install ros-$ROS_DISTRO-rgbd-launch
> sudo apt install ros-$ROS_DISTRO-libuvc ros-$ROS_DISTRO-libuvc-camera ros-$ROS_DISTRO-libuvc-ros
Note: If you are using the linux 14.04, it is not recommended to install the libuvc
library that comes with ROS, please refer to 3.Problems Q&A
In order to store and compile the ROS SDK files, you need to create a workspace:
> mkdir -p ~/catkin_ws/src
> cd ~/catkin_ws/
> catkin_make
> source /devel/setup.bash
Then, you need to download the ROS SDK file package.
There are two ways to download:
- Download Files From Github
Open a terminal in Linux and run the following command:
> cd ~/catkin_ws/src > git clone https://github.com/orbbec/ros_astra_camera
- Download files from Baidu Cloud
Download link: Orbbec ROS SDK
Extraction code : kpqvFollow the prompts to install Baidu Cloud.(It will be faster to download the installation package in deb package format)
Then extract the downloaded ROS SDK package to the src folder in the workspace:
ROS SDK folder --> SDK --> 20220616 --> Open the ROS SDK zip file --> Extract ros_astra_camera file package to
~/catkin_ws/src/
After downloading the SDK,since the ~/catkin_ws
file permissions belong only to the root user, you also need to change the file permissions:
> cd ~/catkin_ws
> sudo chmod 777 * -R
Build your package with the catkin_make --pkg
command:
> cd ~/catkin_ws
> catkin_make --pkg astra_camera
If the terminal displays the following information, then your ROS SDK has been successfully installed:
2.Use of the ROS SDK
You can run the ROS SDK by running the following command in the terminal:
> roslaunch astra_camera astraplus.launch
You can use the Rviz visualization tool to view the images captured by the camera.
Open a new terminal and run the following command:
> rviz
If your rviz graphical interface does not have the camera windows, then you need to add them manually : Click the Add
button in the bottom left corner and a little box will appear,choose Image
in it, and then click OK
.
After successfully adding,you must make some necessary adjustments so that the picture will show in the Image
window.Locate the Image
in the sidebar and click it,uncheck the Visibility
checkbox and set the image topic to /camera/rgb/image_raw
or /camera/depth/image_raw
.
Note: If your image window displays an all-black image and the Camera Status
is Warn
or Error
, please click Status
to see the Camera Info
.
Generally, if it shows "No image received"
or "For frame[xxx]:Fixed Frame [map] does not exist"
.
Then you need to set the Fixed Frame
in Global Options
according to the Camera Info
:
If you want to change some of the camera settings, you can refer to the following tutorial:
1. Change the resolution
Method 1: Change the relevant parameter of the ROS parameter server, which can be used for ROS parameter debugging.(We hope to change the parameters in the parameter server for debugging the robot, and we don't want to restart the relevant nodes every time we change the parameters, which is time-consuming and troublesome.)
Note: When you restart the command box, or when the camera is turned back on,you will need to reconfigure the parameter server with the following command:
rosrun rqt_reconfigure rqt_reconfigure
Launch the astraplus camera node:
roslaunch astra_camera astraplus.launch
Start the parameter server again:
rosrun rqt_reconfigure rqt_reconfigure
In the parameter server, under camera/driver/, set depth_mode to 640400_30H(13)
- Start RViz visualizer, add
rviz/image
, set topic to/camera/depth/image_raw
to display depth map:Method 1: Set up the parameter server with the rosparam command.
- Start the launch file first.
- List the parameters in the parameter server with the
rosparam list
command.- Initialize the array in conjunction with the resolution values of output_mode_enum in Astra.cfg.
Add the following code at the end of the launch file(to set the depth map resolution to 640x400):
<rosparam>
/camera/driver/depth_mode: 13
</rosparam>
Restart the launch file and see the adjusted depth map in the rviz visualizer.
Method 3: Modify the resolution of the camera in the Astra.cfg file:
Note: After modifying the cfg file, you need to rebuild the workspace with the
catkin_make
command in order to take effect.
- Open the Astra.cfg file, path:
ros_astra_camera\cfg\Astra.cfg
- Look for
"depth_mode"
in the file and modify the value corresponding to 640x400 in gen.add as follows (the default depth resolution of Astra.cfg is VGA)gen.add("depth_mode", int_t, 0, "Video mode for depth camera", 8, 1, 17, edit_method = output_mode_enum)
- Rebuild the workspace with the
catkin_make
command.- Restart the launch file and the resolution will be 640x400.
2. Reduce the frame rate by modifying the parameters of the software layer.
In the
/src/astra_driver.cpp
file
- 1.Change the value of dataskip in AstraDriver::configb to 3(dataskip = 3), then the FPS is reduced to 10
- 2.Rebuild the workspace with the
catkin_make
command.- 3.running > rostopic hz /camera/depth/points
3. Using Multi-Camera
1: Access the camera and get the camera series number(serial number)
- Start the camera lanuch file (here is the example of the astra camera)
- In the workspace, list the services with the
"rosservice list"
command, find"camera/get_serial"
, and execute this service to get the corresponding serial number.As shown above, the camera series numbers we obtained are : 17121830167
Similarly, we can get other camera series numbers.
2: Modify the multi-camera launch file
Routine launch: Two astra[Extraction code : 7ao0]
3.Problems Q&A
1.Terminal displays libOpenNI2.so: undefined reference to CXXABI\_1.3.8
error message.
Cause: CXXABI\ 1.3.8 error, since the system gcc version is too low, you can check the gcc version,and upgrade it to 5.5
Solution: Upgrade gcc 4.8 to gcc 5.x
> sudo add-apt-repository ppa:ubuntu-toolchain-r/test
> sudo apt-get update
Install dependent packages :
> sudo apt-get install gcc-5 g++-5
> sudo ln -s /usr/bin/gcc-5 /usr/bin/gcc -f
> sudo ln -s /usr/bin/g++-5 /usr/bin/g++ -f
> sudo apt-get install software-properties-common (required only if you get an error while running the above command)
2.ubuntu 14.04 system prompts error message about libuv
when building:
This is caused by running the following command, because the libuvc library that comes with ROS on ubuntu 14.04 is old and the interface is not updated, so the source file cannot find the libuvc interface used.
ros-$ROS_DISTRO-libuvc ros-$ROS_DISTRO-libuvc-camera ros-$ROS_DISTRO-libuvc-ros
Solution:
Find out if the libuvc library is installed on your system:
dpkg -l | grep libuvc
Uninstall the existing
libuvc
:
sudo apt-get remove ros-indigo-libuvc*
Download the latest source file of
libuvc
and install it:
> cd ~
> git clone https://github.com/ktossell/libuvc
> cd libuvc
> mkdir build
> cd build
> cmake ..
> make && sudo make install
3.The terminal displays the Permission denied
message.(Astra.cfg or UVCCamera.cfg)
Solution : Change the astra.cfg file permission (depending on the path where the file is located).
> cd ~/catkin_ws
> chmod 777 -R /src/ros_astra_camera-master/cfg
4.The terminal shows that the package related to 'gstremaer' was not found
Solution : Reinstall the gstreamer module.
> sudo apt-get install libgstremaer*k0