echo $ROS_MASTER_URI
This shows the web address, IP, and port number.
Now enter the following command
roslaunch openni_launch openni.launch
ROS_MASTER_URL is the address of ros_master process or roscore
In fact, you may change this (In .bashrc file, but I would not do that).
In the video that I learned, the URI was like below
http://10.8.0.1:11311
Sometimes, the above IP part(10.8.0.1) is a hostname that needs to be mapped to an IP.
Mine was like this
http://localhost:11311
What does this mean?
To find out, let's run below code
roslaunch openni_launch openni.launch
If above code does not work, make sure if you did the following:
1. In catkin_ws folder,
catkin_make
2. Make sure if you source the setup.bash file
In catkin_make/devel
source setup.bash
3. If it still does not work, install openni-launch with the below code.
sudo apt-get install ros-melodic-openni-launch
The melodic part should be your version of ROS.
Then repeat step 1 and 2.
Now this code should work.
roslaunch openni_launch openni.launch
But I got message that No devices connected.
So I installed freenect-launch,
sudo apt-get install ros-melodic-freenect-launch
then I repeated step 1 and 2, and typed below command.
roslaunch freenect_launch freenect.launch
but still, the device was not connected.
I will fix this and re-upload about this part later :)
To conclude, there should be only one ros_master, and there can be several clients environments.
Again, it is the address of roscore or ros_master process.
8 Parameter Server: rosparam (0) | 2020.07.12 |
---|---|
7 What is catkin_make? (0) | 2020.07.12 |
5 roslaunch (0) | 2020.07.10 |
4 Turtlesim (0) | 2020.07.09 |
3 Create python file on ROS package (0) | 2020.07.09 |
댓글 영역