- Farrel Ahmad (Dagozilla ITB Programming Crew)
- Agustinus Yudhistira W. S. (Dagozilla ITB Electrical Crew)
This program is a software impelmentation example for vaccum cleaner like robot that can avoid any obstacle using three ultrasonic sensors placed in the robot. The sensors are placed at the front, left, and right of the robot. The algorithm is simple, the robot will avoid any obstacle whenever the sensor reading exceed certain distance threshold. Although it is named vacuum cleaner robot. The robot does not have vacuum cleaner in it, only the algorithm, movement, and implementation are similar to the real vacuum cleaner robot.
- Ubuntu 20.04 LTS
- ROS Noetic
- Arduino IDE
- For ROS in Robot's PC
$ cd ros-pc/vac_ws
$ catkin_make
- For ROS in Arduino, open
hardware.ino
in ros-arduino in Arduino IDE and upload the code to the desired Arduino. Don't forget to set the pin before uploading. The default baud rate is set to 57600 and can be changed inrosserial.launch
in ros-pc and in Arduino IDE.
- Make sure the robot's PC is in the same network as the laptop
- Plug the Arduino to the PC using USB.
- Remotly ssh to the robot's PC by using this command
$ ssh -XC <pc_name>@<ip_address>
# for example
$ ssh -XC [email protected]
- Enter the PC password and now the laptop has connected to PC's terminal
- Change directory to ros-pc/vac_ws and run this command
$ source devel/setup.bash #if using bash terminal
# or
$ source devel/setup.zsh #if using zsh terminal
- Launch the program
$ roslaunch vac_launch routine.launch
- Call rosservice to enable send non zero pwm to arduino
$ rosservice call /control/base/set_base_active "data : true"
- The robot will now move and avoid any obstacle found by ultrasonic sensor