AMD Xilinx KR260 Robotics Starter Kit: Democratizing Smart Robots


AMD Xilinx KR260 Robotics Starter Kit: Testing ROS Synch, Environment Control, and Takeaways

tsn test setup kr260

How To Test Time Sensitive Networking

Prior to testing, AMD Xilinx walked us through the process to test synchronization for ourselves. This is why we have more than one KR260 Robotics Starter Kit on hand, since synchronization takes more than one node, but locks in every node on a TSN-aware cluster. One KR260 works as the clock leader, communicating to each other node in the group with sub-millisecond accuracy. The leader runs the ROS 2 Multi-Node Communication TSN Accelerator app in master mode, while other nodes on the network run it in listener mode.

kr260 updating two nodes
Time sensitive networking requires two nodes, which means two sets of updates. Let's race!

We could measure with an oscilloscope the rising and falling edges of the clock cycle and watch in real-time as the boards would fall into sync. For this we used a Digilent Analog Discovery 2, which is a USB oscilloscope that can connect to the Pmod connectors on a pair of KR260 Robotics Starter Kit boards. Through the Analog Discovery WaveForms software, we can check that we're getting a good signal.

After that, it was time to fire up the application in Publisher mode on one board. Once that app was up and running and broadcasting, any other board connected via the Industrial Ethernet ports could run the same app in Subscriber mode to sync up. It only took a couple of seconds to get up and running and the boards were locked in like the next image. Note that once these boards got their signals in sync, it never wavered, even after leaving it to run for hours on end. Of course, being locked in for hours at a time is what's required to keep a factory running smoothly. All the same, it's pretty impressive to see it going on an affordable setup like a pair of $349 KR260 Robotics Starter Kits. 

synced oscilloscope
The timestamps are a little off (above) because the actual clock doesn't sync; just the network signal.

It should be noted that the KR260 Robotics Starter Kit's implementation isn't some proprietary TSN configuration. While TSN-aware switches aren't necessary due to the KR260 daughterboard's inclusion of two Industrial Ethernet ports, they're fully supported. The same is true of Intel's I210 series of Gigabit Ethernet controllers. Anything that has the timing functionality required by the 802.1AS specification should work well. While we didn't have a Linux PC with an I210 handy, AMD Xilinx's demo application calls out this combination specifically, and so it should be well supported. 

Scheduled Traffic vs. Best Effort 

Each packet that the ROS 2 Multi-node TSN Accelerator application transmits can be marked as Scheduled Traffic or Best Effort. Scheduled Traffic is the time-sensitive traffic that each node in the robotic network relies on to do work. These are instructions on the timing and procedure of moving arms, installing components, and moving products through the pipeline, for example. Other packets are not as sensitive to latency, and the system will make its Best Effort (hence the name) to send them intermingled with and woven around the high-priority ST packets.
2board osc
Without an Intel I210 NIC available, we tested Time-Sensitive Networking with two KR260 boards

On the other hand, BE packets have no guarantee of on-time delivery -- or delivery at all, for that matter -- since there is other traffic on the wire. In traditional networking terms, the UDP protocol is a Best Effort kind of protocol, often used for DHCP address assignment or DNS routing information, though actual non-robotics networking should be limited to the other two Gigabit Ethernet ports in the KR260's case. 

The best part of all of this isn't the sync itself, or the fact that the nodes can differentiate between time-critical packets and what just requires a best effort, but what you can do with the sync. AMD Xilinx makes all of this software freely available on its GitHub page, and encourages roboticists to use it as a jumping off point. Once the problem of synchronization has been tackled, which this software does for you, then it's time to get creative. AMD Xilinx provides its Vitis 2022 platform for creating and extending applications like these that run on the FPGA accelerator of a K26 SoM, and their relatively low entry point makes robotics affordable for plenty of budding roboticists the world over. 

AMD Xilinx KR260 Controlling the Environment

Along with syncing up our nodes and actually running the robots, many factories that produce sensitive equipment must be built in a controlled environment. Part of that is keeping dust and contaminants out, but it also requires monitoring temperature and humidity throughout a facility, and programming the HVAC and humidity system so that something that can be done with that data. While we don't have a huge industrial heating and cooling system handy, we can use the KR260 to monitor temperatures and humidity.

Many factories have this kind of sensor and control network built-in, and more often than not it's using legacy protocols such as RS485. If TSN is the latest and greatest Lamborghini Huracan of robotics communication protocols, RS485 is the unloved and under-appreciated but totally reliable Honda Civic. Replacing these legacy systems is time-consuming and costly, so as a way to bridge the gap between the older and newer protocols, AMD Xilinx decided to just support both -- and quite a bit else -- in the KR260 Robotics Starter Kit. 

