Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/goseind/ball-schubser
A robot that pushes a ball.
https://github.com/goseind/ball-schubser
objectrecognition python raspberry-pi robot robotics ros ros-noetic ubuntu yolo yolo5
Last synced: 13 days ago
JSON representation
A robot that pushes a ball.
- Host: GitHub
- URL: https://github.com/goseind/ball-schubser
- Owner: goseind
- License: mit
- Created: 2022-04-21T10:10:55.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-12-29T10:43:29.000Z (almost 2 years ago)
- Last Synced: 2024-04-13T15:33:10.145Z (8 months ago)
- Topics: objectrecognition, python, raspberry-pi, robot, robotics, ros, ros-noetic, ubuntu, yolo, yolo5
- Language: TeX
- Homepage: https://gosein.de/autonomous-robot.html
- Size: 72 MB
- Stars: 1
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Ball π₯ Schubser π€
A robot π€ that pushes a ball π₯ (into a goal π₯ ).
[](media/ball-schubser_front_side_new_desc.jpg)
[![Demo Video - Ball Schubser](https://img.youtube.com/vi/InvO-HXr4YA/0.jpg)](https://www.youtube.com/watch?v=InvO-HXr4YA)
Citation and link to our paper: [Bracke, A., Gosein, D., KΓΌrschner, M., Mayer, J., & Seefeld, J. (n.d.). Development of an Autonomous Robot for Detecting and Collecting Objects (p. 12) [Working Paper] URN: urn:nbn:de:bsz:953-opus-1006](https://nbn-resolving.org/urn:nbn:de:bsz:953-opus-1006)
## Startup Instructions
1. Clone this repo
2. Inside `.env` add `MASTER_IP=`
3. Run `docker-compose up -d --remove-orphans`
4. Start Turtlebot and connect to via SSH `ssh ubuntu@` with default password: `turtlebot`
5. Set `export ROS_MASTER_URI=`
6. Run `sh ~/launch.sh`
7. Run `sh ~/cam.sh`
### Simplified (beta)1. Clone this repo
2. Execute `export BIP= && export MIP=`
3. Execute `start-everything`## Raspberry Pi π’ bot Preparation
To prepare the image for the Raspberry Pi follow these instructions: https://emanual.robotis.com/docs/en/platform/turtlebot3/sbc_setup/#sbc-setup
After the micro SD card is ready, boot it from your Turtlebot, connect via SSH: `ssh ubuntu@` (default password: `turtlebot`) and do the following:
1. Run: `sudo usermod -aG root ubuntu` to make the user root (see Lessons Learned).
2. Add your network to the `/etc/netplan/50-cloud-init.yaml` or prepare and copy it via SCP: `scp 50-cloud-init.yaml ubuntu@:/etc/netplan/50-cloud-init.yaml`. Also refer to this [template](turtlebot/50-cloud-init.yaml).
3. Edit: `nano ~/.bashrc` to add the below variables and: `source ~/.bashrc`.
```bash
export ROS_MASTER_URI=http://:11311
export ROS_HOSTNAME=
```4. Install Raspberry Pi Cam and dependencies with the following commands:
```bash
sudo apt install libraspberrypi-dev libraspberrypi0 libpigpiod-if-dev ros-noetic-compressed-image-transport ros-noetic-camera-info-manager ros-noetic-diagnostic-updater
cd ~/catkin/src
git clone https://github.com/UbiquityRobotics/raspicam_node
catkin_make
```5. Run: `export TURTLEBOT3_MODEL=Burger` to set the Turtlebot model.
6. Start without LIDAR sensor: `roslaunch turtlebot3_bringup turtlebot3_core.launch`.
7. Start the Cam via:
```bash
rosparam set cv_camera/device_id 0
rosrun cv_camera cv_camera_node
```For step 5, 6 and 7 you can also use the provided [Makefile](Makefile) and run `make start-everything`.
## Detection Node
Download weights for yolov4 from: https://github.com/AlexeyAB/darknet/releases/download/darknet_yolo_v3_optimal/yolov4.weights and move the weights into `detect/yolo_node/weights`.
Dependencies:
* tensorflow
* pandas
* opencv-python## Lessons Learned
* The default user `ubuntu` on the Turtlebot image does not have the proper `tty` permissions. The problem could be solved by adding `ubuntu` to `root` user group, by executing: `sudo usermod -aG root ubuntu`, as the normal group used for that called `dialout` was not set for `tty`.
* ROS machines must have a resolved DNS name as they communicate with each other, see: http://wiki.ros.org/ROS/NetworkSetup.
* Router should not be connected to the internet in order to not disturb the connection
* Running the detection on the Turtlebot causes extrem delays:```bash
1/1 [==============================] - 6s 6s/step
x1 250
y1 256
x2 354
y2 360
class_name sports ball
score 0.693495
w 104
h 104
Name: 0, dtype: object
1/1 [==============================] - 6s 6s/step
x1 250
y1 255
x2 354
y2 360
class_name sports ball
score 0.756736
w 104
h 105
Name: 0, dtype: object
```## Raspi cam
- ui: `rqt`
- list all packages: `rospack list-names`
- build packages inside `~/catkin_ws`: catkin_make
- start master: `roscore`