Establishing a distributed network system for remote control of UGV

Simultaneous Localization and Mapping is an important field of research as there has been a considerable amount of interest and real-world implications in the autonomous navigation and controls arena. In Spring 2018, the goal of my research was to remotely control the UGV through a distributed network system via the Robotic Operating System (ROS). This comprised of two primary goals: 1. finding a way to connect the Jetson TX2 with a ground control station (off-board laptop) over a wireless network connection and 2. controlling the rover remotely from the ground control station to execute simple maneuvers.

Development Environment

Distributed Network System

Establishment of a distributed system requires two important functionalities: connection of two nodes in the network (master node and the slave node) and the real-time transfer of information in the form of topics/commands etc. through the Robotic Operating System between these nodes. This helps in tracking the processes happening onboard the rover in real-time on an off-board station and also gives the ability to execute manual override commands in case of any emergency if the rover behaves abnormally.

As wireless connection can be enabled by many means such as WIFI, Bluetooth and Ad Hoc on the Jetson, it was critical to find out which is the best method to connect the nodes in the distributed system. For our model of Jetson TX2, which comes with the Wireless 802.11.a/b/g/n/ac 2×2 867Mbps connection, it can be noted that the Jetson is equipped with Ad Hoc and WIFI capabilities. From which Ad Hoc appeared to be more advantageous and appropriate for our problem, hence it was implemented. The infographic below summarizes the network architecture in a pictorial manner.

UGV Control using MAVROS

Upon successful establishment of the distributed network systems, the rover needs to be controlled by commands in ROS through the MAVROS package which is responsible for interacting with the Pixhawk hardware. The MAVROS package will be taking inputs like desired position, velocity, acceleration, etc. and convert them to physical actuator inputs to the servos for motion control. This allows us to remotely execute various maneuvers while also tracking and comparing the performance of the vehicle with ground truth on the off-board ground control station. The image below shows the flow of information via the MAVROS package.

Implementation

Distributed Network System

Firstly, an open network had to be created on either the ground control station or the Jetson, and both the nodes connected to that common network. The ROS network requires the declaration of a master node and a slave node to point the variable to the master node for all the information. Hence, the ROS_MASTER and their respective IPs were declared on both the ROS terminals to enable this. This process assigned roles of a master node (the main host computer) and the slave node (the follower node) on the common network. Finally, a ROS package was run on Jetson to publish topics which were checked for on the other node to see if the information was transmitted. Both configurations were tested: Jetson as a master node and Ground Control Station (GCS) as a slave node and vice versa. It was discovered that Jetson should be set to be the ROS-MASTER since all the ROSCORE processes would be running onboard to enable complete autonomous control and eliminate any dependency on the GCS. The below infographic shows the step-by-step process of how this distributed network was set up and the commands used for it.

Two keys issues were noted during the testing of the connections: 1. the speed of the data transfer and 2. the complete transmission of the topics based on which computer created an open network. It was found that when the GCS created a local network, Jetson was having issues in connecting with it. When tried vice versa, that is, local network was created on Jetson and the GCS manually joined it, the connection over ROS worked properly. After the successful establishment of wireless connection, a data transfer speed test was conducted where the LIDAR was remotely turned on Jetson and the video data was visualized using RVIZ on the GCS. It was found that the data publishing rate was about 30 frames/second onboard the Jetson compared to 5 frames/second on GCS when the same topics were visualized. This test helped us understand the data transfer rate in ROS over that distributed network.

After both the nodes are on the same network, the Jetson can be disconnected from the monitor and the GCS can also implement the master and slave node declaration through the ‘ssh’ protocol. This allows remote execution of commands on Jetson. The ‘screen’ package was also implemented which gives the ability to GCS to rely on just on ‘ssh’ connection and open parallel “screens” which prevents the need of opening up a new ‘ssh’ connection in every terminal window for executing different commands.

UGV Control using MAVROS

As MAVROS enabled the conversion of simple motion commands to actuator inputs, it was critical to explore different ways to control the rover remotely by executing simple motion commands. A ROS package was created which was responsible for setting up a ROS node for permanently publishing data to the ‘/mavros/actuator_controls’ topic using the Actuator control message. This enables the remotely connected GCS to execute motion commands of throttle and steering from the command prompt. Further, this script was modified to execute a set of motion commands one after the other to see the response of the rover. The sample script is shown below:

These tests were performed while the rover was above ground (wheels not in contact) so that in case of any abnormal behavior, the rover did not get damaged. After the successful execution of the actuator controls package, a real-time ground test was conducted where the rover was commanded with different throttle values between two set-points to see the correlation of the throttle values with velocity. The rover was given a command to execute a throttle value between two marked points at a distance of 6 ft. The rover was timed, and the velocity calculated. The starting point and the ending point for the rover are shown below.

Numerous readings were recorded and averaged to get a better estimate. The below graph shows the variation of velocity of the rover with the remote throttle input. It is to be noted that it is linearly correlated.

Limitations and Future Improvements

Distributed Network System

Currently, the Ad Hoc connection between the Jetson and the GCS is established as an open non-encrypted connection, that is, the Ad Hoc connection can be joined by any device in the range of the network. This is caused by the limitation of the Jetson TX2 model for not supporting encryption. When tried to connect Jetson on a secure closed network, the Jetson crashes. It was discovered that a similar issue persists, and it is a hardware limitation. This issue clearly has its downsides as the secure connection is compromised between the nodes. A potential solution to this can be to purchase an off-the-shelf WIFI card from a third-party vendor for the Jetson. This as well has its limitations as there is very limited documentation for the implementation of this. Focusing on the overarching goal for the project, it is not too critical to implement the closed connection since this is only intended for research on the SLAM algorithm which can be tested in a closed secure environment.

UGV Control using MAVROS

Currently, only the actuator control package has been implemented which uses the throttle parameters to control the motors. As the throttle is not a generalized control method for rovers, the implementation of velocity setpoints will be useful in integration with the navigation algorithm. This can be done using a package that takes in velocity setpoints as inputs, which will be a much more efficient way of keeping track of the rover. The “of- board” tutorial in px4 wiki is the best method to do so since the code and necessary documentation is available and only a few minor changes have to be made to the code.

Conclusions

The work during the semester included implementation, debugging, and testing different methods to accomplish the two tasks of establishing a remote connection through a distributed network on ROS and remotely controlling the UGV through MAVROS packages. After successfully being able to achieve these tasks, the work has been documented and passed on for future experimentation. This work will be crucial in helping the SLAM project get closer to its desired outcome.


Description

This was my first time experienced working with ROS and a remotely controlled unmanned system. Learned a lot about remote control and hardware-software integration.