SlideShare ist ein Scribd-Unternehmen logo
1 von 52
Downloaden Sie, um offline zu lesen
ROS기반 건설 로보틱스 기술 개발
ROS based Construction Robotics Tech Development
2020.4
강태욱 공학박사
한국건설기술연구원 연구위원
Ph.D Taewook, Kang
laputa99999@gmail.com
sites.google.com/site/bimprinciple
Maker, Ph.D.
12 books author
TK. Kang
Digital Transformation
AEC-CPS
CPS
Structural
health
monitoring
Track and
trace
Remote
diagnosis
Remote
services
Remote
control
Condition
monitoring
Systems
health
monitoring
BIM
as i-DB
IoT…
AI
Sensor device
ICBM
MRRobotics
Scan-Vision
Smart contract
based on Blockchain
Autonomous Field Monitoring - Doxel
Funding $4.5M, 2017
2016
Autonomous construction – Built Robotics
Funding $15 M, 2017
Robotics – Robot Operating System(ROS). Open Drone Map. Arduino. Mission planner.
Trimble
GPS
카메라
카메라
스캐너
IMU
DMI
KICT
Open source - Github
OpenSlicer
Open source
http://guswnsxodlf.github.io/software-license
GNU General Public License(GPL) 2.0
– 의무 엄격. SW 수정 및 링크 경우 소스코드 제공 의무
GNU Lesser GPL(LGPL) 2.1
– 저작권 표시. LPGL 명시. 수정한 라이브러리 소스코드 공개
Berkeley Software Distribution(BSD) License
– 소스코드 공개의무 없음. 상용 SW 무제한 사용 가능
Apache License
– BSD와 유사. 소스코드 공개의무 없음
Mozilla Public License(MPL)
– 소스코드 공개의무 없음. 수정 코드는 MPL에 의해 배포
MIT License
– 라이선스 / 저작권만 명시 조건
ROS
ROS는 2007년 5월 미국의 스탠퍼드 대학 인공지능 연구소가 진행하던
STAIR(STandford AI Robot) 프로젝트를 위해 Morgan Quigley 가 개발한 Switchyard
라는 시스템에서 시작
라이센스는 BSD 3-Clause
Ubuntu install of ROS Melodic
ROS
ROS Tutorials ROS Environment Variables
$ gedit ~/.bashrc
# Set ROS Indigo
source /opt/ros/indigo/setup.bash
source ~/catkin_ws/devel/setup.bash
# Set ROS Network
export ROS_MASTER_URI=http://xxx.xxx.xxx.xxx:11311
export ROS_HOSTNAME=xxx.xxx.xxx.xxx
# set ROS alias command
alias cw='cd ~/catkin_ws'
alias cs='cd ~/catkin_ws/src'
alias cm='cd ~/catkin_ws && catkin_make'
ROS 개발 환경 구축
ROS 요약 상세 정리
ROS package 프로그래밍
https://daddynkidsmakers.blogspot.com/2015/08/ros-package-programming.html
ROS example
https://github.com/mac999/ROS
장애물 지역 돌파
사다리 오르기
밸브 잠그기
인명구조
출입문 통과
장애물 제거
2DOF의 4족, 총8DOF의
기동부를 조종하여 이동
특수 돌기가 있는
캐터필러로 45도까지
등판가능
RGBD센서정보를
보고 RF 조종기로
벽돌을 제거
Object recognition으로 문을
인식하고,
3D 포인트 클라우드 기반
비전으로 주변지도를 보고
기동부 자율주행하여 통과
Object recognition으로 밸브를
인식하고,
3D 포인트 클라우드 기반 비전으로
밸브에 접근하여 로봇암 제어로 밸브
잠그기
https://daddynkidsmakers.blogspot.com/2015/07/blog-post_22.html
ROS example
아두
이노
라즈
베리
파이
IMU
로봇 자체 상황
모니터링
입력RGBD 인식결과
https://www.youtube.com/
watch?v=dEDIUaou49E
ROS example
기구부 RF 조종사
로봇 시스템 통합 관제사
기구부 자동 조정 조정사
기구부 전후진
기구부 회전
기구부 RF 조정
무선신호 전송
기구부 RF 조정
무선신호 수신
기구부 RF 조정
신호 해석/제어
로봇암 카메라
이미지 확인
로봇 ROS 노드
실행 제어
기구부 RF 제어
시작
기구부 RF 제어
종료
로봇암 RF 제어
시작
로봇암 RF 제어
종료
사다리 미션
자동 제어 시작
사다리 미션
자동 제어 종료
문열기 미션
자동 제어 시작
문열기 미션
자동 제어 종료
계단 미션
자동 제어 시작
계단 미션
자동 제어 종료
로봇
제어
종료
로봇
제어
시작
RGB-D 센서
종료
로봇암 Pi
카메라 종료
기구부 구동 시작
기구부 구동 정지
로봇암 RF 조종사
로봇암부 회전
로봇암 엔드
전후진
로봇암 엔드
좌우 이동
로봇암 RF 조정
무선신호 전송
로봇암 RF 조정
무선신호 수신
로봇암 RF 조정
신호 해석/제어
로봇암 카메라
이미지 확인
로봇암 구동 시작
로봇암 구동 정지
로봇 ROS 노드
실행 제어
사다리 미션
자동 제어 시작
문열기 미션
자동 제어 시작
계단 미션
자동 제어 시작
자동 제어
비상 정지
RGB-D 센서
시작
로봇암 Pi
카메라 시작
Use cases
물리 컴포넌트
모든 노드는 고정 ip wifi 로 연결되어 있음.
마스터 PC는 i5이상 노트북 사용. 마스터 노드 구동.
로봇 구동 보드는 TK1임.
TK1에 카메라, XTion 연결해 ROS node 구동함.
IMU 센서는 라즈베리파이 사용함 (라즈베리파이는 기본 센서만 사용).
<<node>>: ROS node
robot_master_controller
<<node>>
robot_body_controller
<<node>>
robot_sensor_IMU
<<node>>
robot_sensor_camera
<<node>>
robot_sensor_RGBD
<<node>>
drc_stair_mission_automation
<<node>>
drc_door_mission_automation
<<node>>
drc_ladder_mission_automation
<<node>>robot_body_RF_Controller
<<OpenCM>>
robot_arm_RF_controller
<<OpenCM>>
개발 컴포넌트
reschy ROS패키지 아래, 각 컴포넌트가 node로 개발되어 있음.
각 컴포넌트 이름은 node 소스 파일 이름임.
<<node>>: ROS node
robot_master_controller
<<node>>
robot_body_controller
<<node>>
robot_sensor_IMU
<<node>>
robot_sensor_camera
<<node>>
robot_sensor_RGBD
<<node>>
drc_stair_mission_automation
<<node>>
drc_door_mission_automation
<<node>>
drc_ladder_mission_automation
<<node>>robot_body_RF_Controller
<<OpenCM>>
robot_arm_RF_controller
<<OpenCM>>
개발 클래스 / 모듈
각 클래스/모듈 이름은 혼란스럽지 않도록, 컴포넌트 node 이름과 동일하게 함.
참고로, 클래스를 사용하지 않은 경우는, 전역 함수 및 변수만 사용되므로, 클래스 이름이 크게 관계는 없음.
robot_master_controller
<<node>>
+inputControllKey()
+startRobotBody(active: bool)
+startRobotArm(active: bool)
+startCamera(active: bool)
+startRGBD(active: bool)
+startIMU(active: bool)
+startAutonomousMode(active: bool, mission: int)
+stopAutonomousModel()
<<static>>+subscribeNodeMessage()
<<static>>+publishNodeMessage()
robot_sensor_RGBD
<<node>>
+pointCloudSegmentation()
<<static>>+subscribeOpenNIMessage()
<<static>>+publishSegmentationMessage()
robot_sensor_IMU
<<node>>
+kalmanFiltering()
<<static>>+subscribeControlMessage()
<<static>>+publishSensorMessage()
robot_camera
<<node>>
<<static>>+subscribeControlMessage()
<<static>>+publishSensorMessage()
ladder_mission_automation
<<node>>
+findLadderAndMoveToFront()
+PIDcontrol()
+moveRobotBody()
+isTouchLadderTop()
+canSeeFrontDoor()
+moveToLadderTop()
<<static>>+subscribeControlMessage()
<<static>>+publishStatusMessage()
robot_body_controller
<<node>>
+moveBody(float leftDistance, float rightDistance)
+rotateBody(float angle)
<<static>>+subscribeControlMessage()
<<static>>+publishStatusMessage()
robot_arm_controller
<<node>>
+moveEnd(float xOffset, float yOffset, float zOffset)
+rotateArmbody(float angle)
stair_mission_automation
<<node>>
door_mission_automation
<<node>>
robot_body_motor_controller
<<OpenCM>>
robot_arm_motor_controller
<<OpenCM>>
robot_sensor_camera
<<rasberrypi>>
Battery
BatteryBattery
TK1
RPi
하드웨어 연결 디자인
최종 하드웨어 연결 디자인은 다음과 같음.
TK1 BatteryRPi
XTion
XTion
RPi
CAM
USB
CAM
man
RF
controller
IMURF
USB
CAM
다음과 같이 메시지 포맷이 정의되어 있다고 가정하고 개발할 것. 괄호 안은 데이터 타입임. 메시지 유형 재정의가 귀찮아,
가능한, ROS에서 잘 정의된 메시지 유형을 최대한 재활용하기로 함.
RGB-D, Camera 센서를 제외한, 나머지 IMU, 액추에이터 센서 등은 std_msgs::String 메시지 유형이며, 데이터는 ‘,’로 구분
됨.
reschy/네이스페이스는 직접 개발해야할 메시지 유형임.
ros/네임스페이스는 ros에서 기본으로 제공해 주는 메시지 유형.
1. reschy/control/active/[ladder | door | stair]=[on | off] : on 이면 해당 미션 자동 실행, off 면 해당 미션 실행 종료.
2. reschy/control/run/[ladder | door | stair] : robot_master_controller에 의해 타이머로 메시지가 발생되며, 미션의 한 단
계씩 run 시키는 역할.
3. reschy/status/run/[ladder | door | stair]=[run | finish | fail] : run이면 실행 중, finish면 미션 성공, fail이면 미션 실패.
4. reschy/sensor/active/imu = [on | off] : on이면 imu 동작, off이면 imu 비활성화
5. reschy/sensor/imu = roll,pitch,yaw : std::string 타입으로, ‘,’로 구분됨. 각각 roll, pitch, yaw임.
6. reschy/control/active/motor = [on | off] : on이면 motor 동작, off이면 motor 멈춤.
7. reschy/control/motor/data = [#Id_list Position Speed Time] [Id_list Position Speed Time]… : 모터 ID들을 정의하고,
그 이후에 모터ID가 서보모터 터입으로 정해져 있다면, Position, Speed를 설정하면 되며, 스태핑 모터 타입은 Speed와
Time을 설정하면, 그 대로 해당 ID에 데이터가 전달되어, 모터가 구동됨. Position은 0도에서 360도까지, Speed는 0에
서 1023값 사이, Time은 millisecond로 설정하도록 함.
예) reschy/control/motor/data = #1,2,3,4,5 S300 T10 #6,7,8 P20 S100
* 각 ros node 개발 시 앞의 메시지 토픽 이름과 데이터 유형을 고려해서, 개발해야 하며, 만약, 미확정된 것이 있을 때는,
정의한 후, 개발하고, 이 문서에 반영해야 함. 아울러, 카톡 등에 관련 내용을 공지해야 함.
ROS node 간 메시지 프로토콜 정의
다음과 같이 메시지 포맷이 정의되어 있다고 가정하고 개발할 것. 괄호 안은 데이터 타입임. 메시지 유형 재정의가 귀찮아, 가능한,
ROS에서 잘 정의된 메시지 유형을 최대한 재활용하기로 함.
RGB-D, Camera 센서를 제외한, 나머지 IMU, 액추에이터 센서 등은 std_msgs::String 메시지 유형이며, 데이터는 ‘,’로 구분됨.
robot_sensor_camera robot_sensor_RGBD. robot_sensor_IMU
reschy/sensor/active/
camera/on(std_msgs::String)
reschy/sensor/active/
camera/off(std_msgs::String)
ros/image(Image)
reschy/sensor/active/
rgbd/on(std_msgs::String)
reschy/sensor/active/rgbd/
off(std_msgs::String)
reschy/sensor/segments
(sensor_msg::PointCloud2)
reschy/sensor/active/
imu/on(std_msgs::String)
reschy/sensor/active/
imu/off(std_msgs::String)
reschy/sensor/imu
(std_msgs::String)
reschy/sensor/AABB
(sensor_msg::PointCloud2)
ros/camera/depth/points
(sensor_msg::PointCloud2)
ros/image(Image)
XYZI 유형. Meter단위.
I는 세그먼트 인덱스
예)
0.12, 0.53, 5.23, 0
0.32, 0.63, 6.23, 0
…
0.52, 0.53, 5.23, 1
0.72, 0.63, 6.23, 1
XYZI 유형. 순서대로.
#1. Center position
#2. Maximum
boundary position
#3. Minimum
boundary position
…
예) X각, Y각, Z각, 높이
0.12, 0.53, 5.23, 3.5
ROS node 간 메시지 프로토콜 정의
ROS는 이벤트 방식으로 모든 노드가 처리됨을 명심해야 함.
robot_master_controller가 노드들을 관리함.
robot_master_controller가 자동 미션 수행 노드에 센서 메시지를 동기화시켜 전달하게 하며, 아울러, 자동 미션 수행 노드
도 타이밍에 맞게 run 메시지를 전달해, 미션의 한 단계씩 실행하게 함.
현재 robot_master_controller에서 호출되는 node 에 대한 run 메시지는 5 Hz 빈도로 호출됨. 센서 데이터 취득도, 호출 빈
도를 고려해야 함.
robot_master_
controller
ladder_mission_
automation
1. reschy/control/active/ladder=on
6. reschy/control/run/ladder
ladder_mission_
automation
openni2
3. ros/camera/depth/points
2. rosrun openni2 opennni2.launch (TBD)
4. reschy/sensor/segments 5. reschy/sensor/AABB
robot_body_
controller
7. reschy/control/run/body=left(0.2),
right(0.2)
<<thread>>keyLoop
<<timer>> callbackTimerRun
ROS node 간 메시지 호출 순서 예 – 사다리 미션
1. 노트북 PC
rosrun reschy robot_master_controller
2. TK1: 아래는 shell batch 처리 필요함
rosrun reschy robot_body_controller
rosrun reschy robot_arm_controller
roslaunch openni2_launch openni2.launch
rosrun uvc_camera uvc_camera_node
3. RPi
rosrun reschy_sensor robot_sensor_imu
4. 노트북 PC : 토픽 메시지 정상 작동 확인을 위해 아래 명령 실행
rostopic list
rviz
rqt
robot_master_
controller
ladder_mission_
automation
1. reschy/control/active/ladder=on
6. reschy/control/run/ladder
ladder_mission_
automation
openni2
3. ros/camera/depth/points
2. rosrun openni2 opennni2.launch (TBD)
4. reschy/sensor/segments 5. reschy/sensor/AABB
robot_body_
controller
7. reschy/control/run/body=left(0.2),
right(0.2)
<<thread>>keyLoop
<<timer>> callbackTimerRun
ROS node 실행 순서
#include <ros/ros.h>
#include <sensor_msgs/PointCloud2.h>
#include <std_msgs/String.h>
// PCL specific includes
#include <pcl_conversions/pcl_conversions.h>
#include <pcl/ros/conversions.h>
#include <pcl/point_cloud.h>
#include <pcl/point_types.h>
#include <pcl/ModelCoefficients.h>
#include <pcl/io/pcd_io.h>
#include <pcl/filters/extract_indices.h>
#include <pcl/filters/voxel_grid.h>
#include <pcl/features/normal_3d.h>
#include <pcl/kdtree/kdtree.h>
#include <pcl/sample_consensus/method_types.h>
#include <pcl/sample_consensus/model_types.h>
#include <pcl/segmentation/sac_segmentation.h>
#include <pcl/segmentation/extract_clusters.h>
// control
typedef enum
{
ActionStepStop = 0,
ActionStepFinish = 1,
ActionStepRun = 2,
ActionStepClimb = 3,
} RobotActionStep;
RobotActionStep _stepStatus = ActionStepStop;
// publisher
ros::Publisher pubStatus;
// subscriber
bool _subSegments = false; // subscribed data sync flag
bool _subAABB = false;
pcl::PointCloud<pcl::PointXYZI> _CurrentPointCloudSegments;
pcl::PointCloud<pcl::PointXYZI> _CurrentSegmentsAABB; // Axis-aligned bounding box about each segments
void subscribeSegments(const sensor_msgs::PointCloud2ConstPtr& input)
{
if(_stepStatus <= ActionStepFinish)
return;
_CurrentPointCloudSegments.clear();
pcl::fromROSMsg(*input, _CurrentPointCloudSegments);
_subSegments = true;
}
void subscribeAABB(const sensor_msgs::PointCloud2ConstPtr& input)
{
if(_stepStatus <= ActionStepFinish)
return;
_CurrentSegmentsAABB.clear();
pcl::fromROSMsg(*input, _CurrentSegmentsAABB);
_subAABB = true;
}
LadderMissionAutomation ROS node 구현 로직 예
// utility functions
int getSegmentsFromReschyPointCloud(pcl::PointCloud<pcl::PointXYZI>& pcd, std::vector<pcl::PointIndices>& segments)
{
// pcd parameter is 3D point cloud sorted by intensity value which has segment index from 0 to N.
if(pcd.size() == 0)
return 0;
int segmentIndex = -1;
pcl::PointIndices segment;
for(int i = 0; i < pcd.size(); i++)
{
pcl::PointXYZI pt = pcd[i];
int index = (int)pt.intensity;
if(segmentIndex < 0)
segmentIndex = index;
if(segmentIndex != index)
{
segments.push_back(segment);
segment.indices.clear();
segmentIndex = index;
}
segment.indices.push_back(i);
}
if(segment.indices.size())
segments.push_back(segment);
return segments.size();
}
int getPointCloudFromSegmentIndex(pcl::PointCloud<pcl::PointXYZI>& pcd, const std::vector<int>& segmentIndex, pcl::PointCloud<pcl::PointXYZI>& segment)
{
for(int i = 0; i < segmentIndex.size(); i++)
{
int index = segmentIndex[i];
pcl::PointXYZI pt;
if(index >= pcd.size() || index < 0)
continue;
pt = pcd[index];
segment.push_back(pt);
}
return segment.size();
}
LadderMissionAutomation ROS node 구현 로직 예
struct Rect3D
{
pcl::PointXYZ pt1, pt2;
Rect3D()
{
clear();
}
void clear()
{
pt1.x = pt1.y = pt1.z = 9999999999.9;
pt2.x = pt2.y = pt2.z = -9999999999.9;
}
void grow(pcl::PointXYZI& pt)
{
if(pt.x < pt1.x)
pt1.x = pt.x;
if(pt.y < pt1.y)
pt1.y = pt.y;
if(pt.z < pt1.z)
pt1.z = pt.z;
if(pt.x > pt2.x)
pt2.x = pt.x;
if(pt.y > pt2.y)
pt2.y = pt.y;
if(pt.z > pt2.z)
pt2.z = pt.z;
}
bool getMaximum(pcl::PointCloud<pcl::PointXYZI>& pcd)
{
Rect3D rect;
for(int i = 0; i < pcd.size(); i++)
{
pcl::PointXYZI pt = pcd[i];
rect.grow(pt);
}
*this = rect;
return pcd.size() > 0;
}
float width()
{
return fabs(pt2.x - pt1.x);
}
float height()
{
return fabs(pt2.y - pt1.y);
}
float depth()
{
return fabs(pt2.z - pt1.z);
}
};
#define IsEqual(a, b, t) (fabs(a - b) <= t)
LadderMissionAutomation ROS node 구현 로직 예
// node functions
void moveRobotBody(float leftSpeed, float leftMilliSecond, float rightSpeed, float rightMilliSecond)
{ if(_stepStatus <= ActionStepFinish)
return;
// publishMessage(...); // considering left and right side wheel.
}
void moveRobotBody(float leftDistance, float rightDistance)
{
const float wheelRadius = 0.10;
float leftSpeed = leftDistance / wheelRadius;
float rightSpeed = rightDistance / wheelRadius;
moveRobotBody(leftSpeed, 1000.0, rightSpeed, 1000.0);
}
int canSeeLadder(float nearLadderDistance, float farLadderDistance, float width = 0.3, float height = 0.5, float depth = 0.5, float tolerance = 0.1)
{
std::vector<pcl::PointIndices> clusterSegmentsIndices;
getSegmentsFromReschyPointCloud(_CurrentPointCloudSegments, clusterSegmentsIndices);
std::vector<pcl::PointIndices> clusterAABBIndices;
getSegmentsFromReschyPointCloud(_CurrentSegmentsAABB, clusterAABBIndices);
int SegmentId = -1;
for(std::vector<pcl::PointIndices>::const_iterator it = clusterAABBIndices.begin(); it != clusterAABBIndices.end(); ++it)
{
pcl::PointCloud<pcl::PointXYZI> pointsAABB;
getPointCloudFromSegmentIndex(_CurrentSegmentsAABB, it->indices, pointsAABB);
Rect3D MaxRect;
if(MaxRect.getMaximum(pointsAABB) == false)
continue;
if(MaxRect.pt2.z < nearLadderDistance - tolerance)
continue;
if(MaxRect.pt1.z > farLadderDistance + tolerance)
continue;
float segmentWidth = MaxRect.width();
float segmentHeight = MaxRect.height();
float segmentDepth = MaxRect.depth();
if(IsEqual(segmentHeight, height, tolerance) &&
IsEqual(segmentWidth, width, tolerance) &&
IsEqual(segmentDepth, depth, tolerance))
{
SegmentId = pointsAABB[0].intensity;
return SegmentId;
}
}
return SegmentId;
}
LadderMissionAutomation ROS node 구현 로직 예
int canSeeLadder(float nearLadderDistance, float farLadderDistance, float width = 0.3, float height = 0.5, float depth = 0.5, float tolerance = 0.1)
{
std::vector<pcl::PointIndices> clusterSegmentsIndices;
getSegmentsFromReschyPointCloud(_CurrentPointCloudSegments, clusterSegmentsIndices);
std::vector<pcl::PointIndices> clusterAABBIndices;
getSegmentsFromReschyPointCloud(_CurrentSegmentsAABB, clusterAABBIndices);
int SegmentId = -1;
for(std::vector<pcl::PointIndices>::const_iterator it = clusterAABBIndices.begin(); it != clusterAABBIndices.end(); ++it)
{
pcl::PointCloud<pcl::PointXYZI> pointsAABB;
getPointCloudFromSegmentIndex(_CurrentSegmentsAABB, it->indices, pointsAABB);
Rect3D MaxRect;
if(MaxRect.getMaximum(pointsAABB) == false)
continue;
if(MaxRect.pt2.z < nearLadderDistance - tolerance)
continue;
if(MaxRect.pt1.z > farLadderDistance + tolerance)
continue;
float segmentWidth = MaxRect.width();
float segmentHeight = MaxRect.height();
float segmentDepth = MaxRect.depth();
if(IsEqual(segmentHeight, height, tolerance) &&
IsEqual(segmentWidth, width, tolerance) &&
IsEqual(segmentDepth, depth, tolerance))
{
SegmentId = pointsAABB[0].intensity;
return SegmentId;
}
}
return SegmentId;
}
LadderMissionAutomation ROS node 구현 로직 예
bool canSeeFrontDoor(float width, float height, float tolerance = 0.1)
{
// About each segments, detect door which has features such as door volume, distance etc.
std::vector<pcl::PointIndices> clusterSegmentsIndices;
getSegmentsFromReschyPointCloud(_CurrentPointCloudSegments, clusterSegmentsIndices);
std::vector<pcl::PointIndices> clusterAABBIndices;
getSegmentsFromReschyPointCloud(_CurrentSegmentsAABB, clusterAABBIndices);
int SegmentId = -1;
for(std::vector<pcl::PointIndices>::const_iterator it = clusterAABBIndices.begin(); it != clusterAABBIndices.end(); ++it)
{
pcl::PointCloud<pcl::PointXYZI> pointsAABB;
getPointCloudFromSegmentIndex(_CurrentSegmentsAABB, it->indices, pointsAABB);
Rect3D MaxRect;
if(MaxRect.getMaximum(pointsAABB) == false)
continue;
float segmentWidth = MaxRect.width();
float segmentHeight = MaxRect.height();
float segmentDepth = MaxRect.depth();
if(IsEqual(segmentHeight, height, tolerance) &&
IsEqual(segmentWidth, width, tolerance))
{
SegmentId = pointsAABB[0].intensity;
return SegmentId;
}
}
return SegmentId;
}
bool canSeeLadderTop()
{
bool ret = canSeeFrontDoor(0.6, 1.0);
return ret;
}
void
subscribeActive(const std_msgs::StringPtr& state)
{
if(state->data.size() == 0)
return;
if(state->data == "on")
_stepStatus = ActionStepRun;
else if(state->data == "off")
_stepStatus = ActionStepStop;
}
LadderMissionAutomation ROS node 구현 로직 예
LadderMissionAutomation ROS node 구현 로직 예
void
subscribeRun(const std_msgs::StringPtr& state)
{
if(_stepStatus <= ActionStepFinish)
return;
if(_subSegments == false || _subAABB == false)
return;
_subSegments = false; // subscribed data sync flag
_subAABB = false;
if(_stepStatus == ActionStepRun)
{
const float nearLadderDistance = 0.5;
const float farLadderDistance = 1.5;
int SegmentId = canSeeLadder(nearLadderDistance, farLadderDistance);
if(SegmentId < 0) // didn't find Ladder segment under condition.
{
moveRobotBody(0.2, 0.2);
return;
}
else // found it
_stepStatus = ActionStepClimb;
}
else if(_stepStatus == ActionStepClimb)
{
bool canSee = canSeeLadderTop();
if(canSee == false)
{
moveRobotBody(0.2, 0.2);
return;
}
moveRobotBody(0.4, 0.4);
std_msgs::String state;
state.name.push_back("finish");
pubStatus.publish(state);
}
}
int
main (int argc, char** argv)
{
// Initialize ROSreschy
ros::init (argc, argv, "ladder_mission_automation");
ros::NodeHandle nh;
// subscriber
ros::Subscriber subActive = nh.subscribe ("reschy/control/active/ladder", 1, subscribeActive);
ros::Subscriber subSegments = nh.subscribe ("reschy/sensor/segments", 1, subscribeSegments);
ros::Subscriber subAABB = nh.subscribe ("reschy/sensor/AABB", 1, subscribeAABB);
// By using timer, robot_master_controller node should send control/run message for autonomous operation
ros::Subscriber subRun = nh.subscribe ("reschy/control/run/ladder", 1, subscribeRun);
// publisher
pubStatus = nh.advertise<std_msgs::String> ("reschy/status/run/ladder", 1);// ex) ladder=finish, ladder=run, ladder=fail
// Spin
ros::spin(); // Call event functions (subscribers)
}
ROS example
https://github.com/mac999/ROS
// main
Int main (int argc, char** argv)
{
// Initialize ROS
ros::init (argc, argv, "robot_master_controller");
ros::NodeHandle nh;
robot_master_controller robot_master;
signal(SIGINT, quit);
boost::thread
keyboard_thread(boost::bind(&robot_master_controller::keyLoop, &robot_master));
// subscriber
ros::Subscriber subStatusLadder = nh.subscribe ("reschy/status/run/ladder", 1,
subscribeStatusLadder); // ex) ladder=finish, ladder=run, ladder=fail
// publishder
https://github.com/mac999/Robot
ROS example
https://github.com/mac999/ROS
// main
Int main (int argc, char** argv)
{
// Initialize ROS
ros::init (argc, argv, "robot_master_controller");
ros::NodeHandle nh;
robot_master_controller robot_master;
signal(SIGINT, quit);
boost::thread
keyboard_thread(boost::bind(&robot_master_controller::keyLoop, &robot_master));
// subscriber
ros::Subscriber subStatusLadder = nh.subscribe ("reschy/status/run/ladder", 1,
subscribeStatusLadder); // ex) ladder=finish, ladder=run, ladder=fail
// publishder
ROS example
https://github.com/mac999/ROS
// main
Int main (int argc, char** argv)
{
// Initialize ROS
ros::init (argc, argv, "robot_master_controller");
ros::NodeHandle nh;
robot_master_controller robot_master;
signal(SIGINT, quit);
boost::thread
keyboard_thread(boost::bind(&robot_master_controller::keyLoop, &robot_master));
// subscriber
ros::Subscriber subStatusLadder = nh.subscribe ("reschy/status/run/ladder", 1,
subscribeStatusLadder); // ex) ladder=finish, ladder=run, ladder=fail
// publishder
PCL
https://daddynkidsmakers.blogspot.com/2015/08/ros_27.html
PCL
https://daddynkidsmakers.blogspot.com/2015/08/ros_27.html
Int main (int argc, char** argv)
{
// Initialize ROS
ros::init (argc, argv, "my_pcl_tutorial");
ros::NodeHandle nh;
// Create a ROS subscriber for the input point cloud
ros::Subscriber sub = nh.subscribe ("camera/depth/points", 1, cloud_cb);
// Create a ROS publisher for the output model coefficients
// pub = nh.advertise<pcl_msgs::ModelCoefficients> ("pclplaneoutput", 1);
pub = nh.advertise<sensor_msgs::PointCloud2> ("pclplaneoutput", 1);
// Spin
ros::spin ();
}
ROS, 센서, 무선 및 배터리 설치
https://daddynkidsmakers.blogspot.com/2015/08/tk1-ros.html
라즈비안 기반 ROS 설치
https://daddynkidsmakers.blogspot.com/2015/08/ros_6.html
아두이노/라즈베리파이와 ROS 연동하기
https://daddynkidsmakers.blogspot.com/2015/08/ros_46.html
아두이노/ROS/라즈베리파이 기반 RpLiDAR 활용
https://daddynkidsmakers.blogspot.com/2015/07/rplidar.html
https://daddynkidsmakers.blogspot.com/2019/12/nvidia-nano-lidar.html
벨로다인 LiDAR로 SLAM 만들기
https://daddynkidsmakers.blogspot.com/2019/06/lidar-slam.html
오드로이드 XU4 우분투와 ROS, RVIZ 설치하기
https://daddynkidsmakers.blogspot.com/2019/06/xu4-ros.html
고정밀 GNSS IMU와 ROS 연동하기
https://daddynkidsmakers.blogspot.com/2019/06/gnss-ros.html
유클리드 거리 기반 3차원 포인트 클라우드 세그먼테이션
https://daddynkidsmakers.blogspot.com/2015/08/3.html
공간 맵핑용 스테레오 이미지 센서 ZED 사용기
https://daddynkidsmakers.blogspot.com/2015/08/tk1-ros.html
우분투 기반 벨로다인 라이다와 ROS 설치, 연결 및 설정
https://daddynkidsmakers.blogspot.com/2019/06/odroid-veloview-ros.html
ROS기반 액추에이터 제어
https://daddynkidsmakers.blogspot.com/2015/11/ros-moveit.html
https://daddynkidsmakers.blogspot.com/2015/09/dynamixel-xm-430.html
로봇암 움직이는 기구학/역기구학과 ROS MoveIt
https://daddynkidsmakers.blogspot.com/2015/11/ros-moveit.html
Gazebo 설치 방법
https://daddynkidsmakers.blogspot.com/2015/09/gazebo.html
3차원 공간정보 스캔 마운트용 중량 6WD 로버 개발 방법
https://daddynkidsmakers.blogspot.com/2019/10/6wd.html
대용량 센서 데이터 취득 및 처리에 적합한 임베디드 개발 보드 비교 분석
https://daddynkidsmakers.blogspot.com/2015/08/blog-post_16.html
드론/로버 기반 원격 센서 데이터 취득 시스템 개발 시 기술, 고려사항 및 드론
활용 시 한계
https://daddynkidsmakers.blogspot.com/2016/07/blog-post.html
로보틱스 라이브러리 소개
https://daddynkidsmakers.blogspot.com/2019/09/mrpt.html
1. Shafiee, Mohammad Javad, Brendan Chywl, Francis Li, and Alexander Wong. "Fast YOLO: A Fast You Only Look Once
System for Real-time Embedded Object Detection in Video." arXiv preprint arXiv:1709.05943 (2017).
2. Alan Safe, 2016.2.12, How the Internet of Things is Impacting the Construction Industry, For Construction Pros.com
3. Rachel Burger, 2015.7.28, Three Ways the Internet of Things Can Benefit Your Construction Project, Construction
Management
4. Jacqi Levy, 2016.4.28, 4 BIG ways the IoT is impacting design and construction, Internet of Things blog, IBM
5. whitelight group, 2014.8.18, How the Internet of Things is transforming the construction industry
6. Rachel Burger, 2016.8.5, How "The Internet of Things" is Affecting the Construction Industry, the balance.com
7. AIG, Human Condition Safety: Using Sensors to Improve Worker Safety
8. Niina Gromov, 2015.11.23, Offering Value through Internet of Things Case: Construction Companies in Finland, School of
Science, Aalto University
9. Wipro Digital, 2016.4.1, CASE STUDY: INCREASING CUSTOMER VALUE THROUGH IOT FOR JCB INDIA
10. Monitor Deloitte, 2015.7, Every. Thing. Connected.
11. Laura Black, 2015.8.12, An Inside Look at Autodesk’s Project Aquila, ConstructionTech
12. Jeff Walsh, 2015.10.1, Human Condition Aims to Transform Construction-Site Safety With Wearables, Line shape space.com
13. Insights, IoT Logistics Are Transforming the Trucking Industry
14. Chris Topham, 2015.9.10, Case Study: Northumbria Specialist Care Hospital Pushes KNX into the IoT, Abtec Building
Technologies
15. Mike Chino, 2015.11.6, Intel’s Smart Tiny House packs futuristic technology into 264 square feet, inhabitat
16. Wanda Lau, 2016.5.9, KieranTimberlake Offers a New Tool for Architects Wanting an In on IoT
17. CADDIGEST, 2016.7.7, IBM Watson IoT Platform to Add Intelligence to Buildings Worldwide
18. http://daddynkidsmakers.blogspot.com/
19. Oxford Robotics Institute, 2017, Vote3Deep: Fast Object Detection in 3D Point Clouds Using Efficient Convolutional Neural
Networks, ICRA
20. 강태욱, 임지순 역, 2015.2, 스마트 홈 오토메이션, 씨아이알
21. 강태욱, 현소영 역, 2014.12, 스마트 빌딩 시스템, 씨아이알
Reference
KICT

Weitere ähnliche Inhalte

Was ist angesagt?

第1回ROS勉強会発表資料 ROS+Gazeboではじめるロボットシミュレーション
第1回ROS勉強会発表資料 ROS+Gazeboではじめるロボットシミュレーション第1回ROS勉強会発表資料 ROS+Gazeboではじめるロボットシミュレーション
第1回ROS勉強会発表資料 ROS+Gazeboではじめるロボットシミュレーションakio19937
 
ビーズセッターロボットのためのDYNAMIXEL Workbenchの評価
ビーズセッターロボットのためのDYNAMIXEL Workbenchの評価ビーズセッターロボットのためのDYNAMIXEL Workbenchの評価
ビーズセッターロボットのためのDYNAMIXEL Workbenchの評価Hirokazu Onomichi
 
20160414 ROS 2차 강의 (for 아스라다 팀)
20160414 ROS 2차 강의 (for 아스라다 팀)20160414 ROS 2차 강의 (for 아스라다 팀)
20160414 ROS 2차 강의 (for 아스라다 팀)Yoonseok Pyo
 
ruby-ffiについてざっくり解説
ruby-ffiについてざっくり解説ruby-ffiについてざっくり解説
ruby-ffiについてざっくり解説ota42y
 
Intel RealSense for ROSConJP20221121.pdf
Intel RealSense for ROSConJP20221121.pdfIntel RealSense for ROSConJP20221121.pdf
Intel RealSense for ROSConJP20221121.pdfTakumi14
 
ロボット・ソフトウェア開発環境ROSとは何か? (in Japanese)
ロボット・ソフトウェア開発環境ROSとは何か? (in Japanese)ロボット・ソフトウェア開発環境ROSとは何か? (in Japanese)
ロボット・ソフトウェア開発環境ROSとは何か? (in Japanese)Toshihiko Yamakami
 
MoveItの新機能、 pilz industrial motion を試してみた
MoveItの新機能、 pilz industrial motion を試してみたMoveItの新機能、 pilz industrial motion を試してみた
MoveItの新機能、 pilz industrial motion を試してみたRyo Kabutan
 
Robot Control using ROS: an Introduction
Robot Control using ROS: an IntroductionRobot Control using ROS: an Introduction
Robot Control using ROS: an IntroductionJago Robotika Indonesia
 
Pycon2013 : Application of Python in Robotics
Pycon2013  : Application of Python in RoboticsPycon2013  : Application of Python in Robotics
Pycon2013 : Application of Python in RoboticsLentin Joseph
 
Camera2APIと画像フォーマット
Camera2APIと画像フォーマットCamera2APIと画像フォーマット
Camera2APIと画像フォーマットKiyotaka Soranaka
 
リンク機構を有するロボットをGazeboで動かす
リンク機構を有するロボットをGazeboで動かすリンク機構を有するロボットをGazeboで動かす
リンク機構を有するロボットをGazeboで動かすtomohiro kuwano
 
シーケンス図とアクティビティ図と状態遷移図
シーケンス図とアクティビティ図と状態遷移図シーケンス図とアクティビティ図と状態遷移図
シーケンス図とアクティビティ図と状態遷移図akipii Oga
 
06 第5.1節-第5.7節 ROS2に対応したツール/パッケージ
06 第5.1節-第5.7節 ROS2に対応したツール/パッケージ06 第5.1節-第5.7節 ROS2に対応したツール/パッケージ
06 第5.1節-第5.7節 ROS2に対応したツール/パッケージMori Ken
 
ROSCon_New_TB3_Friends_Toukairinn.pptx
ROSCon_New_TB3_Friends_Toukairinn.pptxROSCon_New_TB3_Friends_Toukairinn.pptx
ROSCon_New_TB3_Friends_Toukairinn.pptxToukairinn
 
01 ROS2 実用化に関するサーベイ ROS2勉強合宿 @別府温泉
01 ROS2 実用化に関するサーベイ ROS2勉強合宿 @別府温泉01 ROS2 実用化に関するサーベイ ROS2勉強合宿 @別府温泉
01 ROS2 実用化に関するサーベイ ROS2勉強合宿 @別府温泉Mori Ken
 
제3회 오픈 로보틱스 세미나 (제12세션) : 로봇 암 모델링과 MoveIt! 사용법
제3회 오픈 로보틱스 세미나 (제12세션) : 로봇 암 모델링과 MoveIt! 사용법제3회 오픈 로보틱스 세미나 (제12세션) : 로봇 암 모델링과 MoveIt! 사용법
제3회 오픈 로보틱스 세미나 (제12세션) : 로봇 암 모델링과 MoveIt! 사용법Yoonseok Pyo
 
03 第3.6節-第3.8節 ROS2の基本機能(2/2)
03 第3.6節-第3.8節 ROS2の基本機能(2/2)03 第3.6節-第3.8節 ROS2の基本機能(2/2)
03 第3.6節-第3.8節 ROS2の基本機能(2/2)Mori Ken
 

Was ist angesagt? (20)

第1回ROS勉強会発表資料 ROS+Gazeboではじめるロボットシミュレーション
第1回ROS勉強会発表資料 ROS+Gazeboではじめるロボットシミュレーション第1回ROS勉強会発表資料 ROS+Gazeboではじめるロボットシミュレーション
第1回ROS勉強会発表資料 ROS+Gazeboではじめるロボットシミュレーション
 
ビーズセッターロボットのためのDYNAMIXEL Workbenchの評価
ビーズセッターロボットのためのDYNAMIXEL Workbenchの評価ビーズセッターロボットのためのDYNAMIXEL Workbenchの評価
ビーズセッターロボットのためのDYNAMIXEL Workbenchの評価
 
20160414 ROS 2차 강의 (for 아스라다 팀)
20160414 ROS 2차 강의 (for 아스라다 팀)20160414 ROS 2차 강의 (for 아스라다 팀)
20160414 ROS 2차 강의 (for 아스라다 팀)
 
ruby-ffiについてざっくり解説
ruby-ffiについてざっくり解説ruby-ffiについてざっくり解説
ruby-ffiについてざっくり解説
 
Intel RealSense for ROSConJP20221121.pdf
Intel RealSense for ROSConJP20221121.pdfIntel RealSense for ROSConJP20221121.pdf
Intel RealSense for ROSConJP20221121.pdf
 
UnityとROSの連携について
UnityとROSの連携についてUnityとROSの連携について
UnityとROSの連携について
 
ロボット・ソフトウェア開発環境ROSとは何か? (in Japanese)
ロボット・ソフトウェア開発環境ROSとは何か? (in Japanese)ロボット・ソフトウェア開発環境ROSとは何か? (in Japanese)
ロボット・ソフトウェア開発環境ROSとは何か? (in Japanese)
 
MoveItの新機能、 pilz industrial motion を試してみた
MoveItの新機能、 pilz industrial motion を試してみたMoveItの新機能、 pilz industrial motion を試してみた
MoveItの新機能、 pilz industrial motion を試してみた
 
Robot Control using ROS: an Introduction
Robot Control using ROS: an IntroductionRobot Control using ROS: an Introduction
Robot Control using ROS: an Introduction
 
Pycon2013 : Application of Python in Robotics
Pycon2013  : Application of Python in RoboticsPycon2013  : Application of Python in Robotics
Pycon2013 : Application of Python in Robotics
 
Guide to ROS tools
Guide to ROS tools Guide to ROS tools
Guide to ROS tools
 
Camera2APIと画像フォーマット
Camera2APIと画像フォーマットCamera2APIと画像フォーマット
Camera2APIと画像フォーマット
 
リンク機構を有するロボットをGazeboで動かす
リンク機構を有するロボットをGazeboで動かすリンク機構を有するロボットをGazeboで動かす
リンク機構を有するロボットをGazeboで動かす
 
シーケンス図とアクティビティ図と状態遷移図
シーケンス図とアクティビティ図と状態遷移図シーケンス図とアクティビティ図と状態遷移図
シーケンス図とアクティビティ図と状態遷移図
 
06 第5.1節-第5.7節 ROS2に対応したツール/パッケージ
06 第5.1節-第5.7節 ROS2に対応したツール/パッケージ06 第5.1節-第5.7節 ROS2に対応したツール/パッケージ
06 第5.1節-第5.7節 ROS2に対応したツール/パッケージ
 
ROSCon_New_TB3_Friends_Toukairinn.pptx
ROSCon_New_TB3_Friends_Toukairinn.pptxROSCon_New_TB3_Friends_Toukairinn.pptx
ROSCon_New_TB3_Friends_Toukairinn.pptx
 
ROSでつながるVRChat
ROSでつながるVRChatROSでつながるVRChat
ROSでつながるVRChat
 
01 ROS2 実用化に関するサーベイ ROS2勉強合宿 @別府温泉
01 ROS2 実用化に関するサーベイ ROS2勉強合宿 @別府温泉01 ROS2 実用化に関するサーベイ ROS2勉強合宿 @別府温泉
01 ROS2 実用化に関するサーベイ ROS2勉強合宿 @別府温泉
 
제3회 오픈 로보틱스 세미나 (제12세션) : 로봇 암 모델링과 MoveIt! 사용법
제3회 오픈 로보틱스 세미나 (제12세션) : 로봇 암 모델링과 MoveIt! 사용법제3회 오픈 로보틱스 세미나 (제12세션) : 로봇 암 모델링과 MoveIt! 사용법
제3회 오픈 로보틱스 세미나 (제12세션) : 로봇 암 모델링과 MoveIt! 사용법
 
03 第3.6節-第3.8節 ROS2の基本機能(2/2)
03 第3.6節-第3.8節 ROS2の基本機能(2/2)03 第3.6節-第3.8節 ROS2の基本機能(2/2)
03 第3.6節-第3.8節 ROS2の基本機能(2/2)
 

Ähnlich wie 오픈소스 ROS기반 건설 로보틱스 기술 개발

라즈베리파이로 슬랙 봇 개발하기
라즈베리파이로 슬랙 봇 개발하기라즈베리파이로 슬랙 봇 개발하기
라즈베리파이로 슬랙 봇 개발하기YunSeop Song
 
20150708 ros seminar_in_busan_korea
20150708 ros seminar_in_busan_korea20150708 ros seminar_in_busan_korea
20150708 ros seminar_in_busan_koreaYoonseok Pyo
 
제3회 오픈 로보틱스 세미나 (제7세션) : 로봇운영체제ROS 개론
제3회 오픈 로보틱스 세미나 (제7세션) : 로봇운영체제ROS 개론제3회 오픈 로보틱스 세미나 (제7세션) : 로봇운영체제ROS 개론
제3회 오픈 로보틱스 세미나 (제7세션) : 로봇운영체제ROS 개론Yoonseok Pyo
 
KYSR 3rd Seminar 경희대학교 이순걸 교수
KYSR 3rd Seminar 경희대학교 이순걸 교수KYSR 3rd Seminar 경희대학교 이순걸 교수
KYSR 3rd Seminar 경희대학교 이순걸 교수Suhwan Park
 
2017 R-Biz Challange 터틀봇3 오토레이스
2017 R-Biz Challange 터틀봇3 오토레이스2017 R-Biz Challange 터틀봇3 오토레이스
2017 R-Biz Challange 터틀봇3 오토레이스NAVER Engineering
 
ROS SERIAL and OpenCR
ROS SERIAL and OpenCRROS SERIAL and OpenCR
ROS SERIAL and OpenCRYoonseok Pyo
 
안전한세상만들기[무단횡단사고방지시스템]제안서최종본
안전한세상만들기[무단횡단사고방지시스템]제안서최종본안전한세상만들기[무단횡단사고방지시스템]제안서최종본
안전한세상만들기[무단횡단사고방지시스템]제안서최종본재성 장
 
초보 개발자/학생들을 위한 오픈소스 트랜드
초보 개발자/학생들을 위한 오픈소스 트랜드 초보 개발자/학생들을 위한 오픈소스 트랜드
초보 개발자/학생들을 위한 오픈소스 트랜드 YoungSu Son
 
라즈베리파이와 자바스크립트로 IoT 시작하기
라즈베리파이와 자바스크립트로 IoT 시작하기라즈베리파이와 자바스크립트로 IoT 시작하기
라즈베리파이와 자바스크립트로 IoT 시작하기Circulus
 

Ähnlich wie 오픈소스 ROS기반 건설 로보틱스 기술 개발 (11)

라즈베리파이로 슬랙 봇 개발하기
라즈베리파이로 슬랙 봇 개발하기라즈베리파이로 슬랙 봇 개발하기
라즈베리파이로 슬랙 봇 개발하기
 
20150708 ros seminar_in_busan_korea
20150708 ros seminar_in_busan_korea20150708 ros seminar_in_busan_korea
20150708 ros seminar_in_busan_korea
 
Hardware
HardwareHardware
Hardware
 
Designing Apps for Motorla Xoom Tablet
Designing Apps for Motorla Xoom TabletDesigning Apps for Motorla Xoom Tablet
Designing Apps for Motorla Xoom Tablet
 
제3회 오픈 로보틱스 세미나 (제7세션) : 로봇운영체제ROS 개론
제3회 오픈 로보틱스 세미나 (제7세션) : 로봇운영체제ROS 개론제3회 오픈 로보틱스 세미나 (제7세션) : 로봇운영체제ROS 개론
제3회 오픈 로보틱스 세미나 (제7세션) : 로봇운영체제ROS 개론
 
KYSR 3rd Seminar 경희대학교 이순걸 교수
KYSR 3rd Seminar 경희대학교 이순걸 교수KYSR 3rd Seminar 경희대학교 이순걸 교수
KYSR 3rd Seminar 경희대학교 이순걸 교수
 
2017 R-Biz Challange 터틀봇3 오토레이스
2017 R-Biz Challange 터틀봇3 오토레이스2017 R-Biz Challange 터틀봇3 오토레이스
2017 R-Biz Challange 터틀봇3 오토레이스
 
ROS SERIAL and OpenCR
ROS SERIAL and OpenCRROS SERIAL and OpenCR
ROS SERIAL and OpenCR
 
안전한세상만들기[무단횡단사고방지시스템]제안서최종본
안전한세상만들기[무단횡단사고방지시스템]제안서최종본안전한세상만들기[무단횡단사고방지시스템]제안서최종본
안전한세상만들기[무단횡단사고방지시스템]제안서최종본
 
초보 개발자/학생들을 위한 오픈소스 트랜드
초보 개발자/학생들을 위한 오픈소스 트랜드 초보 개발자/학생들을 위한 오픈소스 트랜드
초보 개발자/학생들을 위한 오픈소스 트랜드
 
라즈베리파이와 자바스크립트로 IoT 시작하기
라즈베리파이와 자바스크립트로 IoT 시작하기라즈베리파이와 자바스크립트로 IoT 시작하기
라즈베리파이와 자바스크립트로 IoT 시작하기
 

Mehr von Tae wook kang

3D 모델러 ADDIN 개발과정 요약
3D 모델러 ADDIN 개발과정 요약3D 모델러 ADDIN 개발과정 요약
3D 모델러 ADDIN 개발과정 요약Tae wook kang
 
오픈소스로 쉽게 따라해보는 Unreal과 IoT 연계 및 개발 방법 소개.pdf
오픈소스로 쉽게 따라해보는 Unreal과 IoT 연계 및 개발 방법 소개.pdf오픈소스로 쉽게 따라해보는 Unreal과 IoT 연계 및 개발 방법 소개.pdf
오픈소스로 쉽게 따라해보는 Unreal과 IoT 연계 및 개발 방법 소개.pdfTae wook kang
 
Python과 node.js기반 데이터 분석 및 가시화
Python과 node.js기반 데이터 분석 및 가시화Python과 node.js기반 데이터 분석 및 가시화
Python과 node.js기반 데이터 분석 및 가시화Tae wook kang
 
BIM 표준과 구현 (standard and development)
BIM 표준과 구현 (standard and development)BIM 표준과 구현 (standard and development)
BIM 표준과 구현 (standard and development)Tae wook kang
 
ISO 19166 BIM-GIS conceptual mapping
ISO 19166 BIM-GIS conceptual mappingISO 19166 BIM-GIS conceptual mapping
ISO 19166 BIM-GIS conceptual mappingTae wook kang
 
SBF(Scan-BIM-Field) 기반 스마트 시설물 관리 기술 개발
SBF(Scan-BIM-Field) 기반 스마트 시설물 관리 기술 개발SBF(Scan-BIM-Field) 기반 스마트 시설물 관리 기술 개발
SBF(Scan-BIM-Field) 기반 스마트 시설물 관리 기술 개발Tae wook kang
 
한국 건설 기술 전망과 건설 테크 스타트업 소개
한국 건설 기술 전망과 건설 테크 스타트업 소개한국 건설 기술 전망과 건설 테크 스타트업 소개
한국 건설 기술 전망과 건설 테크 스타트업 소개Tae wook kang
 
Coding, maker and SDP
Coding, maker and SDPCoding, maker and SDP
Coding, maker and SDPTae wook kang
 
오픈 데이터, 팹시티와 메이커
오픈 데이터, 팹시티와 메이커오픈 데이터, 팹시티와 메이커
오픈 데이터, 팹시티와 메이커Tae wook kang
 
AI - Media Art. 인공지능과 미디어아트
AI - Media Art. 인공지능과 미디어아트AI - Media Art. 인공지능과 미디어아트
AI - Media Art. 인공지능과 미디어아트Tae wook kang
 
ISO 19166 BIM to GIS conceptual mapping China (WUHAN) meeting
ISO 19166 BIM to GIS conceptual mapping China (WUHAN) meetingISO 19166 BIM to GIS conceptual mapping China (WUHAN) meeting
ISO 19166 BIM to GIS conceptual mapping China (WUHAN) meetingTae wook kang
 
건설 스타트업과 오픈소스
건설 스타트업과 오픈소스건설 스타트업과 오픈소스
건설 스타트업과 오픈소스Tae wook kang
 
블록체인 기반 건설 스마트 서비스와 계약
블록체인 기반 건설 스마트 서비스와 계약블록체인 기반 건설 스마트 서비스와 계약
블록체인 기반 건설 스마트 서비스와 계약Tae wook kang
 
4차산업혁명과 건설, 그리고 블록체인
4차산업혁명과 건설, 그리고 블록체인4차산업혁명과 건설, 그리고 블록체인
4차산업혁명과 건설, 그리고 블록체인Tae wook kang
 
Case Study about BIM on GIS platform development project with the standard model
Case Study about BIM on GIS platform development project with the standard modelCase Study about BIM on GIS platform development project with the standard model
Case Study about BIM on GIS platform development project with the standard modelTae wook kang
 
도시 인프라 공간정보 데이터 커넥션-통합 기술 표준화를 위한 ISO TC211 19166 개발 이야기
도시 인프라 공간정보 데이터 커넥션-통합 기술 표준화를 위한 ISO TC211 19166 개발 이야기 도시 인프라 공간정보 데이터 커넥션-통합 기술 표준화를 위한 ISO TC211 19166 개발 이야기
도시 인프라 공간정보 데이터 커넥션-통합 기술 표준화를 위한 ISO TC211 19166 개발 이야기 Tae wook kang
 
Smart BIM for Facility Management
Smart BIM for Facility ManagementSmart BIM for Facility Management
Smart BIM for Facility ManagementTae wook kang
 
메이커 시티와 메이커 운동 참여를 통해 얻은 것
메이커 시티와 메이커 운동 참여를 통해 얻은 것메이커 시티와 메이커 운동 참여를 통해 얻은 것
메이커 시티와 메이커 운동 참여를 통해 얻은 것Tae wook kang
 
최신 3차원 이미지 스캔 역설계 기술 전망 및 건설 활용
최신 3차원 이미지 스캔 역설계 기술 전망 및 건설 활용최신 3차원 이미지 스캔 역설계 기술 전망 및 건설 활용
최신 3차원 이미지 스캔 역설계 기술 전망 및 건설 활용Tae wook kang
 
IoT 기반 건설 지능화와 BIM
IoT 기반 건설 지능화와 BIMIoT 기반 건설 지능화와 BIM
IoT 기반 건설 지능화와 BIMTae wook kang
 

Mehr von Tae wook kang (20)

3D 모델러 ADDIN 개발과정 요약
3D 모델러 ADDIN 개발과정 요약3D 모델러 ADDIN 개발과정 요약
3D 모델러 ADDIN 개발과정 요약
 
오픈소스로 쉽게 따라해보는 Unreal과 IoT 연계 및 개발 방법 소개.pdf
오픈소스로 쉽게 따라해보는 Unreal과 IoT 연계 및 개발 방법 소개.pdf오픈소스로 쉽게 따라해보는 Unreal과 IoT 연계 및 개발 방법 소개.pdf
오픈소스로 쉽게 따라해보는 Unreal과 IoT 연계 및 개발 방법 소개.pdf
 
Python과 node.js기반 데이터 분석 및 가시화
Python과 node.js기반 데이터 분석 및 가시화Python과 node.js기반 데이터 분석 및 가시화
Python과 node.js기반 데이터 분석 및 가시화
 
BIM 표준과 구현 (standard and development)
BIM 표준과 구현 (standard and development)BIM 표준과 구현 (standard and development)
BIM 표준과 구현 (standard and development)
 
ISO 19166 BIM-GIS conceptual mapping
ISO 19166 BIM-GIS conceptual mappingISO 19166 BIM-GIS conceptual mapping
ISO 19166 BIM-GIS conceptual mapping
 
SBF(Scan-BIM-Field) 기반 스마트 시설물 관리 기술 개발
SBF(Scan-BIM-Field) 기반 스마트 시설물 관리 기술 개발SBF(Scan-BIM-Field) 기반 스마트 시설물 관리 기술 개발
SBF(Scan-BIM-Field) 기반 스마트 시설물 관리 기술 개발
 
한국 건설 기술 전망과 건설 테크 스타트업 소개
한국 건설 기술 전망과 건설 테크 스타트업 소개한국 건설 기술 전망과 건설 테크 스타트업 소개
한국 건설 기술 전망과 건설 테크 스타트업 소개
 
Coding, maker and SDP
Coding, maker and SDPCoding, maker and SDP
Coding, maker and SDP
 
오픈 데이터, 팹시티와 메이커
오픈 데이터, 팹시티와 메이커오픈 데이터, 팹시티와 메이커
오픈 데이터, 팹시티와 메이커
 
AI - Media Art. 인공지능과 미디어아트
AI - Media Art. 인공지능과 미디어아트AI - Media Art. 인공지능과 미디어아트
AI - Media Art. 인공지능과 미디어아트
 
ISO 19166 BIM to GIS conceptual mapping China (WUHAN) meeting
ISO 19166 BIM to GIS conceptual mapping China (WUHAN) meetingISO 19166 BIM to GIS conceptual mapping China (WUHAN) meeting
ISO 19166 BIM to GIS conceptual mapping China (WUHAN) meeting
 
건설 스타트업과 오픈소스
건설 스타트업과 오픈소스건설 스타트업과 오픈소스
건설 스타트업과 오픈소스
 
블록체인 기반 건설 스마트 서비스와 계약
블록체인 기반 건설 스마트 서비스와 계약블록체인 기반 건설 스마트 서비스와 계약
블록체인 기반 건설 스마트 서비스와 계약
 
4차산업혁명과 건설, 그리고 블록체인
4차산업혁명과 건설, 그리고 블록체인4차산업혁명과 건설, 그리고 블록체인
4차산업혁명과 건설, 그리고 블록체인
 
Case Study about BIM on GIS platform development project with the standard model
Case Study about BIM on GIS platform development project with the standard modelCase Study about BIM on GIS platform development project with the standard model
Case Study about BIM on GIS platform development project with the standard model
 
도시 인프라 공간정보 데이터 커넥션-통합 기술 표준화를 위한 ISO TC211 19166 개발 이야기
도시 인프라 공간정보 데이터 커넥션-통합 기술 표준화를 위한 ISO TC211 19166 개발 이야기 도시 인프라 공간정보 데이터 커넥션-통합 기술 표준화를 위한 ISO TC211 19166 개발 이야기
도시 인프라 공간정보 데이터 커넥션-통합 기술 표준화를 위한 ISO TC211 19166 개발 이야기
 
Smart BIM for Facility Management
Smart BIM for Facility ManagementSmart BIM for Facility Management
Smart BIM for Facility Management
 
메이커 시티와 메이커 운동 참여를 통해 얻은 것
메이커 시티와 메이커 운동 참여를 통해 얻은 것메이커 시티와 메이커 운동 참여를 통해 얻은 것
메이커 시티와 메이커 운동 참여를 통해 얻은 것
 
최신 3차원 이미지 스캔 역설계 기술 전망 및 건설 활용
최신 3차원 이미지 스캔 역설계 기술 전망 및 건설 활용최신 3차원 이미지 스캔 역설계 기술 전망 및 건설 활용
최신 3차원 이미지 스캔 역설계 기술 전망 및 건설 활용
 
IoT 기반 건설 지능화와 BIM
IoT 기반 건설 지능화와 BIMIoT 기반 건설 지능화와 BIM
IoT 기반 건설 지능화와 BIM
 

오픈소스 ROS기반 건설 로보틱스 기술 개발

  • 1. ROS기반 건설 로보틱스 기술 개발 ROS based Construction Robotics Tech Development 2020.4 강태욱 공학박사 한국건설기술연구원 연구위원 Ph.D Taewook, Kang laputa99999@gmail.com sites.google.com/site/bimprinciple
  • 2. Maker, Ph.D. 12 books author TK. Kang
  • 4. Autonomous Field Monitoring - Doxel Funding $4.5M, 2017 2016
  • 5. Autonomous construction – Built Robotics Funding $15 M, 2017
  • 6. Robotics – Robot Operating System(ROS). Open Drone Map. Arduino. Mission planner. Trimble GPS 카메라 카메라 스캐너 IMU DMI KICT
  • 7. Open source - Github OpenSlicer
  • 8. Open source http://guswnsxodlf.github.io/software-license GNU General Public License(GPL) 2.0 – 의무 엄격. SW 수정 및 링크 경우 소스코드 제공 의무 GNU Lesser GPL(LGPL) 2.1 – 저작권 표시. LPGL 명시. 수정한 라이브러리 소스코드 공개 Berkeley Software Distribution(BSD) License – 소스코드 공개의무 없음. 상용 SW 무제한 사용 가능 Apache License – BSD와 유사. 소스코드 공개의무 없음 Mozilla Public License(MPL) – 소스코드 공개의무 없음. 수정 코드는 MPL에 의해 배포 MIT License – 라이선스 / 저작권만 명시 조건
  • 9. ROS ROS는 2007년 5월 미국의 스탠퍼드 대학 인공지능 연구소가 진행하던 STAIR(STandford AI Robot) 프로젝트를 위해 Morgan Quigley 가 개발한 Switchyard 라는 시스템에서 시작 라이센스는 BSD 3-Clause Ubuntu install of ROS Melodic
  • 10. ROS ROS Tutorials ROS Environment Variables $ gedit ~/.bashrc # Set ROS Indigo source /opt/ros/indigo/setup.bash source ~/catkin_ws/devel/setup.bash # Set ROS Network export ROS_MASTER_URI=http://xxx.xxx.xxx.xxx:11311 export ROS_HOSTNAME=xxx.xxx.xxx.xxx # set ROS alias command alias cw='cd ~/catkin_ws' alias cs='cd ~/catkin_ws/src' alias cm='cd ~/catkin_ws && catkin_make' ROS 개발 환경 구축 ROS 요약 상세 정리
  • 12. ROS example https://github.com/mac999/ROS 장애물 지역 돌파 사다리 오르기 밸브 잠그기 인명구조 출입문 통과 장애물 제거 2DOF의 4족, 총8DOF의 기동부를 조종하여 이동 특수 돌기가 있는 캐터필러로 45도까지 등판가능 RGBD센서정보를 보고 RF 조종기로 벽돌을 제거 Object recognition으로 문을 인식하고, 3D 포인트 클라우드 기반 비전으로 주변지도를 보고 기동부 자율주행하여 통과 Object recognition으로 밸브를 인식하고, 3D 포인트 클라우드 기반 비전으로 밸브에 접근하여 로봇암 제어로 밸브 잠그기 https://daddynkidsmakers.blogspot.com/2015/07/blog-post_22.html
  • 13. ROS example 아두 이노 라즈 베리 파이 IMU 로봇 자체 상황 모니터링 입력RGBD 인식결과 https://www.youtube.com/ watch?v=dEDIUaou49E
  • 14. ROS example 기구부 RF 조종사 로봇 시스템 통합 관제사 기구부 자동 조정 조정사 기구부 전후진 기구부 회전 기구부 RF 조정 무선신호 전송 기구부 RF 조정 무선신호 수신 기구부 RF 조정 신호 해석/제어 로봇암 카메라 이미지 확인 로봇 ROS 노드 실행 제어 기구부 RF 제어 시작 기구부 RF 제어 종료 로봇암 RF 제어 시작 로봇암 RF 제어 종료 사다리 미션 자동 제어 시작 사다리 미션 자동 제어 종료 문열기 미션 자동 제어 시작 문열기 미션 자동 제어 종료 계단 미션 자동 제어 시작 계단 미션 자동 제어 종료 로봇 제어 종료 로봇 제어 시작 RGB-D 센서 종료 로봇암 Pi 카메라 종료 기구부 구동 시작 기구부 구동 정지 로봇암 RF 조종사 로봇암부 회전 로봇암 엔드 전후진 로봇암 엔드 좌우 이동 로봇암 RF 조정 무선신호 전송 로봇암 RF 조정 무선신호 수신 로봇암 RF 조정 신호 해석/제어 로봇암 카메라 이미지 확인 로봇암 구동 시작 로봇암 구동 정지 로봇 ROS 노드 실행 제어 사다리 미션 자동 제어 시작 문열기 미션 자동 제어 시작 계단 미션 자동 제어 시작 자동 제어 비상 정지 RGB-D 센서 시작 로봇암 Pi 카메라 시작 Use cases
  • 15. 물리 컴포넌트 모든 노드는 고정 ip wifi 로 연결되어 있음. 마스터 PC는 i5이상 노트북 사용. 마스터 노드 구동. 로봇 구동 보드는 TK1임. TK1에 카메라, XTion 연결해 ROS node 구동함. IMU 센서는 라즈베리파이 사용함 (라즈베리파이는 기본 센서만 사용). <<node>>: ROS node robot_master_controller <<node>> robot_body_controller <<node>> robot_sensor_IMU <<node>> robot_sensor_camera <<node>> robot_sensor_RGBD <<node>> drc_stair_mission_automation <<node>> drc_door_mission_automation <<node>> drc_ladder_mission_automation <<node>>robot_body_RF_Controller <<OpenCM>> robot_arm_RF_controller <<OpenCM>>
  • 16. 개발 컴포넌트 reschy ROS패키지 아래, 각 컴포넌트가 node로 개발되어 있음. 각 컴포넌트 이름은 node 소스 파일 이름임. <<node>>: ROS node robot_master_controller <<node>> robot_body_controller <<node>> robot_sensor_IMU <<node>> robot_sensor_camera <<node>> robot_sensor_RGBD <<node>> drc_stair_mission_automation <<node>> drc_door_mission_automation <<node>> drc_ladder_mission_automation <<node>>robot_body_RF_Controller <<OpenCM>> robot_arm_RF_controller <<OpenCM>>
  • 17. 개발 클래스 / 모듈 각 클래스/모듈 이름은 혼란스럽지 않도록, 컴포넌트 node 이름과 동일하게 함. 참고로, 클래스를 사용하지 않은 경우는, 전역 함수 및 변수만 사용되므로, 클래스 이름이 크게 관계는 없음. robot_master_controller <<node>> +inputControllKey() +startRobotBody(active: bool) +startRobotArm(active: bool) +startCamera(active: bool) +startRGBD(active: bool) +startIMU(active: bool) +startAutonomousMode(active: bool, mission: int) +stopAutonomousModel() <<static>>+subscribeNodeMessage() <<static>>+publishNodeMessage() robot_sensor_RGBD <<node>> +pointCloudSegmentation() <<static>>+subscribeOpenNIMessage() <<static>>+publishSegmentationMessage() robot_sensor_IMU <<node>> +kalmanFiltering() <<static>>+subscribeControlMessage() <<static>>+publishSensorMessage() robot_camera <<node>> <<static>>+subscribeControlMessage() <<static>>+publishSensorMessage() ladder_mission_automation <<node>> +findLadderAndMoveToFront() +PIDcontrol() +moveRobotBody() +isTouchLadderTop() +canSeeFrontDoor() +moveToLadderTop() <<static>>+subscribeControlMessage() <<static>>+publishStatusMessage() robot_body_controller <<node>> +moveBody(float leftDistance, float rightDistance) +rotateBody(float angle) <<static>>+subscribeControlMessage() <<static>>+publishStatusMessage() robot_arm_controller <<node>> +moveEnd(float xOffset, float yOffset, float zOffset) +rotateArmbody(float angle) stair_mission_automation <<node>> door_mission_automation <<node>> robot_body_motor_controller <<OpenCM>> robot_arm_motor_controller <<OpenCM>> robot_sensor_camera <<rasberrypi>>
  • 18. Battery BatteryBattery TK1 RPi 하드웨어 연결 디자인 최종 하드웨어 연결 디자인은 다음과 같음. TK1 BatteryRPi XTion XTion RPi CAM USB CAM man RF controller IMURF USB CAM
  • 19. 다음과 같이 메시지 포맷이 정의되어 있다고 가정하고 개발할 것. 괄호 안은 데이터 타입임. 메시지 유형 재정의가 귀찮아, 가능한, ROS에서 잘 정의된 메시지 유형을 최대한 재활용하기로 함. RGB-D, Camera 센서를 제외한, 나머지 IMU, 액추에이터 센서 등은 std_msgs::String 메시지 유형이며, 데이터는 ‘,’로 구분 됨. reschy/네이스페이스는 직접 개발해야할 메시지 유형임. ros/네임스페이스는 ros에서 기본으로 제공해 주는 메시지 유형. 1. reschy/control/active/[ladder | door | stair]=[on | off] : on 이면 해당 미션 자동 실행, off 면 해당 미션 실행 종료. 2. reschy/control/run/[ladder | door | stair] : robot_master_controller에 의해 타이머로 메시지가 발생되며, 미션의 한 단 계씩 run 시키는 역할. 3. reschy/status/run/[ladder | door | stair]=[run | finish | fail] : run이면 실행 중, finish면 미션 성공, fail이면 미션 실패. 4. reschy/sensor/active/imu = [on | off] : on이면 imu 동작, off이면 imu 비활성화 5. reschy/sensor/imu = roll,pitch,yaw : std::string 타입으로, ‘,’로 구분됨. 각각 roll, pitch, yaw임. 6. reschy/control/active/motor = [on | off] : on이면 motor 동작, off이면 motor 멈춤. 7. reschy/control/motor/data = [#Id_list Position Speed Time] [Id_list Position Speed Time]… : 모터 ID들을 정의하고, 그 이후에 모터ID가 서보모터 터입으로 정해져 있다면, Position, Speed를 설정하면 되며, 스태핑 모터 타입은 Speed와 Time을 설정하면, 그 대로 해당 ID에 데이터가 전달되어, 모터가 구동됨. Position은 0도에서 360도까지, Speed는 0에 서 1023값 사이, Time은 millisecond로 설정하도록 함. 예) reschy/control/motor/data = #1,2,3,4,5 S300 T10 #6,7,8 P20 S100 * 각 ros node 개발 시 앞의 메시지 토픽 이름과 데이터 유형을 고려해서, 개발해야 하며, 만약, 미확정된 것이 있을 때는, 정의한 후, 개발하고, 이 문서에 반영해야 함. 아울러, 카톡 등에 관련 내용을 공지해야 함. ROS node 간 메시지 프로토콜 정의
  • 20. 다음과 같이 메시지 포맷이 정의되어 있다고 가정하고 개발할 것. 괄호 안은 데이터 타입임. 메시지 유형 재정의가 귀찮아, 가능한, ROS에서 잘 정의된 메시지 유형을 최대한 재활용하기로 함. RGB-D, Camera 센서를 제외한, 나머지 IMU, 액추에이터 센서 등은 std_msgs::String 메시지 유형이며, 데이터는 ‘,’로 구분됨. robot_sensor_camera robot_sensor_RGBD. robot_sensor_IMU reschy/sensor/active/ camera/on(std_msgs::String) reschy/sensor/active/ camera/off(std_msgs::String) ros/image(Image) reschy/sensor/active/ rgbd/on(std_msgs::String) reschy/sensor/active/rgbd/ off(std_msgs::String) reschy/sensor/segments (sensor_msg::PointCloud2) reschy/sensor/active/ imu/on(std_msgs::String) reschy/sensor/active/ imu/off(std_msgs::String) reschy/sensor/imu (std_msgs::String) reschy/sensor/AABB (sensor_msg::PointCloud2) ros/camera/depth/points (sensor_msg::PointCloud2) ros/image(Image) XYZI 유형. Meter단위. I는 세그먼트 인덱스 예) 0.12, 0.53, 5.23, 0 0.32, 0.63, 6.23, 0 … 0.52, 0.53, 5.23, 1 0.72, 0.63, 6.23, 1 XYZI 유형. 순서대로. #1. Center position #2. Maximum boundary position #3. Minimum boundary position … 예) X각, Y각, Z각, 높이 0.12, 0.53, 5.23, 3.5 ROS node 간 메시지 프로토콜 정의
  • 21. ROS는 이벤트 방식으로 모든 노드가 처리됨을 명심해야 함. robot_master_controller가 노드들을 관리함. robot_master_controller가 자동 미션 수행 노드에 센서 메시지를 동기화시켜 전달하게 하며, 아울러, 자동 미션 수행 노드 도 타이밍에 맞게 run 메시지를 전달해, 미션의 한 단계씩 실행하게 함. 현재 robot_master_controller에서 호출되는 node 에 대한 run 메시지는 5 Hz 빈도로 호출됨. 센서 데이터 취득도, 호출 빈 도를 고려해야 함. robot_master_ controller ladder_mission_ automation 1. reschy/control/active/ladder=on 6. reschy/control/run/ladder ladder_mission_ automation openni2 3. ros/camera/depth/points 2. rosrun openni2 opennni2.launch (TBD) 4. reschy/sensor/segments 5. reschy/sensor/AABB robot_body_ controller 7. reschy/control/run/body=left(0.2), right(0.2) <<thread>>keyLoop <<timer>> callbackTimerRun ROS node 간 메시지 호출 순서 예 – 사다리 미션
  • 22. 1. 노트북 PC rosrun reschy robot_master_controller 2. TK1: 아래는 shell batch 처리 필요함 rosrun reschy robot_body_controller rosrun reschy robot_arm_controller roslaunch openni2_launch openni2.launch rosrun uvc_camera uvc_camera_node 3. RPi rosrun reschy_sensor robot_sensor_imu 4. 노트북 PC : 토픽 메시지 정상 작동 확인을 위해 아래 명령 실행 rostopic list rviz rqt robot_master_ controller ladder_mission_ automation 1. reschy/control/active/ladder=on 6. reschy/control/run/ladder ladder_mission_ automation openni2 3. ros/camera/depth/points 2. rosrun openni2 opennni2.launch (TBD) 4. reschy/sensor/segments 5. reschy/sensor/AABB robot_body_ controller 7. reschy/control/run/body=left(0.2), right(0.2) <<thread>>keyLoop <<timer>> callbackTimerRun ROS node 실행 순서
  • 23. #include <ros/ros.h> #include <sensor_msgs/PointCloud2.h> #include <std_msgs/String.h> // PCL specific includes #include <pcl_conversions/pcl_conversions.h> #include <pcl/ros/conversions.h> #include <pcl/point_cloud.h> #include <pcl/point_types.h> #include <pcl/ModelCoefficients.h> #include <pcl/io/pcd_io.h> #include <pcl/filters/extract_indices.h> #include <pcl/filters/voxel_grid.h> #include <pcl/features/normal_3d.h> #include <pcl/kdtree/kdtree.h> #include <pcl/sample_consensus/method_types.h> #include <pcl/sample_consensus/model_types.h> #include <pcl/segmentation/sac_segmentation.h> #include <pcl/segmentation/extract_clusters.h> // control typedef enum { ActionStepStop = 0, ActionStepFinish = 1, ActionStepRun = 2, ActionStepClimb = 3, } RobotActionStep; RobotActionStep _stepStatus = ActionStepStop; // publisher ros::Publisher pubStatus; // subscriber bool _subSegments = false; // subscribed data sync flag bool _subAABB = false; pcl::PointCloud<pcl::PointXYZI> _CurrentPointCloudSegments; pcl::PointCloud<pcl::PointXYZI> _CurrentSegmentsAABB; // Axis-aligned bounding box about each segments void subscribeSegments(const sensor_msgs::PointCloud2ConstPtr& input) { if(_stepStatus <= ActionStepFinish) return; _CurrentPointCloudSegments.clear(); pcl::fromROSMsg(*input, _CurrentPointCloudSegments); _subSegments = true; } void subscribeAABB(const sensor_msgs::PointCloud2ConstPtr& input) { if(_stepStatus <= ActionStepFinish) return; _CurrentSegmentsAABB.clear(); pcl::fromROSMsg(*input, _CurrentSegmentsAABB); _subAABB = true; } LadderMissionAutomation ROS node 구현 로직 예
  • 24. // utility functions int getSegmentsFromReschyPointCloud(pcl::PointCloud<pcl::PointXYZI>& pcd, std::vector<pcl::PointIndices>& segments) { // pcd parameter is 3D point cloud sorted by intensity value which has segment index from 0 to N. if(pcd.size() == 0) return 0; int segmentIndex = -1; pcl::PointIndices segment; for(int i = 0; i < pcd.size(); i++) { pcl::PointXYZI pt = pcd[i]; int index = (int)pt.intensity; if(segmentIndex < 0) segmentIndex = index; if(segmentIndex != index) { segments.push_back(segment); segment.indices.clear(); segmentIndex = index; } segment.indices.push_back(i); } if(segment.indices.size()) segments.push_back(segment); return segments.size(); } int getPointCloudFromSegmentIndex(pcl::PointCloud<pcl::PointXYZI>& pcd, const std::vector<int>& segmentIndex, pcl::PointCloud<pcl::PointXYZI>& segment) { for(int i = 0; i < segmentIndex.size(); i++) { int index = segmentIndex[i]; pcl::PointXYZI pt; if(index >= pcd.size() || index < 0) continue; pt = pcd[index]; segment.push_back(pt); } return segment.size(); } LadderMissionAutomation ROS node 구현 로직 예
  • 25. struct Rect3D { pcl::PointXYZ pt1, pt2; Rect3D() { clear(); } void clear() { pt1.x = pt1.y = pt1.z = 9999999999.9; pt2.x = pt2.y = pt2.z = -9999999999.9; } void grow(pcl::PointXYZI& pt) { if(pt.x < pt1.x) pt1.x = pt.x; if(pt.y < pt1.y) pt1.y = pt.y; if(pt.z < pt1.z) pt1.z = pt.z; if(pt.x > pt2.x) pt2.x = pt.x; if(pt.y > pt2.y) pt2.y = pt.y; if(pt.z > pt2.z) pt2.z = pt.z; } bool getMaximum(pcl::PointCloud<pcl::PointXYZI>& pcd) { Rect3D rect; for(int i = 0; i < pcd.size(); i++) { pcl::PointXYZI pt = pcd[i]; rect.grow(pt); } *this = rect; return pcd.size() > 0; } float width() { return fabs(pt2.x - pt1.x); } float height() { return fabs(pt2.y - pt1.y); } float depth() { return fabs(pt2.z - pt1.z); } }; #define IsEqual(a, b, t) (fabs(a - b) <= t) LadderMissionAutomation ROS node 구현 로직 예
  • 26. // node functions void moveRobotBody(float leftSpeed, float leftMilliSecond, float rightSpeed, float rightMilliSecond) { if(_stepStatus <= ActionStepFinish) return; // publishMessage(...); // considering left and right side wheel. } void moveRobotBody(float leftDistance, float rightDistance) { const float wheelRadius = 0.10; float leftSpeed = leftDistance / wheelRadius; float rightSpeed = rightDistance / wheelRadius; moveRobotBody(leftSpeed, 1000.0, rightSpeed, 1000.0); } int canSeeLadder(float nearLadderDistance, float farLadderDistance, float width = 0.3, float height = 0.5, float depth = 0.5, float tolerance = 0.1) { std::vector<pcl::PointIndices> clusterSegmentsIndices; getSegmentsFromReschyPointCloud(_CurrentPointCloudSegments, clusterSegmentsIndices); std::vector<pcl::PointIndices> clusterAABBIndices; getSegmentsFromReschyPointCloud(_CurrentSegmentsAABB, clusterAABBIndices); int SegmentId = -1; for(std::vector<pcl::PointIndices>::const_iterator it = clusterAABBIndices.begin(); it != clusterAABBIndices.end(); ++it) { pcl::PointCloud<pcl::PointXYZI> pointsAABB; getPointCloudFromSegmentIndex(_CurrentSegmentsAABB, it->indices, pointsAABB); Rect3D MaxRect; if(MaxRect.getMaximum(pointsAABB) == false) continue; if(MaxRect.pt2.z < nearLadderDistance - tolerance) continue; if(MaxRect.pt1.z > farLadderDistance + tolerance) continue; float segmentWidth = MaxRect.width(); float segmentHeight = MaxRect.height(); float segmentDepth = MaxRect.depth(); if(IsEqual(segmentHeight, height, tolerance) && IsEqual(segmentWidth, width, tolerance) && IsEqual(segmentDepth, depth, tolerance)) { SegmentId = pointsAABB[0].intensity; return SegmentId; } } return SegmentId; } LadderMissionAutomation ROS node 구현 로직 예
  • 27. int canSeeLadder(float nearLadderDistance, float farLadderDistance, float width = 0.3, float height = 0.5, float depth = 0.5, float tolerance = 0.1) { std::vector<pcl::PointIndices> clusterSegmentsIndices; getSegmentsFromReschyPointCloud(_CurrentPointCloudSegments, clusterSegmentsIndices); std::vector<pcl::PointIndices> clusterAABBIndices; getSegmentsFromReschyPointCloud(_CurrentSegmentsAABB, clusterAABBIndices); int SegmentId = -1; for(std::vector<pcl::PointIndices>::const_iterator it = clusterAABBIndices.begin(); it != clusterAABBIndices.end(); ++it) { pcl::PointCloud<pcl::PointXYZI> pointsAABB; getPointCloudFromSegmentIndex(_CurrentSegmentsAABB, it->indices, pointsAABB); Rect3D MaxRect; if(MaxRect.getMaximum(pointsAABB) == false) continue; if(MaxRect.pt2.z < nearLadderDistance - tolerance) continue; if(MaxRect.pt1.z > farLadderDistance + tolerance) continue; float segmentWidth = MaxRect.width(); float segmentHeight = MaxRect.height(); float segmentDepth = MaxRect.depth(); if(IsEqual(segmentHeight, height, tolerance) && IsEqual(segmentWidth, width, tolerance) && IsEqual(segmentDepth, depth, tolerance)) { SegmentId = pointsAABB[0].intensity; return SegmentId; } } return SegmentId; } LadderMissionAutomation ROS node 구현 로직 예
  • 28. bool canSeeFrontDoor(float width, float height, float tolerance = 0.1) { // About each segments, detect door which has features such as door volume, distance etc. std::vector<pcl::PointIndices> clusterSegmentsIndices; getSegmentsFromReschyPointCloud(_CurrentPointCloudSegments, clusterSegmentsIndices); std::vector<pcl::PointIndices> clusterAABBIndices; getSegmentsFromReschyPointCloud(_CurrentSegmentsAABB, clusterAABBIndices); int SegmentId = -1; for(std::vector<pcl::PointIndices>::const_iterator it = clusterAABBIndices.begin(); it != clusterAABBIndices.end(); ++it) { pcl::PointCloud<pcl::PointXYZI> pointsAABB; getPointCloudFromSegmentIndex(_CurrentSegmentsAABB, it->indices, pointsAABB); Rect3D MaxRect; if(MaxRect.getMaximum(pointsAABB) == false) continue; float segmentWidth = MaxRect.width(); float segmentHeight = MaxRect.height(); float segmentDepth = MaxRect.depth(); if(IsEqual(segmentHeight, height, tolerance) && IsEqual(segmentWidth, width, tolerance)) { SegmentId = pointsAABB[0].intensity; return SegmentId; } } return SegmentId; } bool canSeeLadderTop() { bool ret = canSeeFrontDoor(0.6, 1.0); return ret; } void subscribeActive(const std_msgs::StringPtr& state) { if(state->data.size() == 0) return; if(state->data == "on") _stepStatus = ActionStepRun; else if(state->data == "off") _stepStatus = ActionStepStop; } LadderMissionAutomation ROS node 구현 로직 예
  • 29. LadderMissionAutomation ROS node 구현 로직 예 void subscribeRun(const std_msgs::StringPtr& state) { if(_stepStatus <= ActionStepFinish) return; if(_subSegments == false || _subAABB == false) return; _subSegments = false; // subscribed data sync flag _subAABB = false; if(_stepStatus == ActionStepRun) { const float nearLadderDistance = 0.5; const float farLadderDistance = 1.5; int SegmentId = canSeeLadder(nearLadderDistance, farLadderDistance); if(SegmentId < 0) // didn't find Ladder segment under condition. { moveRobotBody(0.2, 0.2); return; } else // found it _stepStatus = ActionStepClimb; } else if(_stepStatus == ActionStepClimb) { bool canSee = canSeeLadderTop(); if(canSee == false) { moveRobotBody(0.2, 0.2); return; } moveRobotBody(0.4, 0.4); std_msgs::String state; state.name.push_back("finish"); pubStatus.publish(state); } } int main (int argc, char** argv) { // Initialize ROSreschy ros::init (argc, argv, "ladder_mission_automation"); ros::NodeHandle nh; // subscriber ros::Subscriber subActive = nh.subscribe ("reschy/control/active/ladder", 1, subscribeActive); ros::Subscriber subSegments = nh.subscribe ("reschy/sensor/segments", 1, subscribeSegments); ros::Subscriber subAABB = nh.subscribe ("reschy/sensor/AABB", 1, subscribeAABB); // By using timer, robot_master_controller node should send control/run message for autonomous operation ros::Subscriber subRun = nh.subscribe ("reschy/control/run/ladder", 1, subscribeRun); // publisher pubStatus = nh.advertise<std_msgs::String> ("reschy/status/run/ladder", 1);// ex) ladder=finish, ladder=run, ladder=fail // Spin ros::spin(); // Call event functions (subscribers) }
  • 30. ROS example https://github.com/mac999/ROS // main Int main (int argc, char** argv) { // Initialize ROS ros::init (argc, argv, "robot_master_controller"); ros::NodeHandle nh; robot_master_controller robot_master; signal(SIGINT, quit); boost::thread keyboard_thread(boost::bind(&robot_master_controller::keyLoop, &robot_master)); // subscriber ros::Subscriber subStatusLadder = nh.subscribe ("reschy/status/run/ladder", 1, subscribeStatusLadder); // ex) ladder=finish, ladder=run, ladder=fail // publishder https://github.com/mac999/Robot
  • 31. ROS example https://github.com/mac999/ROS // main Int main (int argc, char** argv) { // Initialize ROS ros::init (argc, argv, "robot_master_controller"); ros::NodeHandle nh; robot_master_controller robot_master; signal(SIGINT, quit); boost::thread keyboard_thread(boost::bind(&robot_master_controller::keyLoop, &robot_master)); // subscriber ros::Subscriber subStatusLadder = nh.subscribe ("reschy/status/run/ladder", 1, subscribeStatusLadder); // ex) ladder=finish, ladder=run, ladder=fail // publishder
  • 32. ROS example https://github.com/mac999/ROS // main Int main (int argc, char** argv) { // Initialize ROS ros::init (argc, argv, "robot_master_controller"); ros::NodeHandle nh; robot_master_controller robot_master; signal(SIGINT, quit); boost::thread keyboard_thread(boost::bind(&robot_master_controller::keyLoop, &robot_master)); // subscriber ros::Subscriber subStatusLadder = nh.subscribe ("reschy/status/run/ladder", 1, subscribeStatusLadder); // ex) ladder=finish, ladder=run, ladder=fail // publishder
  • 34. PCL https://daddynkidsmakers.blogspot.com/2015/08/ros_27.html Int main (int argc, char** argv) { // Initialize ROS ros::init (argc, argv, "my_pcl_tutorial"); ros::NodeHandle nh; // Create a ROS subscriber for the input point cloud ros::Subscriber sub = nh.subscribe ("camera/depth/points", 1, cloud_cb); // Create a ROS publisher for the output model coefficients // pub = nh.advertise<pcl_msgs::ModelCoefficients> ("pclplaneoutput", 1); pub = nh.advertise<sensor_msgs::PointCloud2> ("pclplaneoutput", 1); // Spin ros::spin (); }
  • 35. ROS, 센서, 무선 및 배터리 설치 https://daddynkidsmakers.blogspot.com/2015/08/tk1-ros.html
  • 36. 라즈비안 기반 ROS 설치 https://daddynkidsmakers.blogspot.com/2015/08/ros_6.html
  • 38. 아두이노/ROS/라즈베리파이 기반 RpLiDAR 활용 https://daddynkidsmakers.blogspot.com/2015/07/rplidar.html https://daddynkidsmakers.blogspot.com/2019/12/nvidia-nano-lidar.html
  • 39. 벨로다인 LiDAR로 SLAM 만들기 https://daddynkidsmakers.blogspot.com/2019/06/lidar-slam.html
  • 40. 오드로이드 XU4 우분투와 ROS, RVIZ 설치하기 https://daddynkidsmakers.blogspot.com/2019/06/xu4-ros.html
  • 41. 고정밀 GNSS IMU와 ROS 연동하기 https://daddynkidsmakers.blogspot.com/2019/06/gnss-ros.html
  • 42. 유클리드 거리 기반 3차원 포인트 클라우드 세그먼테이션 https://daddynkidsmakers.blogspot.com/2015/08/3.html
  • 43. 공간 맵핑용 스테레오 이미지 센서 ZED 사용기 https://daddynkidsmakers.blogspot.com/2015/08/tk1-ros.html
  • 44. 우분투 기반 벨로다인 라이다와 ROS 설치, 연결 및 설정 https://daddynkidsmakers.blogspot.com/2019/06/odroid-veloview-ros.html
  • 46. 로봇암 움직이는 기구학/역기구학과 ROS MoveIt https://daddynkidsmakers.blogspot.com/2015/11/ros-moveit.html
  • 48. 3차원 공간정보 스캔 마운트용 중량 6WD 로버 개발 방법 https://daddynkidsmakers.blogspot.com/2019/10/6wd.html
  • 49. 대용량 센서 데이터 취득 및 처리에 적합한 임베디드 개발 보드 비교 분석 https://daddynkidsmakers.blogspot.com/2015/08/blog-post_16.html
  • 50. 드론/로버 기반 원격 센서 데이터 취득 시스템 개발 시 기술, 고려사항 및 드론 활용 시 한계 https://daddynkidsmakers.blogspot.com/2016/07/blog-post.html
  • 52. 1. Shafiee, Mohammad Javad, Brendan Chywl, Francis Li, and Alexander Wong. "Fast YOLO: A Fast You Only Look Once System for Real-time Embedded Object Detection in Video." arXiv preprint arXiv:1709.05943 (2017). 2. Alan Safe, 2016.2.12, How the Internet of Things is Impacting the Construction Industry, For Construction Pros.com 3. Rachel Burger, 2015.7.28, Three Ways the Internet of Things Can Benefit Your Construction Project, Construction Management 4. Jacqi Levy, 2016.4.28, 4 BIG ways the IoT is impacting design and construction, Internet of Things blog, IBM 5. whitelight group, 2014.8.18, How the Internet of Things is transforming the construction industry 6. Rachel Burger, 2016.8.5, How "The Internet of Things" is Affecting the Construction Industry, the balance.com 7. AIG, Human Condition Safety: Using Sensors to Improve Worker Safety 8. Niina Gromov, 2015.11.23, Offering Value through Internet of Things Case: Construction Companies in Finland, School of Science, Aalto University 9. Wipro Digital, 2016.4.1, CASE STUDY: INCREASING CUSTOMER VALUE THROUGH IOT FOR JCB INDIA 10. Monitor Deloitte, 2015.7, Every. Thing. Connected. 11. Laura Black, 2015.8.12, An Inside Look at Autodesk’s Project Aquila, ConstructionTech 12. Jeff Walsh, 2015.10.1, Human Condition Aims to Transform Construction-Site Safety With Wearables, Line shape space.com 13. Insights, IoT Logistics Are Transforming the Trucking Industry 14. Chris Topham, 2015.9.10, Case Study: Northumbria Specialist Care Hospital Pushes KNX into the IoT, Abtec Building Technologies 15. Mike Chino, 2015.11.6, Intel’s Smart Tiny House packs futuristic technology into 264 square feet, inhabitat 16. Wanda Lau, 2016.5.9, KieranTimberlake Offers a New Tool for Architects Wanting an In on IoT 17. CADDIGEST, 2016.7.7, IBM Watson IoT Platform to Add Intelligence to Buildings Worldwide 18. http://daddynkidsmakers.blogspot.com/ 19. Oxford Robotics Institute, 2017, Vote3Deep: Fast Object Detection in 3D Point Clouds Using Efficient Convolutional Neural Networks, ICRA 20. 강태욱, 임지순 역, 2015.2, 스마트 홈 오토메이션, 씨아이알 21. 강태욱, 현소영 역, 2014.12, 스마트 빌딩 시스템, 씨아이알 Reference KICT