{ "info": { "author": "Ryan Siemens", "author_email": "ryanjsiemens@gmail.com", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 3" ], "description": "# Python client for the Ouster Lidar OS-1\n\nCompatible with Firmware Version 1.10.0 and python 3\n> Your milage may vary with other versions, it was tested against a device OS1-16\n> device running 1.10.0\n\n## Installing\n`pip install --upgrade ouster-os1`\n\n## Quick start\n```python\nfrom os1 import OS1\nfrom os1.utils import xyz_points\n\n\ndef handler(raw_packet):\n \"\"\"Takes each packet and log it to a file as xyz points\"\"\"\n with open('points.csv', 'a') as f:\n x, y, z = xyz_points(raw_packet)\n for coords in zip(x, y, z):\n f.write(\"{}\\n\".format(','.join(coords)))\n\n\nos1 = OS1('10.0.0.3', '10.0.0.1', mode='1024x10') # OS1 sensor IP, destination IP, and resolution\n# Inform the sensor of the destination host and reintialize it\nos1.start()\n# Start the loop which will handle and dispatch each packet to the handler\n# function for processing\nos1.run_forever(handler)\n```\n\n> You can run the server as threaded with `os1.run_forever(handler, threaded=True)`\n\n## Recipes\nGenerally speed is a concern since the OS1 is sending 12,608 bytes/packet at a\nrate of 1280 packets/sec (in 1024x20 or 2048x10 mode).\nSo a multiprocessing producer consumer model works well.\n```python\nimport json\nfrom multiprocessing import Process, Queue\n\nfrom os1 import OS1\nfrom os1.utils import build_trig_table, xyz_points\n\n\nOS1_IP = '10.0.0.3'\nHOST_IP = '10.0.0.2'\nunprocessed_packets = Queue()\n\n\ndef handler(packet):\n unprocessed_packets.put(packet)\n\n\ndef worker(queue, beam_altitude_angles, beam_azimuth_angles) :\n build_trig_table(beam_altitude_angles, beam_azimuth_angles)\n while True:\n packet = queue.get()\n coords = xyz_points(packet) \n # do work...\n\n\ndef spawn_workers(n, worker, *args, **kwargs):\n processes = []\n for i in range(n):\n process = Process(\n target=worker,\n args=args,\n kwargs=kwargs\n )\n process.start()\n processes.append(process)\n return processes\n\n\nos1 = OS1(OS1_IP, HOST_IP)\nbeam_intrinsics = json.loads(os1.get_beam_intrinsics())\nbeam_alt_angles = beam_intrinsics['beam_altitude_angles']\nbeam_az_angles = beam_intrinsics['beam_azimuth_angles']\nworkers = spawn_workers(4, worker, unprocessed_packets, beam_alt_angles, beam_az_angles)\nos1.start()\ntry:\n os1.run_forever(handler)\nexcept KeyboardInterrupt:\n for w in workers:\n w.terminate()\n```\n\n## TCP API Commands\n\nThe TCP API commands can be accessed through an instance of the `OS1` object.\n\nThe following methods are supported:\n\n* `get_config_txt`\n* `get_sensor_info`\n* `get_beam_intrinsics`\n* `get_imu_intrinsics`\n* `get_lidar_intrinsics`\n* `get_config_param` - Supports querying active and staged parameters. Example: `os1.get_config_param('active', 'udp_ip')`\n* `set_config_param` - Supports settings parameters to be staged. Example: `os1.set_config_param('udp_ip', '10.0.0.1')`\n* `reinitialize` - Will reinitialize the sensor and apply all staged parameters to be active.\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/rsiemens/ouster-python/", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "ouster-os1", "package_url": "https://pypi.org/project/ouster-os1/", "platform": "", "project_url": "https://pypi.org/project/ouster-os1/", "project_urls": { "Homepage": "https://github.com/rsiemens/ouster-python/" }, "release_url": "https://pypi.org/project/ouster-os1/1.1.1/", "requires_dist": null, "requires_python": "", "summary": "Python client for the Ouster Lidar OS-1", "version": "1.1.1" }, "last_serial": 5340011, "releases": { "1.0.0": [ { "comment_text": "", "digests": { "md5": "e5bddbcf3d23f163e473769f7ef26dc3", "sha256": "9f8f66c3087e029f85b072b2a8f91f8e3fdcbc87a60aa49bbe27e21462ca5a5d" }, "downloads": -1, "filename": "ouster_os1-1.0.0-py3-none-any.whl", "has_sig": false, "md5_digest": "e5bddbcf3d23f163e473769f7ef26dc3", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 6287, "upload_time": "2018-11-12T22:58:35", "url": "https://files.pythonhosted.org/packages/98/76/efdc18b6507dff800ad8010cab3bbc8e3c570392fd20f5d7d7b526ea3728/ouster_os1-1.0.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "aa0e4e4c991f6738f2612c5750ccbbc9", "sha256": "816e9b66365d8c12716e1df3abbd44a2a652596c5e9f0e8e06f18a630d3d7301" }, "downloads": -1, "filename": "ouster-os1-1.0.0.tar.gz", "has_sig": false, "md5_digest": "aa0e4e4c991f6738f2612c5750ccbbc9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4926, "upload_time": "2018-11-12T22:58:36", "url": "https://files.pythonhosted.org/packages/05/61/caa6eb3f5d954bf4d0e8a9853f0cc7d466098300eaa612da8c7de028ae32/ouster-os1-1.0.0.tar.gz" } ], "1.0.1": [ { "comment_text": "", "digests": { "md5": "c015f9bb6f0d3a171feac26ae27fd3b9", "sha256": "562e81f9e4aa0b6f1af21837e58215ed7068783b29a71ec62d81b1d14a2ca6ab" }, "downloads": -1, "filename": "ouster_os1-1.0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "c015f9bb6f0d3a171feac26ae27fd3b9", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 6304, "upload_time": "2018-11-12T23:04:20", "url": "https://files.pythonhosted.org/packages/c1/21/b44105f22dc950d478838e4a92fe4abb88b8ee15ca12245670f562f390cd/ouster_os1-1.0.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "31a1a3d4127ab7c473d5386c29e37495", "sha256": "0b7bec1f2383c2ef5ee1c5d516d2b3ecaf1199f33055e5f02bef5e32de123180" }, "downloads": -1, "filename": "ouster-os1-1.0.1.tar.gz", "has_sig": false, "md5_digest": "31a1a3d4127ab7c473d5386c29e37495", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4945, "upload_time": "2018-11-12T23:04:23", "url": "https://files.pythonhosted.org/packages/93/6f/00ae939762d66a5d1e0ace64d55779432535cb193f4ee4bc75eeef8fc465/ouster-os1-1.0.1.tar.gz" } ], "1.1.0": [ { "comment_text": "", "digests": { "md5": "e62b3a11d1cdf7dce9579fe4d7c4cb6c", "sha256": "3ec176fb785ef3da796350d8d3cec11f11c3ed01a5161fbd69aeb7a8f4456484" }, "downloads": -1, "filename": "ouster_os1-1.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "e62b3a11d1cdf7dce9579fe4d7c4cb6c", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 7700, "upload_time": "2019-03-01T21:09:19", "url": "https://files.pythonhosted.org/packages/a6/b7/8cb1314cff392c3ccbe31469ba806dec232b5b0899b3a65d52405fe131ad/ouster_os1-1.1.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "e4f60a97059569896f86e5dfee2c9e5c", "sha256": "ff6130af99a2b78f09d2ad2976ffe45b5857473f47ccee06cd160358e23033ee" }, "downloads": -1, "filename": "ouster-os1-1.1.0.tar.gz", "has_sig": false, "md5_digest": "e4f60a97059569896f86e5dfee2c9e5c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6307, "upload_time": "2019-03-01T21:09:21", "url": "https://files.pythonhosted.org/packages/2e/cf/b9bd61885cc275bfc8b8f25105745463afb3ba8fb1a6ccca9a90f7dd1ec9/ouster-os1-1.1.0.tar.gz" } ], "1.1.1": [ { "comment_text": "", "digests": { "md5": "21738a740161622e60c5fb4a2e11c8d4", "sha256": "887a6c13fa3d6ead27fb0a12f93b906f8c47e0ff21666981d904b04f75461cec" }, "downloads": -1, "filename": "ouster_os1-1.1.1-py3-none-any.whl", "has_sig": false, "md5_digest": "21738a740161622e60c5fb4a2e11c8d4", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 10115, "upload_time": "2019-05-30T22:41:57", "url": "https://files.pythonhosted.org/packages/fc/1e/a570ff59c4bd7d6c6def6bdd0c048596772cb760ef143f341a98fe661141/ouster_os1-1.1.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "d740e047c7216440d9292c601c4e4538", "sha256": "6ee9dc0a99e3bff5aa6a7babf13ef222e198a3a8875f92a18fbc4db5810822be" }, "downloads": -1, "filename": "ouster-os1-1.1.1.tar.gz", "has_sig": false, "md5_digest": "d740e047c7216440d9292c601c4e4538", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8858, "upload_time": "2019-05-30T22:41:59", "url": "https://files.pythonhosted.org/packages/c1/1d/6abc182dca3825f67f6b049662e74d795d5194392d259565e29c0be62611/ouster-os1-1.1.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "21738a740161622e60c5fb4a2e11c8d4", "sha256": "887a6c13fa3d6ead27fb0a12f93b906f8c47e0ff21666981d904b04f75461cec" }, "downloads": -1, "filename": "ouster_os1-1.1.1-py3-none-any.whl", "has_sig": false, "md5_digest": "21738a740161622e60c5fb4a2e11c8d4", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 10115, "upload_time": "2019-05-30T22:41:57", "url": "https://files.pythonhosted.org/packages/fc/1e/a570ff59c4bd7d6c6def6bdd0c048596772cb760ef143f341a98fe661141/ouster_os1-1.1.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "d740e047c7216440d9292c601c4e4538", "sha256": "6ee9dc0a99e3bff5aa6a7babf13ef222e198a3a8875f92a18fbc4db5810822be" }, "downloads": -1, "filename": "ouster-os1-1.1.1.tar.gz", "has_sig": false, "md5_digest": "d740e047c7216440d9292c601c4e4538", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8858, "upload_time": "2019-05-30T22:41:59", "url": "https://files.pythonhosted.org/packages/c1/1d/6abc182dca3825f67f6b049662e74d795d5194392d259565e29c0be62611/ouster-os1-1.1.1.tar.gz" } ] }