{"id":19407961,"url":"https://github.com/nasa-jpl/cortex","last_synced_at":"2025-04-24T09:31:48.769Z","repository":{"id":237804145,"uuid":"795274777","full_name":"nasa-jpl/cortex","owner":"nasa-jpl","description":"Modern data infrastructure for robotics projects.","archived":false,"fork":false,"pushed_at":"2024-06-18T20:13:19.000Z","size":615,"stargazers_count":17,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-03T03:07:06.566Z","etag":null,"topics":["database","robotics","ros","visualization"],"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/nasa-jpl.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-05-02T23:46:47.000Z","updated_at":"2025-03-31T18:03:55.000Z","dependencies_parsed_at":"2024-05-03T07:30:37.156Z","dependency_job_id":"9e86d16c-b69f-4e0f-8f97-403971edb521","html_url":"https://github.com/nasa-jpl/cortex","commit_stats":null,"previous_names":["nasa-jpl/cortex"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nasa-jpl%2Fcortex","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nasa-jpl%2Fcortex/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nasa-jpl%2Fcortex/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nasa-jpl%2Fcortex/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nasa-jpl","download_url":"https://codeload.github.com/nasa-jpl/cortex/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250600715,"owners_count":21457017,"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":["database","robotics","ros","visualization"],"created_at":"2024-11-10T12:04:41.748Z","updated_at":"2025-04-24T09:31:48.101Z","avatar_url":"https://github.com/nasa-jpl.png","language":"Python","funding_links":[],"categories":["Data Infrastructure"],"sub_categories":["Teleoperation"],"readme":"# CORTEX: Continuous Optimization in Robotics via Test and Exploration\n\n\u003e CORTEX was developed at NASA Jet Propulsion Laboratory (JPL) and is open sourced under\n\u003e the [Apache 2.0 License](LICENSE).\n\u003e\n\u003e The development of CORTEX was funded internally by JPL/JNEXT as part of the\n\u003e [Extant Exobiology Life Surveyor (EELS)](https://www.jpl.nasa.gov/robotics-at-jpl/eels) project, and builds on the NEO\n\u003e Autonomy Framework (hence, NEO-CORTEX). EELS is a snake\n\u003e robot that is being developed to explore the subsurface oceans of Europa and Enceladus. We encourage you to use CORTEX\n\u003e in your own projects, and to contribute to the project by submitting issues and pull requests. See\n\u003e the [References](#references) section for a list of relevant publications, documents, and projects.\n\u003e\n\u003e [EELS on the cover of Science Robotics - March 2024](https://www.science.org/toc/scirobotics/9/88)\n\u003e\n\u003e [EELS: Autonomous snake-like robot with task and motion planning capabilities for ice world exploration](https://www.science.org/doi/10.1126/scirobotics.adh8332)\n\n# Description\n\nCORTEX is a framework for accelerating robotics development through a combination of modern data infrastructure,\ntest automation, and intelligent data analysis. The framework enables developers to rapidly prototype and test new\nalgorithms and ideas with minimal effort. It also provides a set of tools for specifying and running experiments in a\nrepeatable manner, and for collecting and analyzing data from those experiments. Finally, CORTEX provides facilities for\nsingle- and multi-device configuration management, logging, and monitoring, which are essential for managing and\noperating complex robotics systems.\n\n# Installation\n\nCORTEX is installed as a Python library using the `setup.py` script.\n\n```shell\n./setup.py install\n\n# If you get a permission denied error:\nsudo ./setup.py install\n```\n\nAfter installing the CORTEX Python library, you can import the modules as follows:\n\n```python\nimport cortex\nfrom cortex.db import TemporalCRTX\nfrom cortex.db.entities import *\n# etc...\n```\n\n**See `notebooks/guides` for examples on how to use the CORTEX library.**\n\n# Self-hosting with Docker\n\nCORTEX relies on a database connection to store and retrieve data. We have provided a Docker setup which includes a\nPostgres database with TimescaleDB, and a Grafana dashboard for visualizing. We will assume that you have Docker\ninstalled on your system. If you do not have Docker installed, you can download it from the\n[Docker website](https://docs.docker.com/engine/). The following commands require the `docker compose` command\nto work properly.\n\n```\n./setup.py docker --start    start the CORTEX services (Postgres and Grafana)\n                  --stop     stop the CORTEX services\n                  --restart  restart the CORTEX services\n                  --purge    stop and remove the CORTEX services\n                   \n./setup.py database --init   populate the database with the necessary tables\n                    --wipe   clear the database, including locally mounted volumes\n```\n\nIn most cases, the Docker images will continue running in the background and start automatically when you restart your\ncomputer. You may also choose to connect CORTEX to your own instance of Postgres by modifying the `.env` file.\n\n## Configuration\n\nThe following components of CORTEX can be configured:\n\n- Docker containers, see [docker-compose.yml](docker-compose.yml) and [.env](.env)\n- Database (PostgreSQL w/ TimescaleDB), tables, etc., see [config/timescaledb/README.md](config/timescaledb/README.md)\n- Device Metrics (Telegraf), see [config/telegraf/README.md](config/telegraf/README.md)\n- Grafana (Dashboard), see [config/grafana/README.md](config/grafana/README.md)\n- ROS Workers, see [src/cortex/config/workers/README.md](src/cortex/config/workers/README.md)\n\n## Architecture\n\nCORTEX is intended to work with a wide variety of robots and configurations. It is designed to be as\nmodular as possible, so that it can be easily adapted and integrated into new and existing systems. The following\ndiagram shows the high-level architecture of the CORTEX data framework:\n[![CORTEX Architecture](docs/diagrams/cortex_architecture.png)](docs/diagrams/cortex_architecture.png)\n\n[//]: # (TODO: replace this with an updated diagram)\n\n### Agents\n\nCORTEX Agents can be thought of as components that are responsible for performing specific tasks in a robotics system.\nThey are typically implemented in the form of Python scripts, and can be configured using YAML files (where applicable).\n\nCORTEX currently provides the following Agents:\n\n- **worker**: responsible for listening to topics, applying preprocessors and transforms, and\n  inserting data into the database. Note that the worker node will typically subsample the data before sending it to the\n  database in order to reduce the amount of data that is sent.\n- **monitor**: responsible for collecting resource utilization metrics (CPU/Memory) from nodes and processes running on\n  the system.\n- **annotator**: responsible for recording events that occur during an experiment. This includes recording the start and\n  end times of an experiment, as well as significant events such as state transitions, reaching a goal, crashing, or\n  encountering an obstacle.\n\n#### Future Agents\n\nWe have developed additional agents but have not added them to the open source repository yet. These agents include:\n\n- **ROSA (ROS Agent)**: an AI agent that uses LLMs to interface with ROS using natural language queries.\n- **orchestrator**: manages the CORTEX system, including environment setup, configuration, and starting/stopping CORTEX\n  services.\n- **sampler**: collects data from sources that do not publish on open topics. This includes collecting data by\n  performing service/action calls, or by reading data from files.\n\n## Implementation\n\nThe following sections describe the various implementations of CORTEX (current and future).\n\n### ROS1\n\nWhile CORTEX agents are generally ROS-agnostic, we have developed a set of ROS nodes that can be used to interface with\nthe CORTEX framework. These nodes are implemented in Python and can be run on any system that has ROS installed.\nSimply copy the `ros1/` package into your ROS workspace.\n\n### ROS2\n\nWe are currently working on the ROS2 implementation. Please check back soon.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnasa-jpl%2Fcortex","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnasa-jpl%2Fcortex","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnasa-jpl%2Fcortex/lists"}