{"id":14977909,"url":"https://github.com/ubiquityrobotics/raspicam_node","last_synced_at":"2025-04-04T22:07:53.196Z","repository":{"id":46921417,"uuid":"43616193","full_name":"UbiquityRobotics/raspicam_node","owner":"UbiquityRobotics","description":"ROS node for camera module of Raspberry Pi","archived":false,"fork":false,"pushed_at":"2024-06-18T12:28:31.000Z","size":323,"stargazers_count":299,"open_issues_count":32,"forks_count":161,"subscribers_count":30,"default_branch":"kinetic","last_synced_at":"2025-04-04T22:07:49.121Z","etag":null,"topics":["raspberry-pi","raspberry-pi-camera","ros"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/UbiquityRobotics.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.rst","contributing":null,"funding":null,"license":"LICENSE","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":"2015-10-03T21:49:13.000Z","updated_at":"2025-03-31T13:59:49.000Z","dependencies_parsed_at":"2024-10-11T16:41:06.467Z","dependency_job_id":"bcc06082-64c6-4e76-a256-93bf9fb45069","html_url":"https://github.com/UbiquityRobotics/raspicam_node","commit_stats":{"total_commits":162,"total_committers":19,"mean_commits":8.526315789473685,"dds":0.3765432098765432,"last_synced_commit":"99ccecfd5a56f798474d9f8c0b0a092f223dcc50"},"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UbiquityRobotics%2Fraspicam_node","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UbiquityRobotics%2Fraspicam_node/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UbiquityRobotics%2Fraspicam_node/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UbiquityRobotics%2Fraspicam_node/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/UbiquityRobotics","download_url":"https://codeload.github.com/UbiquityRobotics/raspicam_node/tar.gz/refs/heads/kinetic","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247256112,"owners_count":20909240,"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":["raspberry-pi","raspberry-pi-camera","ros"],"created_at":"2024-09-24T13:56:32.110Z","updated_at":"2025-04-04T22:07:53.172Z","avatar_url":"https://github.com/UbiquityRobotics.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# raspicam_node\n\nROS node for the Raspberry Pi Camera Module. Works with both the V1.x and V2.x versions of the module. We recommend using the v2.x cameras as they have better auto gain, and the general image quality is better.\n\n## Installation\n\nA binary can be found at https://packages.ubiquityrobotics.com/ follow the instructions there to add the repository.\n\nThen run `sudo apt install ros-kinetic-raspicam-node`\n\n## Build Intructions\nIf you want to build from source instead of using the binary follow this section.\n\nThis node is primarily supported on ROS Kinetic, and Ubuntu 16.04, and that is what these instuctions presume.\n\nGo to your catkin_ws `cd ~/catkin_ws/src`.\n\nDownload the source for this node by running\n\n`git clone https://github.com/UbiquityRobotics/raspicam_node.git`\n\nThere are some dependencies that are not recognized by ros, so you need to create the file `/etc/ros/rosdep/sources.list.d/30-ubiquity.list` and add this to it.\n```\nyaml https://raw.githubusercontent.com/UbiquityRobotics/rosdep/master/raspberry-pi.yaml\n```\n\nThen run `rosdep update`.\n\nInstall the ros dependencies,\n\n```\ncd ~/catkin_ws\nrosdep install --from-paths src --ignore-src --rosdistro=kinetic -y\n```\n\nCompile the code with `catkin_make`.\n\n## Running the Node\nOnce you have the node built, you can run it using a launch file.\n\nFor a V2.x camera, run `roslaunch raspicam_node camerav2_1280x960.launch`\n\nFor a V1.x camera, run `roslaunch raspicam_node camerav1_1280x720.launch`\n\nUse `rqt_image_view` on a connected computer to view the published image.\n\n## Configuring the node with dynamic reconfigure\nThe `raspicam_node` supports dynamically reconfiguring the camera parameters.\n\nRun the dynamic reconfigure node on a connected computer:\n\n```\nrosrun rqt_reconfigure rqt_reconfigure\n```\n\nIt should bring up a user interface like the one below.  Paramaters can be dynamically adjusted via this interface.\n\n![rqt_reconfigure](reconfigure_raspicam_node.png)\n\n\n## Troubleshooting\n1. Make sure that your user is in the `video` group by running `groups|grep video`.\n\n2. If you get an error saying: `Failed to create camera component`,\nmake sure that the camera cable is properly seated on both ends, and that the cable is not missing any pins.\n\n3. If the publish rate of the image over the network is lower than expected, consider using a lower resolution to reduce the amount of bandwidth required.\n\n## Node Information\n\nTopics:\n\n* `~/image/compressed`:\n  Publishes `sensor_msgs/CompressedImage` with jpeg from the camera module.\n\n* `~/image`:\n  Publishes `sensor_msgs/Image` from the camera module (if parameter `enable_raw` is set).\n\n* `~/motion_vectors`:\n  Publishes `raspicam_node/MotionVectors` from the camera module (if parameter `enable_imv` is set).\n\n* `~/camera_info`:\n  Publishes `sensor_msgs/CameraInfo` camera info for each frame.\n\nServices:\n\n* `~/set_camera_info`: Used to update calibration info for the camera.\n\nParameters:\n\n* `~private_topics` (bool): By default the topics are private, meaning the node name will be added in front of every topic name.\nIf you don't want the topics to be private, you can set this parameter to \"true\".\nThis parameter is mainly present in order to keep backward compatibility.\n\n* `~camera_frame_id` (tf frame): The frame identifier to associate the camera.\n\n* `~camera_info_url`: The URL of the camera calibration `.yaml` file.\n\n* `~camera_name` (string): The name of the camera, should match with name in camera_info file.\n\n* `~framerate` (fps): Framerate to capture at. Maximum 90fps\n\n* `~height` (pixels): Height to capture images at.\n\n* `~width` (pixels): Width to capture images at.\n\n* `~quality` (0-100): Quality of the captured images.\n\n* `~enable_raw` (bool): Publish a raw image (takes more CPU and memory)\n\n* `~enable_imv` (bool): Publish inline motion vectors computed by the GPU\n\n* `~camera_id` (int): The camera id (only supported on Compute Module)\n\n## Calibration\n\nThe raspicam_node package contains a calibration file for the raspberry\nPI camera versions 1 and 2.\n\nA tutorial\n  [Monocular Camera Calibration tutorial](http://wiki.ros.org/camera_calibration/Tutorials/MonocularCalibration)\nshows how to calibrate a single camera.\n\nThe\n  [8x6 checkerboard](http://wiki.ros.org/camera_calibration/Tutorials/StereoCalibration?action=AttachFile\u0026do=view\u0026target=check-108.pdf)\nand the\n  [7x6 checkerboard](http://wiki.ros.org/camera_calibration/Tutorials/StereoCalibration?action=AttachFile\u0026do=view\u0026target=check_7x6_108mm.pdf)\nare rather large and require specialized printers to print out at\nfull scale.  They can be printed on more common printer sizes\nwith auto scaling turned on.  Be sure to carefully measure the\nsquare size in millimeters and convert to meters by dividing by 1000.\n\nRunning calibration requires raw publishing enabled. Add `enable_raw:=true` to the camera roslaunch command.\n\nIf you are not sure which launch file to use `camerav2_1280x960_10fps.launch` is probably what you are looking for.\n\nOn the Pi\n```\nroslaunch raspicam_node camerav2_1280x960_10fps.launch enable_raw:=true\n```\n\nOn your workstation:\n```\nrosrun camera_calibration cameracalibrator.py --size 8x6 --square 0.074 image:=/raspicam_node/image camera:=/raspicam_node\n```\n\n## Motion vectors\n\nThe raspicam_node is able to output [motion vectors](https://www.raspberrypi.org/blog/vectors-from-coarse-motion-estimation/) calculated by the Raspberry Pi's hardware video encoder. These motion vectors can be used for various applications such as motion detection.\n\nOn the Pi, add `enable_imv:=true` to the camera roslaunch command:\n\n```\nroslaunch raspicam_node camerav2_410x308_30fps.launch enable_imv:=true\n```\n\nOn your workstation, build raspicam_node so that the `MotionVectors` ROS message is recognized by Python:\n\n```\ncd ~/catkin_ws\ncatkin_make\nsource ~/catkin_ws/devel/setup.bash\n```\n\nFinally, run script `imv_view.py` to visualize the motion vectors:\n\n```\nrosrun raspicam_node imv_view.py\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fubiquityrobotics%2Fraspicam_node","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fubiquityrobotics%2Fraspicam_node","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fubiquityrobotics%2Fraspicam_node/lists"}