This project creates a real-time control system that integrates machine learning with embedded processing for adaptive sensor and actuator control.
- Docker
- ROS2 Humble
- Python 3.10 or higher
- ODrive hardware support
This document provides instructions for setting up and using the Newton project.
- Docker
- ROS2 Humble
- Python 3.10 or higher
- ODrive
- CAN BUS (refer to nvidia's guide)[https://docs.nvidia.com/jetson/archives/r35.4.1/DeveloperGuide/text/HR/ControllerAreaNetworkCan.html]
- Clone the repository and navigate to the project directory:
cd newton-jetson-software- Make the setup script executable and run it:
chmod +x install.sh
./setup.sh- Make the setup script executable and run it:
chmod +x setup.sh
./setup.shThis will:
- Set up the newton command in
/usr/local/bin - Make the newton script executable
- Create necessary symbolic links
Before running anything, make sure the can interface is working/
sudo ip link set can0 up type can bitrate 250000Run the latest container by calling this command from the root directory.
Note: The containers are run with interactive mode (-it flag) which means:
- You'll get an interactive terminal session
- The container runs in the foreground
- Automatic volume mounting of your workspace
nt ctn runNote: the command mounts the directory your are calling it from. So if you call it from ~ then the whole ~/ directory is mounted on the container. You want to run it from the root directory.
Once the container runs, make sure to run this command to make the nt(newton keyword accessible in the shell)
source setup.shnt pkg buildThis command will build all ros packages.
Once packages are built, they need to be source with
source src/install/setup.bashWhen the packages are source you can run using
ros2 launch n_motor_controller motors.launch.pyThis will initiliaze as many nodes they are in the config/newton.yaml file and start the motor controller.
Within the container you can this command remove old build files.
nt pkg cleanTo stop and exit the container:
- Press
Ctrl + Din the container shell
After building and sourcing packages, you can verify installation with:
ros2 pkg list | grep odrive_can
ros2 pkg list | grep odrive_motor