Robotics workspace. Contains ROS2 packages to run robot cars controlled by gamepad, collects annotated camera images, and runs a robot car autonomously with a trained neural network.
ros2-gamepad-to-twist-message
ros2-pytorch-model-to-twist-message
ros2-twist-message-to-robot-motion
ros2-save-camera-image
git clone https://github.com/ANI717/ANI717_Robotics
cd ~/ANI717_Robotics/robot_ws/
Install Inputs, Torch, Torchvision, Opencv, traitlets, multiexit, Adafruit-SSD1306 and Adafruit_MotorHat.
pip3 install numpy==1.19.3
python3 -m pip install inputs torch torchvision opencv-python
python3 -m pip install Adafruit-SSD1306 Adafruit_MotorHat traitlets multiexit
Install ROS2 dependency.
sudo apt install python3-rosdep2
rosdep update
rosdep install --from-paths src --ignore-src -r -y
sudo groupadd i2c
sudo chown :i2c /dev/i2c-1
sudo chmod g+rw /dev/i2c-1
sudo gpasswd -a $USER i2c
Run following command and reboot.
sudo gpasswd -a $USER input
colcon build && . install/setup.bash && ros2 launch robot_launch gamepad_launch.py
colcon build --symlink-install && . install/setup.bash && ros2 launch robot_launch gamepad_launch.py
colcon build && . install/setup.bash && ros2 launch robot_launch autonomous_launch.py
cd ../
zip -r images.zip images