
CyberPhysics is a platform for deploying robotic and ML applications.
- browser-based graphical user interface
- access to latest ROS tools
- deployable to kubernetes
- and more...
(This project is designed for Ubuntu 24.04)
./install.sh
From the applications folder run "make build_<app_name>". For example:
cd applications && make build_ros2
Write new applications and put them in the applications folder.
Compose your applications together using docker compose in the compositions folder.
Launch it with docker compose. For example:
docker compose -f compositions/jupyter.yaml up
For viewing ROS data, run the Foxglove compose file, and launch Foxglove on your host machine.
foxglove-studio
A web based GUI can be built with NiceGUI, and then accessed through your host machine's browser:
http://localhost:8080/
Reference:
https://github.com/NVIDIA-ISAAC-ROS/isaac_ros_nvblox/tree/main/nvblox_foxglove
- git clone https://github.com/NVIDIA-ISAAC-ROS/isaac_ros_nvblox.git
- cd nvblox_foxglove
- (install npm==20.10.0, see below)
- npm install
- npm run local-install
To install npm==20.10.0:
curl https://raw.githubusercontent.com/creationix/nvm/master/install.sh | bash
nvm install 20.10.0
nvm use 20.10.0
ARDUINO:
- Connect Arduino Teensy 4.1 to USB port on host computer.
- Launch "foxglove-studio" from command line.
cd compositions
docker compose -f arduino.yaml up
- Messages from the Arduino board should now be visible
SPATIAL RECONSTRUCTION:
- Connect Realsense 435i to USB port on host computer.
cd compositions
docker compose -f reconstruction.yaml up
- Launch "foxglove-studio" from command line.
- Select "Open connection" -> "Rosbridge" -> "Open"
- Messages from the Nvblox board should now be visible
Have a look at the README in each application's folder for explanations of what they do.
Many cyber-physical systems quickly become unamangeable as complexity and dependency conflicts scale exponentially with the number of components. This project should help with that.
Real time performance can be achieved by pinning a process to a core:
docker run --cpuset-cpus="0,1" -it your_image your_command
services:
your_service:
image: your_image
cpuset: "0,1"
Then reserve the cores needed before running the containers:
cset shield --cpu 0,1 --kthread on
Then set cgroup-parent in dockerd config "/etc/docker/daemon.json":
{
"cgroup-parent": "/system"
}
Then to restore the host system:
cset shield --reset
sudo apt remove python3-rpi.gpio
sudo apt install python3-rpi-lgpio
git lfs migrate import --include="*.exe, *.iso" --everything
Code gen
I need to implement [specific functionality] in [programming language]. Key requirements:
- [Requirement 1]
- [Requirement 2]
- [Requirement 3] Please consider:
- Error handling
- Edge cases
- Performance optimization
- Best practices for [language/framework] Please do not unnecessarily remove any comments or code. Generate the code with clear comments explaining the logic.
—
Review code
Can you explain the following part of the code in detail: [paste code section] Specifically:
- What is the purpose of this section?
- How does it work step-by-step?
- Are there any potential issues or limitations with this approach?
—
Improvements
Please review the following code: [paste your code] Consider:
- Code quality and adherence to best practices
- Potential bugs or edge cases
- Performance optimizations
- Readability and maintainability
- Any security concerns Suggest improvements and explain your reasoning for each suggestion.
—
Algorithm
Implement a [name of algorithm] in [programming language]. Please include:
- The main function with clear parameter and return types
- Helper functions if necessary
- Time and space complexity analysis
- Example usage
—
Class
Create a [class/module] for [specific functionality] in [programming language]. Include:
- Constructor/initialization
- Main methods with clear docstrings
- Any necessary private helper methods
- Proper encapsulation and adherence to OOP principles
—
Optimizing
Here's a piece of code that needs optimization: [paste code] Please suggest optimizations to improve its performance. For each suggestion, explain the expected improvement and any trade-offs.
—
Tests
Generate unit tests for the following function: [paste function] Include tests for:
- Normal expected inputs
- Edge cases
- Invalid inputs Use [preferred testing framework] syntax.