{"id":22306377,"url":"https://github.com/ar-ray-code/motpy_ros","last_synced_at":"2025-07-29T04:32:59.121Z","repository":{"id":46769032,"uuid":"349914370","full_name":"Ar-Ray-code/motpy_ros","owner":"Ar-Ray-code","description":"ROS example programs using motpy.","archived":false,"fork":false,"pushed_at":"2022-04-10T17:22:18.000Z","size":5275,"stargazers_count":7,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-05-01T17:48:04.913Z","etag":null,"topics":["bounding-boxes","darknet-ros","motpy","object-tracking","python","ros1","ros2"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Ar-Ray-code.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-03-21T06:09:48.000Z","updated_at":"2023-03-10T10:00:34.000Z","dependencies_parsed_at":"2022-08-31T00:00:43.477Z","dependency_job_id":null,"html_url":"https://github.com/Ar-Ray-code/motpy_ros","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ar-Ray-code%2Fmotpy_ros","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ar-Ray-code%2Fmotpy_ros/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ar-Ray-code%2Fmotpy_ros/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ar-Ray-code%2Fmotpy_ros/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Ar-Ray-code","download_url":"https://codeload.github.com/Ar-Ray-code/motpy_ros/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":227981850,"owners_count":17850920,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["bounding-boxes","darknet-ros","motpy","object-tracking","python","ros1","ros2"],"created_at":"2024-12-03T19:15:28.462Z","updated_at":"2024-12-03T19:15:29.122Z","avatar_url":"https://github.com/Ar-Ray-code.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# motpy_ros\nROS example programs using [motpy](https://github.com/wmuron/motpy).\n\n## Dependencies\n\n- ROS2 Foxy\n- OpenCV\n- v4l2_camera\n- [darknet_ros_msgs](https://github.com/ajaypaul2008/darknet_ros/tree/foxy/darknet_ros_msgs)\n- [motpy](https://github.com/wmuron/motpy)\n\n## Installation\n\n```shell\n# Create workspace\n$ source /opt/ros/foxy/setup.bash\n$ cd ~\n$ mkdir -p ros2_ws/src\n$ cd ros2_ws/src\n\n$ sudo apt install ros-foxy-v4l2-camera\n\n# Clone repository\n$ git clone --branch ros2-foxy https://github.com/Ar-Ray-code/motpy_ros.git\n$ pip3 install motpy_ros/requirements.txt\n\n$ cd ~/ros2_ws\n$ colcon build --symlink-install\n```\n\n\n\n## Demo (example_mosaic)\n\nConnect your webcam (/dev/video0) and execute the following commands.\n\n```shell\n$ source /opt/ros/noetic/setup.bash\n$ source ~/ros1_ws/devel/setup.bash\n$ roslaunch motpy_ros example_mosaic.launch\n```\n\n![tracking_mosaic](pictures_for_readme/tracking_mosaic.png)\n\n\n\n### The role of each Node is as follows\n\n- camera : Publish the video from the webcam.\n- face_detector : \"res10_300x300_ssd_iter_140000.caffemodel\" (OpenCV) to detect faces.\n- darknet_tracking : Tracking boundingboxes by motpy.\n- mosaic_bbox : Display tracking image with mosaic.\n\n![Rqt_graph_example_mosaic](pictures_for_readme/Rqt_graph_example_mosaic.png)\n\n\n\n### About topic\n\nRun `$ rostopic echo /tracking_data/bounding_boxes` to check bounding_boxes topic\n\n```bash\nheader: \n  seq: 464\n  stamp: \n    secs: 1619954372\n    nsecs: 821653734\n  frame_id: \"head_camera\"\nimage_header: \n  seq: 0\n  stamp: \n    secs: 0\n    nsecs:         0\n  frame_id: ''\nbounding_boxes: \n  - \n    probability: 0.783602034603571\n    xmin: 200\n    ymin: 103\n    xmax: 272\n    ymax: 181\n    id: 728\n    Class: \"face\"\n  - \n    probability: 0.8840379995412154\n    xmin: 44\n    ymin: 111\n    xmax: 176\n    ymax: 236\n    id: 3840\n    Class: \"face\"\n...\n```\n\n![tracking_mosaic](pictures_for_readme/tracking_mosaic.png)\n\n\n\n### The role of each Node is as follows\n\n- camera : Publish the video from the webcam.\n- face_detector : \"res10_300x300_ssd_iter_140000.caffemodel\" (OpenCV) to detect faces.\n- darknet_tracking : Tracking boundingboxes by motpy.\n- mosaic_bbox : Display tracking image with mosaic.\n\n![Rqt_graph_example_mosaic](pictures_for_readme/Rqt_graph_example_mosaic.png)\n\n\n\n### About topic\n\nRun `$ rostopic echo /tracking_data/bounding_boxes` to check bounding_boxes topic\n\n```bash\nheader: \n  seq: 464\n  stamp: \n    secs: 1619954372\n    nsecs: 821653734\n  frame_id: \"head_camera\"\nimage_header: \n  seq: 0\n  stamp: \n    secs: 0\n    nsecs:         0\n  frame_id: ''\nbounding_boxes: \n  - \n    probability: 0.783602034603571\n    xmin: 200\n    ymin: 103\n    xmax: 272\n    ymax: 181\n    id: 728\n    class_id: \"face\"\n  - \n    probability: 0.8840379995412154\n    xmin: 44\n    ymin: 111\n    xmax: 176\n    ymax: 236\n    id: 3840\n    class_id: \"face\"\n...\n```\n\n## Using Service\n\n- ROS2 version doesn't yet support srv.\n\n\n\n## Use with darknet_ros\n\n- motpy_ros can be used in conjunction with [darknet_ros](https://github.com/leggedrobotics/darknet_ros) to provide object tracking that takes advantage of darknet's strengths.\n\nExample launch file : launch/example_darknet.launch.py\n\n![ann_molcar](pictures_for_readme/ann_molcar.png)\n\n\n\n## Use with Arduino\n\n- ROS2 version doesn't yet support ros2arduino.\n\n\n\n## Reference\n\n- https://github.com/wmuron/motpy\n- https://github.com/leggedrobotics/darknet_ros/tree/master/darknet_ros_msgs\n\n## About writer\n\n- Ar-Ray : Japanese student. \n- Blog (Japanese) : https://ar-ray.hatenablog.com/\n- Twitter : https://twitter.com/Ray255Ar\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Far-ray-code%2Fmotpy_ros","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Far-ray-code%2Fmotpy_ros","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Far-ray-code%2Fmotpy_ros/lists"}