The creation of the ROS network has as goal the establishment of communication channels that allow the exchange of information between different components of a robotics system. In this particular case/project, the network connects the user interface (GUI) and the vehicle model simulation. The implementation of a ROS network also allows the use of additional ROS tools and applications as environment mapping, path following and object detection/avoidance. The network code used has been developed during the first semester of the project by a former member (documentation available). As seen in the following fragment of the network code (Figure 1), nodes are defined and subsequently assigned as publishers and/or subscribers (sending and/or receiving information, respectively).
The app created is responsible for being the graphical user interface (GUI), allowing the user to interact with the vehicle model and simulation by sending desired values for accelerration, braking and steering through the ROS network. As seen Figures 2 and 3 below, the connection to the network is established after the user presses the button (indicated by the green light) and the values are controlled by moving the respective sliders. The app can also be accessed as a web application and added to the project's website (developed by Ricardo Ota).
The Simulink vehicle model is responsible for predicting the behaviour of the vehicle system and performing several calculations regarding its position, movement and interactions with the surrounding environment. The simulation provided is significantly beneficial to the understanding and constant improvement of the prototype (modified golf cart), as well as testing scenarios that are impractical or infeasible to replicate such as object collision. The model was created by modifying the existing \Scene Interrogation with Camera and Ray Tracing Reference Application" example documentation for the Vehicle Dynamics blockset so it receives inputs from the ROS network. To do so, the network was created and different subscriber blocks (Figure 4) were added and connected to the respective acceleration, braking and steering inputs of the model subsystem and subsequently sent to the power- train, steering and vehicle body subsystems (Dynamics Subsystem in Figure 5), where they are finally processed and the motion resulting is delivered to the \Simulation 3D Vehicle" (Displays Subsystem in Figure 5).