{"id":24576131,"url":"https://github.com/pedrala/virtualfactory","last_synced_at":"2026-05-17T12:05:41.387Z","repository":{"id":270812579,"uuid":"911532002","full_name":"pedrala/VirtualFactory","owner":"pedrala","description":"Use the ArUco marker to calculate the relative coordinates and move Turtlebot3 to the corresponding location. Recognize a small box as an object with yolo8, pick it up with the manipulator, and place it on the conveyor belt. Pick up the box again at the end of the conveyor belt and move it to the unloading area.","archived":false,"fork":false,"pushed_at":"2025-01-15T12:52:33.000Z","size":37391,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-17T12:47:03.265Z","etag":null,"topics":["aruco-marker-detection","calibration","conveyor-belt","gui","inverse-kinematics","multithreading","opencv","rodrigues-rotation-formula","ros2","turtlebot3","yolo8"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pedrala.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-01-03T08:37:21.000Z","updated_at":"2025-01-21T13:03:18.000Z","dependencies_parsed_at":"2025-01-23T22:32:26.407Z","dependency_job_id":null,"html_url":"https://github.com/pedrala/VirtualFactory","commit_stats":null,"previous_names":["pedrala/aruco_grasp_conveyor","pedrala/virtualfactory"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/pedrala/VirtualFactory","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pedrala%2FVirtualFactory","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pedrala%2FVirtualFactory/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pedrala%2FVirtualFactory/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pedrala%2FVirtualFactory/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pedrala","download_url":"https://codeload.github.com/pedrala/VirtualFactory/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pedrala%2FVirtualFactory/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33137831,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-17T09:28:26.183Z","status":"ssl_error","status_checked_at":"2026-05-17T09:27:52.702Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aruco-marker-detection","calibration","conveyor-belt","gui","inverse-kinematics","multithreading","opencv","rodrigues-rotation-formula","ros2","turtlebot3","yolo8"],"created_at":"2025-01-23T22:21:48.231Z","updated_at":"2026-05-17T12:05:41.353Z","avatar_url":"https://github.com/pedrala.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Overview\nUse the ArUco marker to calculate the relative coordinates and move Turtlebot3 to the corresponding location. Recognize a small box as an object with yolo8, pick it up with the manipulator, and place it on the conveyor belt. Pick up the box again at the end of the conveyor belt and move it to the unloading area. \n\n## Capture\n\n### GUI: Login, MainApplication Window  \n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"capture/login_vf.png\" alt=\"Login\" width=\"800\"\u003e \n\u003c/p\u003e\n\n#### Login Account\nID: rokey,   Password: 1234\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"capture/logged_vf.png\" alt=\"Login\" width=\"800\"\u003e \n\u003c/p\u003e\n\n#### How to operate\nWhen an employee presses the **Play** button, the Turtlebot issues Aruco markers in the order of Aruco marker 4-\u003e7-\u003e15 and moves to the corresponding marker locations. After arriving at each location, it stops and saves and displays the status as \"arrived at marker 2\".\n\nAn employee can also manually move Turtlebot to the desired marker by selecting the Aruko marker directly from Dropbox.\n\nWhen an employee selects a job from dropbox, a 'target_counts' ros topic is published, which is received by the manipulator and the job is executed.\n\nBelow is job list which manipulator must conduct when employee selects.\n\n##### Job1 : Red * 2,   Blue * 1,\n##### Job2 : Red * 1,   Blue * 2,\n##### Job3 : Red * 1,\n\nIn an emergency situation, if an employee presses the red **Stop** button, the conveyor belt, AMR, and Manipulator will all stop.\n\nWhen the employee presses the **Resume** button, it will start again from the point where it stopped, and when the **Reset** button is pressed, the turtlebot will move to the initial position, aruco marker 2, and change the status to the initial state.\n\n\n### Running the ArUco node in the terminal\n\u003cp align=\"center\"\u003e\n \u003cimg src=\"capture/aruco_detecting.png\" alt=\"ArUco Detecting\" width=\"800\"\u003e\n\u003c/p\u003e\n\n### Calculating the coordinates of the target marker (ID:15) using the base marker (ID:2)\n(기준마커(ID:2)를 통해 목표마커(ID:15)의 좌표 계산하기)\n벽에 수직으로 붙은 ArUco 마커의 z, x 값을 이용하여 목표좌표의 상대거리(tvecs)및 방향(rvecs)을 계산합니다.\n\n```python\n\n# 기준 마커의 회전 행렬 계산\nR_base, _ = cv2.Rodrigues(base_rvec)  # 기준 마커의 회전 행렬\nR_base_inv = np.linalg.inv(R_base)    # 회전 행렬의 역행렬\n\n# 타겟 마커의 이동 벡터를 기준 좌표계로 변환\ntvec_relative = R_base_inv @ (target_tvec.T - base_tvec.T)\n\n# z, x 성분만 추출\ntvec_relative_xz = tvec_relative[[0, 2]]  # z, x 좌표 (상대 이동)\ndistance = np.linalg.norm(tvec_relative_xz)  # 거리 계산\ndirection_vector = tvec_relative_xz / distance  # 방향 벡터 (단위 벡터)\n\n# z, x를 기반으로 각도 계산 (atan2 사용)\nangle_rad = np.arctan2(tvec_relative_xz[1], tvec_relative_xz[0])  # 라디안 단위\n```\n\u003cp align=\"center\"\u003e\n \u003cimg src=\"capture/result_04_44_28.jpg\" alt=\"Aruco Detecting\" width=\"800\"\u003e\n\u003c/p\u003e\n\n### Virtual Factory from World Eye\n\u003cp align=\"center\"\u003e\n \u003cimg src=\"capture/VirtualFactory.jpeg\" alt=\"Virtual Factory.jpeg\" width=\"800\"\u003e\n\u003c/p\u003e\n\n### Turtlebot3 Manipulating Video\n[Turtlebot3 Manipulating Demo Video](capture/manipulating.MOV)\n\n### Pick and Place On Conveyorbelt Demo Video\n[Pick and Place On Conveyorbelt Demo Video](capture/PickandPlaceOnConveyorbelt.mp4)\n\n## How to execute\n\nGUI Server Node\n```console\nros2 run virtual_factory gui\n```\n\nAruco Marker Detecting Node\n```console\nros2 run virtual_factory aruco\n```\n\nAMR Node\n```console\nros2 run virtual_factory amr\n```\n\nManipulator Node\n```console\nros2 run virtual_factory manipulator\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpedrala%2Fvirtualfactory","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpedrala%2Fvirtualfactory","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpedrala%2Fvirtualfactory/lists"}