- Setup ROS2 & OpenNI SDK (Windows 11) No longer using
- Setup ROS & OpenNI SDK (WIN 11) Preferred
- How to take picture
- Integration of ROS depth camera & OpenCV
- Docker
- Issues
- Future Plans
- Author
- Download a VM of your choice (Oracle VirtualBox is used)
- Download Ubuntu 22.04 LTS Jammy Jellyfish iso image (so its compatible with ROS2 Humble)
- Setup the Ubuntu VM (at least 4GB RAM but 8GB is better, minimum 25GB storage, 4CPU, USB of depth cam need to be added)
- Once in Ubuntu, download ROS2 Humble following here (all commands are typed in terminal can press window key and search for it)
- Open firefox and go to here & scroll to the bottom under
Wrappers for OpenNI SDK
to download OpenNI SDK for ROS2 - After download the tar zip file, extract it & open the README.md. Follow the instructions in README.md. (
IMPORTANT
: Change everygalactic
word in the file tohumble
) - Halfway through you might run into an error with a command starting with
colcon
because its not installed. Follow the steps from here to download it. - At the end, you should see a program with black and white image
- Download VM
- Download Ubuntu 20
- Setup VM (Remember to add usb to vm)
- Follow steps from here to setup ROS here
- Follow steps from here to setup OpenNI here
- Depth camera works on zheng laptop left usb port(1)
- USB controller of VM is set to usb3.0 (has smoother video stream)
- This might need to be rerun everytime for it to detect the camera
roscd astra_camera ./scripts/create_udev_rules sudo udevadm control --reload && sudo udevadm trigger
- Use below command
rosservice call /camera/save_images "{}"
- Images are saved in
~/.ros/image
and are only available when the sensor is on. - xdg-open
- Replace with filename
- Installation not needed since all necessary dependencies are downloaded in
ros_astra_camera
package - Get into
Scripts
folder inros_astra_camera
cd ~/ros_ws/src/ros_astra_camera/scripts
- Create a python file
touch detect.py
- Paste code from detect.py file into your file in VM
gedit detect.py
- Save the file and give it execution permission
chmod +x detect.py
- Be sure to source these files on all the terminal before running Step 7-8
cd ~/ros_ws
source /opt/ros/noetic/setup.bash
source ~/ros_ws/devel/setup.bash
- To not do this for all terminal
gedit ~/.bashrc
- Copy below into the very bottom of the file and save
source /opt/ros/noetic/setup.bash source ~/ros_ws/devel/setup.bash
- Run the depth camera
roslaunch ros_astra_camera astra.launch
- Open a terminal and run
roscore
- Open another terminal and run
rosrun ros_astra_camera detect.py
- Download docker desktop from the site
- Follow instructions here
- vcxsrv X server is required to run gui through x11 forwarding in ssh, install
- Putty (optional)
Replace anything in <>
- Pull the docker image from dockerhub
docker pull shadowofskull/depth_cam:latest
- Run a container from the image
docker run -it -p 22:22 --name ros-x11-ex shadowofskull/depth_cam:latest
- To check container id
docker ps
- To add extra terminal
docker exec -it <container id> bash
- To rerun already created container use
docker start <container id>
- ros-noetic-perception=1.5.0-1*
- ros-noetic-ros-core=1.5.0-1*
- openssh-server
- sudo
- git
- vim
- gedit
- cmake
- make
- ros-noetic-rviz
- Q:Color image not showing
- A: Issue lies in ros2 and openni sdk for ros2, use back ros instead
- Find out how to integrate object detection with the depth camera/rviz