rs485 sensor test

Interestingly, RS485 temperature and humidity sensors can be controlled with the TSN application. The reason for this is that more often than not, the environment is controlled in multiple zones and multiple KR260 boards can each be monitoring the environment in their respective zones, and then use the BE packets we discussed earlier to send that data to a climate control system. 

terminal temp humidity sensor

To do this, we got our hands on the same RS485-based sensor that AMD Xilinx recommends, and connected it to one of the board's Pmod inputs. Running the pmod-rs485-test application probes the monitor and displays the results on the screen. Just like the main TSN application, this is available directly from AMD Xilinx and serves as a good jumping off point for creating a real-time environment monitoring and control systems. In the image above, you'll notice 99.9% humidity. No, we didn't take this to a rain forest for testing; this is the result of me breathing on the sensor to make sure that the temperature and humidity that it registered changed. 

Other ROS 2 Applications

Just like with the KV260 AI Vision Starter Kit, the KR260 Robotics Starter Kit has a targeted variety of free-to-use demo applications that provide a starting point for developers to get up and running. They're all available in the App Store for Kria SoMs on the AMD Xilinx website. The ROS 2 Time-Sensitive accelerator is just one such demo application, but there are more for robotics kits.

The ROS 2 10GigE Vision Camera Accelerated Application uses a Sony IMX image processing sensor attached to the board and can stream video at 10 Gigabits per second from the 10 Gb SFP+ connector. All video streaming at this incredibly high bitrate is handled by the K26's FPGA, leaving the rest of the SoM available to process other tasks.

Meanwhile, the ROS 2 Perception Node Accelerated Application needs the ROS 2 Camera Module, which can be setup in a variety of ways. One of the more popular methods for creating a ROS 2 camera is by using a Raspberry Pi's camera and running ROS 2 on the Pi itself. This eye into the world lets a node see what a robot is doing, and process the incoming video stream in real-time. The KR260 running this app can then broadcast what it sees to other nodes, and those nodes can then interpret the incoming data and figure out what they need to do to adjust to an unforeseen circumstance. 

gazebo simulation
In Gazebo, we can simulate a high-speed camera for perception nodes

We could test out the Perception Node application thanks to a simulation we can run in Gazebo on a PC running Ubuntu Linux. It took a little setup, since Gazebo wasn't installed, but a semi-static scene was already configured and available for download from AMD Xilinx. In the photo above, the cube orbits a center high above the checkerboard pattern, and the Perception Node application can then see what's there and interpret it, which we can observe in RQt, which is part of ROS 2, in the window below Gazebo.

perception node demo

Because the demo is pretty simple, there's not much to see other than the perceived (virtual) camera image picked up by the FPGA in the K26 SoM that's the beating heart of the KR260 Robotics Starter Kit.  

KR260 Robotics Starter Kit Takeaways

While this is a hands-on article evaluating the KR260 Robotics Starter Kit, we shouldn't consider it a proper review. To do that right would require integrating the KR260 into a project, either production or for testing, and evaluate the experience. That requires designing and building a robot, and that's just beyond the scope of this piece. However, we've been able to wrap our heads around the design goals that AMD Xilinx set out to achieve, and we can evaluate what it's like for a relative novice to dip their toes into robotics using the KR260 Robotics Starter Kit.

First of all, the KR260 is an affordable bridge between technologies. Its Industrial Ethernet ports are a look to the cutting edge of industrial inter-component communication. However, the presence of RS485 Pmod headers allow the K26 to look at existing legacy hardware to continue its useful life for the foreseeable future. 

kr260 mounted 3d printed shell

Next, the K26 SoM has a powerful, energy efficient FPGA component that accelerates all kinds of monitoring and processing tasks without bogging down the main CPU. That allows the KR260 to communicate with other parts of a robotics network easily and efficiently. The TSN demo application was quick to help multiple nodes sync up, making it a valuable head start on designing a new factory or upgrading existing facilities and know that those nodes will have no problems talking to one another.

Finally, the KR260 Robotics Starter Kit is an affordable, open platform. AMD Xilinx makes its Vitis development environment free to use and the hardware itself is affordable on a per-node basis. This kit costs $349 direct from Xilinx. It'll take a few nodes to develop a network, and no doubt that hardware costs will start to scale as more and more nodes make their way into production, but an affordable robotic brain allows designers to focus their budgets elsewhere, like the robots themselves.

If you're new to robotics, it's hard to imagine a better entry point than what AMD Xilinx has provided here.

Related content