This section explains how the code is structured and the usefulness of the interfaces that you can see when you launch the code.
So as to be able to understand and see the code, you must follow the steps explained in the previous section.
- Robdos Autonomous
It includes the control of the AUV. It is used in both the real robot and the the simulates one. The inputs that we receive so that we can control the robot are: Odometry (Position and Orientation) and the waypoint desired. Last, it is important to mentioned that the linear and angular movement are done at the same time.
- Robdos Dependancies
This package includes the dependancies (usb_cam, mavros, ...) necessary to compile the project. This package has been done in the case one of the packages gets upgraded and, this impedes us to be able to compile the project.
- Robdos Dynamics
This is a package that we use in our as an alternative to the plugin to Gazebo that I will explain later. It receives the velocities we are sending to the thrusters of the submarine, transforms them to the forces and determines the position of the robot. Then, the node sends the position to Gazebo and it represents it.
- Robdos Safety
This package checks all sensors from the AUV and acts in consequence of the value of those sensors. The sensors it reads are humidity, temperature and battery.
- Robdos Sim
- Robdos State Machine
This package includes the state machine that has been done with the tool Smach. We can move through the different states, depending on the mission we want to do.
- Robdos Station
It shows a graphical user interface (GUI) that reads the value of the topics and monitors some of them.
- Robdos Teleop
It converts the input of the joy into the input of the PixHawk. The buttoms we must press are mentioned above.
- Robdos Utils
- Robdos Vision
- Robdos Visualization
So as to be able to have an standardized code, we must follow the rules mentioned in:
In addition, we have to:
- Name topics as with /robdos/NameTopic
- Start package names with robdos
The possible commands we can use to control the robot are:
|10 & 14||Arm|
|10 & 15||Disarm|
|10 & 12||Change teleop|
|8 & 9||Change semiautonomous|
This is the interface that shows us the states available in the statemachine. The green one indicates the one we are at.
Gazebo is the interface that we use to represent the position of the robot when we are simulating it. We have also included a world similar to the one we will compete at.
We use Rviz to send the robot to a point (with the ball shown in the image) and, also, to see the position of the robot.
It shows us different graphs about how different variables change with the time.
It indicates all topics and the value they are having when we launch the project.
The launch available in the code are:
The ones that we use in order to simulate or control the real robot are:
- Simulated robot:
- Real Robot:
List of topics¶
Topics of the PixHawk: