How to connect Kinect to Raspberry Pi 2 or 3 with ROS
Вставка
- Опубліковано 6 жов 2024
- Today's episode #8 is about using Kinect with ROS on Raspberry Pi 2 or 3.
Kinect is one of the most popular source of PointClouds - array of points with 3D coordinates information.
It has proprietary connector - actually it's USB+12V bus, and needs adapter for PC connection
Despite that Kinect is bigger than ASUS Xtion, it has also tilt motor, microphone array, accelerometer and better support from ROS community
PointClouds can be converted to LaserScan - array of range sensor data withing some angle range. It looks like lidar data, but not in 360 degrees. Laserscan information can be used for SLAM - map building, obstacle avoidance, etc...
Video transcript can be found here: roboticsweekend...
Links:
Launch file Gist: gist.github.co...
Rviz view files: gist.github.co...
Freenect ROS wiki: wiki.ros.org/fr...
Video transcript: roboticsweekend...
Came for the point cloud stayed for the sick beat
Very interesting. Can you please tell which one you have used in the video? Raspberry Pi 2 or Pi 3?
Thank you. In the video is Raspberry Pi 2. But on Raspberry Pi 3 every step will be the same
Thanks for the great tutorial! I'm new to ROS, can the depth image also be transformed to several laserscans at different heights, to detect smaller or hanging obstacles? Or is there a 3d laserscan option?
Thank you. You can run several instances of depthimage_to_laserscan, and set scan_height property for every instance at different levels
do we need to install ubuntu on the rasberry pi as well? or just plug the ethernet cable directly? if i want to connect the rasberry pi through wifi is it still possible to view the image through the computer? I am sorry i am really new to raspberry pi and ros and confused what do i need to install on raspberry pi for this kind of projects.
Hello, just a simple question, is this tutorial applicable to Raspberry Pi 4? Thank you!
Hi. The only thing I can say for sure - result will be the same on any hardware with Ubuntu 16.04 -18.04. I've got Raspberry Pi 4 a couple days ago and going to install Ubuntu with ROS on it. I will keep you updated on my results.
Robotics Weekends thank you! I Will be waiting for your update ☺️
Update: I confirm - it works on RPi4 without any issues.
Robotics Weekends Thank you very much! I just ordered Rasp Pi 4 for our thesis. Your tutorial will be very helpful!
I want to make a mobile 3d scanner with the Raspberry Pi 4, and the xBox 360 Kinect sensor. Any advice?
Liked & subbed !
Hi, from hardware perspective I'd recommend to check out the article on Medium how to make Kinect to be powered by USB only: link.medium.com/L9vCHfirFhb
Nice music
Hi, just wanted find out how to power the kinect using the raspberry pi 3 as a master? Can the adapter be plugged straight into the Pi to power the kinect? Also is it possible to use the tilt motors on the kinect through the pi autonomously? Last question is can the kinect be used just as a camera for visual recognition, or is it recommended to use a normal webcam for this purpose?
Hi. Besides standard USB connection, Kinect requires 12V power. You can use any 12V ac adapter or Kinect 360 USB adapter. You can find wiring of Kinect cable in my videos. Freenect driver supports tilt motor but only for 1414 model. Looks like others also can work through downgrading firmware while initialization. For more info please refer to libfreenect readme. Kinect 360 has not the best vga camera. It is 0.3 MPixel with bad colors. If you want to get good textures for scanned 3d object, I recommend to use a separate camera.
Which model of the KINECT is this ??
Neil Tsakatsa It's Kinect 360
Look under the Kinect stager/ where it sits, there is a model number !
Neil Tsakatsa this concrete 1473. But it also works with 1414
Thank You Very Much :-)
Happy Computing !
what kind of data does kinect send? is it digital ?if yes how many bits and is serially or parallely sent?
universal serial bus should give it away. openkinect.org/wiki/Protocol_Documentation
Hello Mr. Robtics weekends, I have one question. I am doing my project and it includes Pi, a depth camera, and AR smart glasses. Could you please help to know which AR smart glasses I can use to work with a raspberry pi and Kinect camera??
Hi, unfortunately I have no any experience in AR smart glasses.
which OS is RPI using in video rasbian or ubuntu?
I'm using Ubuntu. With Ubuntu I don't need to build ROS from sources and just use standard apt repository
@@RoboticsWeekends It would have been good to point this out in the video - to save people the headache of reimaging their SD cards with ubuntu
I keep getting No Device Connected ... waiting for device to be connected
Do you see your Kinect in list after lsusb command?
Yes
So i got it working Thanks to Imesh Sachinda.
sudo chmod 777 -R /dev/bus/usb
Yes, this is the second thing you'll have to do;) Glad that you've already figured out that)
Hi Robotics Weekends, I dont have a rasperri pi but I want to try this out on my laptop (connected to the Kinect 360) running a Virtual Box VM (Ubuntu 16.04), will this work? I'm crashing my head into alot of brick walls trying to get it work like yours ... thanks
Hello. Yes it will work, but not sure how virtualbox will handle kinect
hey man really good stuff but can you give a step by step on how to do this only on raspberry pi. i mean radpberry pi be the master and slave both. i get that you said somthing about changing a variable when asked the exact question. but its vague for me man. i searched every where. can you help me out? not a video maybe a step by step config? or any help?
Hi. It is pretty simple - just use RPi's local IP address as a value for ROS_IP and ROS_MASTER_URI. BTW these variable have such values by default. So you just can skip setting of these variables.
Robotics Weekends tnx man
When I connect Kinect it says no device connected.
Usas un PC y una raspberry? Para que? Conecta directamente al PC y te quitas de lios.
does it have to be connected with ethernet cable or can i connect with wifi ?
It doesn't matter. But via ethernet you will get better data rate, because of wider bandwidth
Whats the name of the kinect adapter
It's noname from china
@@RoboticsWeekendscould you provide a link please?
Hi, I'm using a raspberry pi 4 and kinect 360. But the kinect is not detected by pi. It's not listed in lsusb.
OS ubuntu server 20.04
Please check that Kinect and additional power supply is working. For example on another PC. I had a similar setup without any issues.
@@RoboticsWeekends the kinect work on my laptop. I have given 12v power to the kinect power jack and used the official power adaptor for raspberry pi
does it work on Orange Pi Zero?
It should work on any board with Ubuntu installed.
Scott Boy show more of this?
hey i got this error when trying to roslaunch vidsrv laserscan.launch
[laserscan.launch] is neither a launch file in package [vidsrv] nor is [vidsrv] a launch file name
I already created and write the node description from Gist but error still persist. Please help tq
Why doesnt it work for close range? I put my hand 12 inches away from the IR camera and doesnt show in RVIZ
Kinect has minimum range 0.5 - 0.8 m , and max 3 - 4 m, depending on version. So you'll see nothing on smaller distances
can you use this software for windows im not talking about the pi programs im talking about the rviz
There is a possibility to install ros on Windows, but I have never tried that: wiki.ros.org/Installation/Windows
So, i installed ROS and freenect normaly through sudo apt install, but now i dont know exactly how to utilize a custom .launch file and where exactly where to put it, as i dont have any catkin workspace or anything. I got Kinect to work with the Pi and visualize it through RVIZ on a Notebook, but i just get 1 frame each 3 seconds. I'm running on a RPI 3B+. Is there any way to reduce the point cloud count so the pi doesnt take that long? My idea is to have a robot map a room and im thinking of using rtabmap for this, but when i try to run the default test, it gives me an error about not receiving data in 5 seconds or something, so rviz doesnt show anything when running that. Well, i've ran into a lot of problems and my ROS knowledge doesnt keep up with those.
Try to reduce the poincloud density. You can do it using rqt_reconfigure tool
@@RoboticsWeekends I fixed all the problems with the launch files and etc. The thing about reducing the depth sensor resolution is not possible with the freenect driver, only in Openni. Freenect only supports two modes for each camera_mode and depth_mode. Openni offers more options and a lower resolution but it never detects my kinect no matter what i do. Well, it's sad but the only way i find is to upgrade to a more powerful SBC
hello..i want information for rasberry pi software for programming kinect,and from where i start to learn this programing??
i want to develop kinect to recognize my motion and action please help
Hi. Please refer to freenect documentation. This is an opensource library for kinect.
Thnk u..
Botland? Are you from Poland?
Yep:)
you're using ros on ubuntu machine or raspian
It's ROS on Ubuntu which is installed on Raspberry Pi. There is a separate video on my channel how to install it
Robotics Weekends oh thanks for responding could u plz post the link of that video
@@divyamgarg9078 Sure. Here its - ua-cam.com/video/VFuHG-Ho4Fk/v-deo.html
@@RoboticsWeekends Thankyou again
@@RoboticsWeekends the work that i have already done on ubuntu using ros... can i transfer that as it is !! sorry for asking such stupid question but it will be a great help if u can just respond one last time and thanx in advance
unable to locate package ros-kinetic-freenect-launch
You also can build it from sources. How to do that is described in the video about Kinect and NVIDIA Jetson Nano on my channel.
I have error with rviz in Fixed Frame: "No tf data. Actual error: Fixed Frame [camera_link] does not exist". Could you help me?
Hi. Please start with checking your freenect node. Is it works without errors and publishes any data?
Yes. I check kinect without ethernet connection (only raspberry) and all works. Its looks like connection problem between master and slave but i can ping both.
In this case I recommend to check environment variables ROS_MASTER_URI and ROS_IP both on master and slave. For details you could refer to my previous video How to setup ROS on RPI
does it work same way with kienct 2.0
Hi. Unfortunately Kinect v2 won't work on Raspberry Pi, because it needs USB 3.0 port. But even if you have some platform with USB 3.0 ( for example Jetson boards) you should install another Kinect driver - libfreenect supports only Kinect v1
Won't let me download the first package
Do you have already installed ROS as it is described here wiki.ros.org/Installation/Ubuntu ? To install ros-melodic packages you should have set up ros repository. Please refer the link for more details.
@@RoboticsWeekends thanks I'll check it out
Can we use rpi as master?
+Ridwan Afwan Karim Fauzi yes, just change ROS_MASTER_URI environment variable
Hi, I’m interested in using solely the cameras for a project of mine. Do you or anyone you know, know of any way to pin out the ir array and the ir receiver of the Kinect in order to utilize it over Arduino or pi
brandonsg123 if using the pi just connect via usb it’s much simpler than trying to pin out the ir array
David Batty I’m trying to remove the camera and array from the housing in order to put it into my own project
David Batty as well as remove from circuit board
brandonsg123 I tried doing that when I was doing this for my masters, you can remover the circuitry from the case and disconnect a lot of the components but I tried removing the camera and it just died, I would recommend leaving it on the board majority of the board can be unscrewed and disconnects just a single board with ir transmitter and receiver. Remember also they need to be perfectly separate doe it won’t work. Again speaking form experience.
David Batty gotcha, thanks for the info
Hi Sir, my team and I are working on a project which requires the use of Kinect for mapping. But we have not got much progress. Could you help us?
Hi. You can use described here system as a source for laserscan data, which is needed by gmapping node. Please check for gmapping wiki on ROS page for more information
Hi, why don't you connect the kinect directly to the PC via USB (without RPI)?
Or, why do you need a PC with ROS as master and do not install Linux with ROS distro directly on RPI to avoid the use of PC ?
Thx
+tourdumonde77 Hi, TL;DR For this video PC is used as data viewer, and there is no any problem to launch roscore and Kinect node entire on RPI.
I created these "How to" series based on questions frequently asked to me. That's why I've chosen RPi as proxy. So there is no any problem to connect Kinect directly to PC, if you want to make PC as a part of your mobile robot;)
Yes, using PC as master confused some people. I did so, because I'm using such distributed model on my robot - main hub, based on x86 computer board with roscore, plus ARM based boards attached as slaves with different sensors, tasks and purposes. For example in previous "smart camera" video RPi detect faces, controls gimbal, measure distance, etc. And to master PC can be sent only TF messages for object following planning.
@robotics weekends
Thank you very much for you exhaustive answer, I really appreciated it !
Keep up the good work
@RoboticsWeekends
Sorry, how do you install Roscore on the PC master?
+Javier Videos roscore is a part of ROS, which can be installed on master PC in the same way as for Raspberry Pi
@Robotics Weekends
Thanks for answering, one last doubt! Do you connect with SSH? or what function does the network wire have?
Anybody else having this problem? "No device connected..." repeating. I don't have a /dev/bus/ directory I only have /dev/tty/ and chmod did NOT work. Lsusb shows all Kinect devices look correct too. Seems to get stuck on last step... ua-cam.com/video/8vt3zNya_hw/v-deo.html
Hi, im new in this kind of setting up Rviz, i did all in the tutorial but at the end it was a Warning in Fixed Frame that says:
"No tf data. Actual error: Fixed Frame [camera_link] does not exist"
What can i do to solve this ?
Hi. The camera_link tf is provided by Kinect node. I recommend you to check if Kinect node is up and running without errors
Gutted.
Unable to locate package ros-kinetic-freenect-launch
Freenect package can be installed from sources.
I get "Unable to locate package ros-kinectic-freenect-launch"
+Julian Puppo Hello, that's because you have a typo in package name: instead of kineCtic should be kinetic. "Kinetic" is a ROS version codename.
I´ve corrected it to : "sudo apt install ros-kinetic-freenect-launch" . Still not working.
+Julian Puppo It looks like you didn't add apt repository for ROS. By the way, did you install ROS itself before? If not, please refer to my "How to install ROS" video.
i also got the same error with rasbian jessie, then i tried with ubuntu mate. It worked..
@@RoboticsWeekends maybe you should produce proper step by step instructions not point to another video because you forgot to include...