전체 글

전체 글

    opencv roi

    import cv2import numpy as np def grayscale(img): # 흑백이미지로 변환 return cv2.cvtColor(img, cv2.COLOR_RGB2GRAY) def roi(img, vertices): mask = np.zeros_like(img) cv2.fillPoly(mask,vertices,255) masked = cv2.bitwise_and(img,mask) return masked img = cv2.imread('test.jpg')px = img.shape[0]px1 = img.shape[1]print(px, px1)r= 600.0/img.shape[1]dim = (800,int(img.shape[0]*r))resized = cv2.resize(img, dim, i..

    콜레라 시대의 사랑

    그녀는 너무 아름다웠고 , 매력적이었으며 보통사람들과는 너무나도 달라보였다. 그래서 그는 그녀의 구두가 딱딱 소리를 내며 돌길 위를 걸을 때 왜 아무도 자기처럼 정신을 잃지 않는지 그녀의 베일에서 나오는 숨소리에 왜 아무도 가슴설레지 않는지 그녀의 땋은 머리가 바람에 휘날리거나 손이 공중으로 날아오를 때 왜 아무도 사랑에 미치지 않는지 이해할 수 없었다. - 마르케스

    (8) motor_control 노드 작성

    motor_control 노드 #!/usr/bin/env python# license removed for brevity import rospyfrom std_msgs.msg import UInt16MultiArray pub = rospy.Publisher('cmd_vel',UInt16MultiArray,queue_size=10)cmd_vel = UInt16MultiArray()cmd_vel.data = [0,0] def callback1(msg): rospy.loginfo(msg.data[0]) cmd_vel.data[0] = msg.data[0] cmd_vel.data[1] = msg.data[1] pub.publish(cmd_vel) def motor_control(): rospy.init_node..

    (7) 키보드 조작노드 작성 (keyboard teleoperation)

    #!/usr/bin/env python import rospy from std_msgs.msg import Int32MultiArray import sys, select, termios, tty ROSCAR_MAX_ACCELL_VEL = 255 ROSCAR_MAX_STEERING_VEL = 180 ROSCAR_MIN_ACCELL_VEL = 0 ROSCAR_MIN_STEERING_VEL = 0 msg = """ Control Your ROSCAR! --------------------------- Moving around: w a s d x w/x : increase/decrease accell velocity a/d : increase/decrease steering velocity space key, ..

    우리집 개발환경

    노트북+듀얼모니터+라즈베리파이용 모니터1개 2018.7.15

    (6) pc에서 rc카 dc모터 제어 성공

    원격pc(노트북)에서 모터 제어 성공 라즈베리파이-아두이노-모터드라이버-모터 순으로 연결되어있다. 지금은 이걸 키보드나 rqt로 제어가능하게 개발하는중