Download the latest version Arduino IDE from https://www.arduino.cc/en/software
Follow the following tutorial to add ESP board in your Arduino IDE - https://randomnerdtutorials.com/how-to-install-esp8266-board-arduino-ide/
Simply go to Files > Preferences and add the following line in the Additional Board Managers URLs:
https://dl.espressif.com/dl/package_esp32_index.json, http://arduino.esp8266.com/stable/package_esp8266com_index.json
After that go into Tools > Board > Boards Manager and search for "esp32" and install the ESP32 board. That's it!
sudo apt-get install ros-$ROS_DISTRO-rosserial-arduino
sudo apt-get install ros-$ROS_DISTRO-rosserial
Clone the TortoiseBot Mini repo into your src folder of your catkin workspace
git clone https://github.com/rigbetellabs/tortoisebot_mini
Navigate to Arduino > libraries Open a terminal in the current directory
rosrun rosserial_arduino make_libraries.py .
This should build the required msgs
Open the tortoisebot_mini_ros code in Arduino IDE and change the SSID and Password on line number 25 & 26 to that of your Wi-Fi Connection.
Check the IP Address of your ROS Master PC using ifconfig command and put that in line number 31 of tortoisebot_mini_ros code with commas(,) instead of dot(.)
Make sure the switch on motor driver board is turned off and battery is not connected and then connect your ESP32 board to your computer using USB type B cable. Make sure the board is selected to "ESP32 Dev Module" in Arduino IDE and select the appropriate Port as well.
Upload the tortoisebot_mini_ros code on your ESP32 board.
Once code is Successfully uploaded, disconnect the USB Cable and connect the DC Jack of Battery to the Board .
DO NOT TURN ON THE ROBOT YET!
Launch the tortoisebot_mini.launch file on your Master PC to start ROS Master along with ROS Serial Node.
roslaunch tortoisebot_mini tortoisebot_mini.launch
It will prompt a INFO message saying "Waiting for socket connections on port 11411 waiting for socket connection"
Once the above INFO message is popped up, then you can turn on your Robot upon which you will see that different ROS topics start automatically.
Keep the previous terminal running add on a new terminal type the following command to start the teleoperation node.
rosrun teleop_twist_keyboard teleop_twist_keyboard.py
Note that the minimum operational speed for the robot is :
- Linear Velocity : 0.131 m/s
- Angular Velocity : 2.175 r/s
Now you can control the robot using teleoperation commands.