Close

Let the integration begin

A project log for Robotics Ground Control Station

Yet another overkill project. An attempt at building a portable and versatile GCS for robotics.

maximiliano-palayMaximiliano Palay 11/06/2021 at 14:180 Comments

The first thing I did was checking if the inputs were correctly connected to the Arduino and if it could read them properly. So I installed the Arduino IDE on the Jetson Nano (could have done that on a separate computer) and wrote a sketch to read all the inputs and print them. Then, one by one, I tested each one and checked the values made sense. You can find the Arduino sketch in GitHub repository linked to this project. It is very basic but just in case anyone finds it useful I have uploaded it.

While performing these tests, I actually had a weird behavior show up. When moving the linear sliders, other values changed as well. This wasn't a good sign. It was consistent through both sliders, so I must have done something wrong, I thought. After checking the wiring, I did mess up when soldering. Mixed two cables and connected them in the wrong pins. After disassembly, resoldering and performing the tests again, everything seemed fine.

ROS

Now for the fun part. I have never used ROS until this project and I had a hard time at first trying to understand what ROS does and what it is for. There are a bunch of great tutorials on the internet and I do recommend reading the official ROS Wiki. It is a tool I have been wanting to learn and start using, as it makes robotics development easier, faster and more collaborative, as many people that work on ROS nodes can share their work which should function without problems in many other platforms.

The first thing I wanted to do was make the Jetson receive commands sent by the Arduino. There is already a rosserial node implementation that manages the serial connection and lets a device such as the Arduino publish and subscribe to topics, making this information available in the host computer (Jetson).

The sample application I made was the Arduino publishing a Twist message to the /cmd_vel topic, and used the left joystick for x_vel and z_rot, this would be useful for my robotics platform that was under development.

After uploading the Arduino sketch (also available in the files section), all I had left was running roscore and the python serial node. To visualize if everything was working, I first run a rostopic list, to see that the topic to which the Arduino was publishing was actually there, and the rostopic echo, to visualize the messages being published.

Instead of using the wireless adapters, I decided to go one step at a time, and wire up the RGCS to a network and try to control a robot connected to the same network. I had some network issues and difficulty to communicate the station with the robot. Luckily, there is a great tutorial made by Clearpath Robotics addressing network issues, huge thanks to them!

The robot that I was going to test this with has a Lidar and camera, so wanted to visualize these on the screen. Made a launch file that launches everything in the base station; the python serial node, gstreamer to view the live feed and Rviz to see the real time point cloud generated by the Lidar sensor.  

I made a ros package that launches everything and can be found over at the Github linked to this project.

Discussions