본문 바로가기

분류 전체보기

(82)
Move Group C++ Interface https://moveit.picknik.ai/main/doc/examples/move_group_interface/move_group_interface_tutorial.html# Move Group C++ Interface — MoveIt Documentation: Rolling documentationMove Group C++ Interface In MoveIt, the simplest user interface is through the MoveGroupInterface class. It provides easy to use functionality for most operations that a user may want to carry out, specifically setting joint or..
zed카메라를 이용한 특정포인트 depth 추정 https://www.stereolabs.com/en-kr/developers/release ZED SDK 4.1 - Download | StereolabsThe ZED SDK allows you to add depth, motion sensing and spatial AI to your application. Available as a standalone installer, it includes applications, tools and sample projects with source code.www.stereolabs.com다음 공식홈페이지에서 sdk 다운 CUDA 12, Ubuntu 20.4.1 버전 사용  https://github.com/stereolabs/zed-opencv/blob/mast..
아날로그와 디지털, PWM 아날로그 전압, 전류와 같이 연속적으로 변하는 물리량 디지털 어떤 양이나 데이터를 2진수로 표현한것 연속적인 값을 세분화하여 그 값을 하나의 값으로 표시한다. 0과 1 두가지로 신호전달에 왜곡이 없음 PWM 디지털 신호는 0과1 두가지 가지는데 펄스를 기준으로 0과 1 비율을 조절하여 아날로그와 같은 신호를 주는것 (아날로그는 아님) 이 때 한펄스 내에서 1의 비율을 Duty Cycle 이라고 한다. 예를들어 LED가 1초에 한번씩 깜빡이면 우리는 인지가 되지만 0.01초에 한번씩 깜빡이면 인지 할수 없다. 실제로 디지털 신호에 의한 on/off 이지만 이 LED는 100%켜저 있는 LED보다 어두울 것이다. 이것이 PWM을 통해 LED의 밝기를 조절하는 것이다. Vin 아두이노 보드에 전원을 공급하거나..
Flutter - PageView에서 각 페이지의 값 유지하기 PageView에서 각 페이지를 넘기면 값이 초기화 된다. 내가 지금 만들고 있는 앱에서 각 Page에 TextField가 있는데 유저가 입력한 값을 저장하고 Page를 넘겨도 그래도 저장해야한다. https://cyj893.github.io/flutter/Flutter10/ Flutter - PageView: 페이지 스크롤해도 상태 저장하기, ExpandablePageView 등 cyj893.github.io 다음 블로그를 참고하였다. 근데 여기서 주의해야할게 PageView 위젯에 다음 과정을 바로하는게 아닌 상태를 저장할 item class에 해줘야한다. 그래서 다음 코드를 보면 PageView.builder에서 Container를 retrun 하는데 이걸 따로 커스텀 위젯을 만들어 거기서 위 블로..
Flutter - pageView, onPageChanged pageView 는 말그대로 여러개의 뷰가 페이지를 이뤄 슬라이드로 넘기는 식으로 구성되어 있다. https://api.flutter.dev/flutter/widgets/PageView-class.html PageView class - widgets library - Dart API A scrollable list that works page by page. Each child of a page view is forced to be the same size as the viewport. You can use a PageController to control which page is visible in the view. In addition to being able to control the pixel o..
백준 1012 https://www.acmicpc.net/problem/1012 1012번: 유기농 배추 차세대 영농인 한나는 강원도 고랭지에서 유기농 배추를 재배하기로 하였다. 농약을 쓰지 않고 배추를 재배하려면 배추를 해충으로부터 보호하는 것이 중요하기 때문에, 한나는 해충 방지에 www.acmicpc.net import sys # 1000이상의 재귀가 호출되면 재귀의 깊이를 늘려줘야함 sys.setrecursionlimit(10 ** 4) input = sys.stdin.readline t = int(input()) answer_0 = [] # 테스트 케이스 만큼 반복 for i in range(t): # dfs 함수 만들기 def dfs(x,y): if x= n : return False global graph..
백준 2667 https://www.acmicpc.net/problem/2667 2667번: 단지번호붙이기 과 같이 정사각형 모양의 지도가 있다. 1은 집이 있는 곳을, 0은 집이 없는 곳을 나타낸다. 철수는 이 지도를 가지고 연결된 집의 모임인 단지를 정의하고, 단지에 번호를 붙이려 한다. 여 www.acmicpc.net n= int(input()) graph = [] # 단지수 count = 0 # 각 단지의 가구수 담을 list count_0 = [] # 2차원 list 입력받기 # 행수 만큼 반복해 각행의 리스트를 담는다 for i in range(n): graph.append(list(map(int, input()))) # 현재위치부터 연결된 모든 노드를 방문하는 함수 만들기 def dfs(x,y): #주어진..
백준 2606 https://www.acmicpc.net/problem/2606 DFS 파트에서 문제를 들어가서 다른 방법말고 문제를 바로 DFS 풀었다. 1번 컴퓨터에 연결되어 있는 컴퓨터를 카운트 하면 된다. 책 이코테에 있는 예제를 그대로 활용하였다. 다음을 탐색하는 코드이다. def dfs(graph,v,visited): # 현재위치 방문처리 visited[v] =True for i in graph[v]: if not visited[i]: dfs(graph,i,visited) graph = [[], [2,3,8], [1,4,5], [3,5], [3,4], [7], [2,6,8], [1,7] ] # 방문된 정보를 1차원 리스트로 표현 visited = [False]* 9 dfs(graph,1,visited) 그래..