A ROS Python package for my rosbot - running on a Raspberry Pi.
Please note: this code is still in the middle of the development process!
- Install Ubuntu Desktop (Instruction).
https://abyz.me.uk/rpi/pigpio/download.html (See detailed instructions there - will be installed to /usr/local/lib and /usr/local/bin)
https://github.com/markusk/rosbot
git clone https://github.com/markusk/rosbot.git
cd rosbot
sudo cp raspi/etc__systemd__system__rosbot-boot.service /etc/systemd/system/
sudo systemctl daemon-reload
sudo systemctl enable rosbot-boot.service
sudo systemctl start rosbot-boot.service
sudo apt-get install joystick
- Supported by the Kernel - if used with the USB connector.
- Connect a Gamepad to the Pi, start the following command and press any buttons or move some axes:
jstest --normal /dev/input/js0
-
Install ROS on your Raspberry Pi (Instruction):
-
Install ROS packages (+++ TO BE DEFINED !!! +++):
-
Do not forget to "autostart" ros; i.e. in your terminal, when logging in:
echo 'source /opt/ros/jazzy/setup.bash' >> ~/.bashrc
- Create your own development directory "develop"
mkdir ~/develop
cd ~/develop
- Clone this repository
git clone https://github.com/markusk/rvr.git
- Create a colcon workspace (ROS 2) with 'src' subfolder:
mkdir -p ~/ros2_ws/src
- Create symbolic link with the name of each ros package from this repository, pointing into the 'src' folder from your ROS/colcon workspace (ros_ws):
cd ~/ros2_ws/src
ln -s ~/develop/rosbot/ROS/colcon_workspace/src/rosbot rosbot
ln -s ~/develop/rosbot/ROS/colcon_workspace/src/testbot testbot
- Now also source your ROS workspace you created:
echo 'source ~/ros2_ws/install/setup.bash' >> ~/.bashrc
- Build the ROS rosbot package
cd ~/ros2_ws
colcon build --symlink-install
source install/setup.bash
- Start the ROS launch file:
cd ~/ros2_ws
ros2 launch rosbot test.launch
- The output should look like above.
- Exit the program with CTRL-C.
- Run the main launch file on the robot (Raspberry Pi):
cd ~/catkin_ws
roslaunch rvr rvr.launch
to do: On another computer (the ground control center):
export ROS_MASTER_URI=http://<hostname>:11311
rosparam set joy_node/dev "/dev/input/js1"
roslaunch rvr ground_control_center.launch
sudo cp raspi/etc__systemd__system__rvr-ros-start.service /etc/systemd/system/rvr-ros-start.service
sudo systemctl daemon-reload
sudo systemctl start rvr-ros-start.service
sudo systemctl enable rvr-ros-start.service
Listens to a teleop_twist_keyboard node and prints out the data/messages. Uses:
- teleop_twist_keyboard
- nodes/keyboard_listener.py
Controls the motors on the robot. Uses:
- motor_server.py
Controls the whole robot. To be started on the robot. Uses:
- motor_server.py
to do:
- tf_broadcaster.py
- battery_publisher.py
- imu_bno055.py
- base_controller.py
- minibot_camera
- urg_node