I am a first year master's student at a graduate school in Kanto. I have been conducting research with windows + simulation.
I thought it was time to get a job or an intern, so I went to an intern at a robot startup with an acquaintance in the laboratory.
I was writing a program to some extent and thought I could work, but the reality was not so sweet.
There were words that I had heard but didn't understand, and I couldn't understand the meaning of the instructions. I felt what I had studied so far.
However, the people who understood them and moved the actual machine looked cool, and the sensors and robots actually moving seemed to be fun in the near future, so I decided to study.
** Install ubuntu on your PC and use ros and docker to run kinect **.
In this article, I will explain the general flow.
Once you know the general flow, you can look it up and fight errors, but if you don't know the flow in the first place, you won't know what to do, and I was. Lol So, I'll leave the details to other articles and share the general flow I did.
(* Because it is "memo for myself" + "practice of output", please take a good look!)
The comparison between the state before doing and the state after doing is like this.
(This image was created with reference to the article by @ kotaro-dr.)
The final output will look like this.
It's a little difficult to understand, but you can see that kinect can get rgb information and distance information. What looks like two images shows the depth.
First, make a backup according to this. I omitted what I could do later and just backed up the system image.
Install ubuntu directly from usb according to this.
Select the driver to handle or the os to start by default. (This area was taught by a junior in a detailed laboratory ...)
Install docker according to docker docs.
Install ros according to ROS.org.
If you want to install Chrom, Terminator, VScode, etc., install it.
"Docker creates a virtual environment and works there, so it's okay not to destroy the environment of the main PC." It seems, but I couldn't really imagine it.
Perhaps this feeling is appreciated by those who have installed various libraries and have experienced conflicts between each library and the data being blown away.
I think this article is easy to understand. Based on the reference article, it looks like this in my own perception.
(This image was created with reference to the article by @ kotaro-dr.)
In other words, if you just launch docker, I think it's okay to feel like you have a blank PC separate from the one you are using. At the time of its startup, describe various libraries you want to install and build your favorite environment.
Also, at a later date, I was using a notebook PC, The processing speed couldn't keep up and the kinect didn't look good. At that time, let's do it on the desktop! I think the merit is that it is very easy to build an environment when you think about it.
The structure of the file looks like this. I will create it like this.
/home/docker/
|--kinectv2
| |--Dockerfile
| |--build.sh
| |--run.sh
| |--etc...
|--ros_rviz
| |--Dockerfile
| |--build.sh
| |--run.sh
| |--etc...
People from windows don't feel like it, but the image built with docker doesn't have a screen ... That's why you need to create a GUI.
So I want to see the output of kinect with rviz, so I made a docker file for it! (I'll add a github link! Please wait a moment)
We need docker to run kinect, so create this! (I'll add a github link! Please wait a moment)
At this point, all you have to do is execute it.
First, start (run) the terminal for kinect v2. Execute with the following command
roslaunch kinect2_bridge kinect2_bridge.launch
Next, start (run) the terminal for rviz. Execute with the following command
rosrun rviz rviz
I am writing an article for the first time, but I realized that it is really difficult to write an easy-to-understand article. I realized the greatness of the articles that I have referred to so far. This article was mostly my own memo, but I hope it helps someone.
Also, on TV, Cyndi Lauper said that it was important to continue the output in order to become first-class. I will continue to output it.
Recommended Posts