|
|
# Turtlebot Adapter Design
|
|
|
This page is designed to document the design choices made while developing the turtlebot adapter.
|
|
|
|
|
|
## Necessities
|
|
|
* OpenTCS works based on actions, these actions define which operations the robot is able to process. If you want to use the Turtlebot adapter you have to add the actions of your robot to the `processMesage` method in `server.cpp`. Here you will find the key called `json["operations"]`. Add your actions using: `json["operations"].append("YOUR OPERATION");`
|
|
|
* If you want to use the Turtlebot or another ROS robot, you have to add a map of the environment to the navigation stack. More information about how to do that can be found [here](https://git.fhict.nl/I312980/move-it/wikis/installation/turtlebot3).
|
|
|
* If you add a new class file you have to add it to `CMakeLists.txt`.
|
|
|
* If you want to use more ROS Topics you have to add them to `package.xml`.
|
|
|
|
|
|
## Design choices
|
|
|
* We have chosen to start the entire robot with this adapter. This way the end user does not need to start learning Linux or ROS.
|
|
|
* We have chosen to run the different components in screens. This way they start as background processes. This comes in very handy because the robot will be operate using an SSH connection, since it is not possible to attach a monitor to a driving robot.
|
|
|
* Since choosing a specific port for a service is risky, we have chosen to give the user a possibility to change the port. The port can be set between 49152 and 65535, these ports are the ports which programmers are able to use when they want to add a service. Take note that you have to change the port in the turtlebot adapter's launch file, but also in the OpenTCS warehouse!
|
|
|
* We have chosen to let the robot rotate twice before making the robot available for OpenTCS. We did this so the robot finds it's location in the warehouse it is standing.
|
|
|
* We had to wait for the wait until we are subscribed to the Twist messages. We did this by adding a while loop. However if you are listening to this Topic, the while loop will be skipped automatically since it checks for the amount of subscribers. This means that you need to be sure that nobody except the robot is subscribed. We had to add this loop because the subscription has to take a few seconds to be validated by ROS.
|
|
|
|
|
|
## Limitations
|
|
|
* The Makefile was not able to find the necessary commands, therefore we added a couple of scripts in the `scripts` folder. These scripts install, build, and run the adapter.
|
|
|
* Due to a limit time frame, we where not able to create a JSON file or a turtlebot protocol header. This file has to include the robot operations which the robot is able to process. Because an end user now needs to edit the code to add the operations his robot is able to process.
|
|
|
* Because we were not able to properly read the battery percentage, we were not able to send the battery percentage to OpenTCS. We solved this by adding a couple of TODO's in the code.
|
|
|
* Due to a limit time frame we were not able to parse the ROS state with the OpenTCS state, therefore we only send `executing` or `error` to OpenTCS. We do return the state from the `setGoal` method. So you only need to create a parser in either the Turtlebot adapter or in the communication adapter.
|
|
|
* The `setGoal` method is blocking, because we did not have the time nor knowledge to implement threads in C++.
|
|
|
|
|
|
[home](https://git.fhict.nl/I312980/move-it/wikis/home) |
|
|
\ No newline at end of file |