zotac-d05@d05:~/catkin_ws/src/my_gazebo_world/worlds$ gazebo 02_map_world
Error [parser.cc:775] No <model> element in configFile[/home/zotac-d05/.gazebo/models/my_ground_plane/model.config]
Error Code 12 Msg: Unable to resolve uri[model://my_ground_plane] to model path [/home/zotac-d05/.gazebo/models/my_ground_plane] since it does not contain a model.config file.
~/.gazebo/models
Move 01_square_world to ~/catkin_ws/src/turtlebot3_simulations/turtlebot3_gazebo/worlds/01_square_world.world
Create turtlebot3_square_world.launch in turtlebot3_square_world.launch
Sobel operator is a popular edge-detection filter that approximates the first derivative of the image. There are two Sobel kernels, one for detecting horizontal edges and one for vertical edges:
the Harris corner detector uses a second-order Taylor expansion to model how the intensity of an image changes in the local neighborhood around each pixel
import os
import shutil
from pathlib import Path
def move_images_and_delete_folders(folder_path):
print("process on :"+folder_path)
# Get a list of all subdirectories
subdirectories = [f for f in os.listdir(folder_path) if os.path.isdir(os.path.join(folder_path, f))]
# Iterate through each subdirectory
for subdir in subdirectories:
print(subdir)
subdir_path = os.path.join(folder_path, subdir)
if not os.path.isdir(subdir_path):
print("not a directory, skip!")
continue
# Get a list of all files in the subdirectory
files = [f for f in os.listdir(subdir_path) if os.path.isfile(os.path.join(subdir_path, f))]
folder_contain_image = False
# Iterate through each file in the subdirectory
for file in files:
# Check if the file is an image (you can customize this check based on your file extensions)
if file.lower().endswith(('.png', '.jpg', '.jpeg', '.gif', '.bmp')):
# Move the image file to the parent directory
source_file = os.path.join(subdir_path, file)
destination_file = os.path.join(folder_path, file)
shutil.move(source_file, destination_file)
folder_contain_image=True
# Delete the empty subdirectory
if(folder_contain_image):
os.rmdir(subdir_path)
# Replace 'your_folder_path' with the path to the folder containing subfolders
folder_path = os.getcwd()
move_images_and_delete_folders(folder_path)
#deb cdrom:[Ubuntu 20.04.3 LTS _Focal Fossa_ - Release amd64 (20210819)]/ focal main restricted
# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://jp.archive.ubuntu.com/ubuntu/ focal main restricted
# deb-src http://jp.archive.ubuntu.com/ubuntu/ focal main restricted
## Major bug fix updates produced after the final release of the
## distribution.
deb http://jp.archive.ubuntu.com/ubuntu/ focal-updates main restricted
# deb-src http://jp.archive.ubuntu.com/ubuntu/ focal-updates main restricted
## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team. Also, please note that software in universe WILL NOT receive any
## review or updates from the Ubuntu security team.
deb http://jp.archive.ubuntu.com/ubuntu/ focal universe
# deb-src http://jp.archive.ubuntu.com/ubuntu/ focal universe
deb http://jp.archive.ubuntu.com/ubuntu/ focal-updates universe
# deb-src http://jp.archive.ubuntu.com/ubuntu/ focal-updates universe
## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free licence. Please satisfy yourself as to
## your rights to use the software. Also, please note that software in
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
deb http://jp.archive.ubuntu.com/ubuntu/ focal multiverse
# deb-src http://jp.archive.ubuntu.com/ubuntu/ focal multiverse
deb http://jp.archive.ubuntu.com/ubuntu/ focal-updates multiverse
# deb-src http://jp.archive.ubuntu.com/ubuntu/ focal-updates multiverse
## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
deb http://jp.archive.ubuntu.com/ubuntu/ focal-backports main restricted universe multiverse
# deb-src http://jp.archive.ubuntu.com/ubuntu/ focal-backports main restricted universe multiverse
## Uncomment the following two lines to add software from Canonical's
## 'partner' repository.
## This software is not part of Ubuntu, but is offered by Canonical and the
## respective vendors as a service to Ubuntu users.
# deb http://archive.canonical.com/ubuntu focal partner
# deb-src http://archive.canonical.com/ubuntu focal partner
deb http://security.ubuntu.com/ubuntu focal-security main restricted
# deb-src http://security.ubuntu.com/ubuntu focal-security main restricted
deb http://security.ubuntu.com/ubuntu focal-security universe
# deb-src http://security.ubuntu.com/ubuntu focal-security universe
deb http://security.ubuntu.com/ubuntu focal-security multiverse
# deb-src http://security.ubuntu.com/ubuntu focal-security multiverse
# This system was installed using small removable media
# (e.g. netinst, live or single CD). The matching "deb cdrom"
# entries were disabled at the end of the installation process.
# For information about how to configure apt package sources,
# see the sources.list(5) manual.
ปล. host=”0.0.0.0″ means that the server will listen on all available network interfaces on the host machine. This makes the server accessible from any IP address on the network.
วิธีติดตั้ง service
1. sudo systemctl daemon-reload #to reload the systemd manager configuration
2. sudo systemctl enable shutdown.service #to enable the service to start at boot (create symbolic link if not exist)
3. sudo systemctl start shutdown.service #to start the service
4. sudo systemctl status shutdown.service #to check the status of the service
ถ้า host=0.0.0.0 ตามที่เขียนไว้ใน python file คือ ok
แต่ถ้าเป็น host=127.0.0.1 คือเป็น loopback จะไม่สามารถเรียก http get จาก คอมเครื่องอื่นในเน็ตเวิคได้
5. netstat -an|more #to check all available services