for Robot Artificial Inteligence

Realsense GhostPointCloud 제거 하기(Realsense Parameter 세팅 방법)

|

Stereo 매칭으로 Depth Image를 추정을 하는데 우리가 Dense하게 하고 싶으면 Stereo matching(epiploar contraint(epiploar pole and line)으로 right 이미지에 있는 픽셀을 left이미지의 픽셀을 통해 매칭으로 depth를 추정)의 매칭에 대한 정확도를 낮추면 픽셀간에 매칭이 많이 이루워져 덴스한 뎁스데이터를 얻을 수 있다.

허나 환경 brightness가 계속적으로 변화하는 등 조명에 대한 민감도가 높아지기 때문에 Ghost Point가 생길 수 있다.(잘못된 매칭으로 통해 생기는 depth outlier)

이는 조명이 계속 바뀌는 공간에서 취약점이다.

이에 Realsense에서 제공을 하는 SDK를 설치하여서 Stereo Matching에 대한 Parameter를 수정을 통해 Ghost Point를 제거할 수 있다.

  1. Command Reaselsene-Viewer in terminal

  2. Advance Mode Actiavte

  3. Second peak 조절

  4. (Option) Manipulate another parameters

  5. Save(icon placed beside on name of sensor in tab)

  6. save parameter file can be used in realsense launch file.(will add in future how to do that)

  7. (Option) Also we can load the saved file to Realsense Viewer to check whether parameter propely set or not

이런식으로 파라미터 조정이 가능하며, 꼭 ros에서 제공하는 파라미터로 하드웨어 싱크나 파라미터를 맞추는 것이 아닌 리얼센스로부터 파라미터를 수정/저장한다음 roslaunch에 적용을 하여서 extric이든 instric이든 하드웨어 싱크 조절 및 ghost parameter도 없앨 수 있다.

Comment  Read more

Extend SWAP(KILL PROGRAM SELF DUE TO LACK OF RAM)

|

when we handle many data at the same time, maybe your ram be filled to full, and when it data handling over ram size, then program kill by system to protect damage.

for in that case, we need to have virtual memory(swap).

Extend Swap

Comment  Read more

VIM useful Command

|

vim useful short command

“/” ← To search

“n” ← next search result

“u” ← back to previous

“shift + v” ← selecting by drag

Comment  Read more

BagFromImage Package for Noetic

|

因为需要自己制作图像集。 首先,我们利用的是现成的包 [ROS_PACKAGE]https://github.com/raulmur/BagFromImage 他的安装流程是老版本的rosbuild,但我们使用catkin_make 安装编译按我的流程走

  1. 在自己的 /catkin_ws/src/下
git clone https://github.com/raulmur/BagFromImages.git
  1. 修改cmakelist.txt 使用opencv 2还是 3我不确定,我是3所以此处写3
cmake_minimum_required(VERSION 2.4.6)
#include($ENV{ROS_ROOT}/core/rosbuild/rosbuild.cmake)

project(BagFromImages)

set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS}  -Wall  -o3 -march=native ")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall  -o3 -march=native")
set(CMAKE_BUILD_TYPE "Release")
set(CMAKE_CXX_FLAGS "-std=c++11")
set(CMAKE_CXX_FLAGS_RELEASE "-o3 -Wall -g")

#rosbuild_init()

FIND_PACKAGE(OpenCV 3 REQUIRED)


find_package(catkin REQUIRED COMPONENTS
	roscpp
	std_msgs
	tf
	image_transport
	cv_bridge
	rosbag
)


set(EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/bin)

catkin_package(CATKIN_DEPENDS roscpp std_msgs tf image_transport cv_bridge)
include_directories(
	${catkin_INCLUDE_DIRS}
	${rosbag_INCLUDE_DIR}
)

#rosbuild_add_executable(${PROJECT_NAME}
#main.cc
#Thirdparty/DLib/FileFunctions.cpp)
add_executable( ${PROJECT_NAME}
main.cc
Thirdparty/DLib/FileFunctions.cpp)

target_link_libraries (${PROJECT_NAME}
${catkin_LIBRARIES}
${OpenCV_LIBS}
${rosbag_LIBRARIES})
  1. 在终端输入gedit package.xml也就是新建一个package.xml。在里面写入
<?xml version="1.0"?>
<package>
  <name>BagFromImages</name>
  <version>0.0.0</version>
  <description>The BagFromImages package</description>

  <!-- One maintainer tag required, multiple allowed, one person per tag -->
  <!-- Example:  -->
  <!-- <maintainer email="jane.doe@example.com">Jane Doe</maintainer> -->
  <maintainer email="whu@gmail.com">whu</maintainer>


  <!-- One license tag required, multiple allowed, one license per tag -->
  <!-- Commonly used license strings: -->
  <!--   BSD, MIT, Boost Software License, GPLv2, GPLv3, LGPLv2.1, LGPLv3 -->
  <license>TODO</license>

  <!-- The *_depend tags are used to specify dependencies -->
  <!-- Dependencies can be catkin packages or system dependencies -->
  <!-- Examples: -->
  <!-- Use build_depend for packages you need at compile time: -->
  <!--   <build_depend>message_generation</build_depend> -->
  <!-- Use buildtool_depend for build tool packages: -->
  <!--   <buildtool_depend>catkin</buildtool_depend> -->
  <!-- Use run_depend for packages you need at runtime: -->
  <!--   <run_depend>message_runtime</run_depend> -->
  <!-- Use test_depend for packages you need only for testing: -->
  <!--   <test_depend>gtest</test_depend> -->
  <buildtool_depend>catkin</buildtool_depend>
  <build_depend>roscpp</build_depend>
  <build_depend>tf</build_depend>
  <build_depend>std_msgs</build_depend>
  <build_depend>sensor_msgs</build_depend>
  <build_depend>image_transport</build_depend>
  <build_depend>cv_bridge</build_depend>
  <build_depend>rosbag</build_depend>


  <run_depend>roscpp</run_depend>
  <run_depend>tf</run_depend>
  <run_depend>std_msgs</run_depend>
  <run_depend>sensor_msgs</run_depend>
  <run_depend>image_transport</run_depend>
  <run_depend>cv_bridge</run_depend>
  <run_depend>rosbag</run_depend>


  <!-- The export tag contains other, unspecified, tags -->
  <export>
    <!-- You can specify that this package is a metapackage here: -->
    <!-- <metapackage/> -->

    <!-- Other tools can request additional information be placed here -->

  </export>
</package>
  1. 在/catkin_ws目录下去使用catkin_make去编译

  2. rosrun bagfromimages BagFromImage

Comment  Read more

ROS PLUGIN(시스템에 확장 사용할 수 있는) 의미

|

ROS system provides a plugin framework called pluginlib to dynamically load/unload plugins, which can be a library or class. The pluginlib is a set of the C++ library, which helps to write plugins and load/unload whenever required. Plugin files are runtime libraries such as shared object

즉, package의 lib(Object file)만 가지고 다른 package에서 손쉽게 쓸 수 있게 만드는 것이다.

PlugIn 사용 법

PlugIn 사용법 2

Comment  Read more