Component Types and Implementations

Hi, I am working through the Tangram Maker tutorials and I am on Part 3: Visualizing a Component Based System Design. I have created the first component in the “My Workspace.First System Design”. Specifically created the UAV Navigation.First System Design. I understand that “UAV Navigation” is the component type. But, am I able to call the component type anything I want? It looked like we just typed in free text. Then same goes for the implementation. I just types in “First System Design”. I read the tutorial and I see the building analogy. The type is the outside of the building and the implementation is what is inside. And I see then where we created messages. But, is there something unique to the UAV Navigation component that I created? What if I called it something different? How do I know what a Navigation system does, did creating the component really create a navigation system? And if so, then what type of navigation system did I implement? And why is the navigation system sending an AirVehicleState message? Did I really create that message as well? I probably have some conceptual errors, but not sure I understand how I created a UAV Navigation. Thanks in advance!

Hi Mark,

To perhaps answer the overall question first: no, you didn’t create a UAV navigation component. At least, not yet. What Tangram Pro provides is a way to organize and connect your own code together, as well as a way to visualize that. What you created was a component which could become a UAV navigation system, though!

The tutorials show you how you could build a notional component system in Tangram Pro. In this imaginary system, we have a hardware/software piece which handles UAV navigation, and it requires an AirVehicleState message to operate. This is just a simple example, and doesn’t necessarily correspond to anything in the real world! Maybe you’re a UAV developer yourself, and happen to know that your own navigation system requires 15 completely different messages! The Tangram platform tool isn’t meant to provide functional, out-of-the-box implementations for any system, be that a UAV or anything else. It’s purpose is to help you design your own systems.

So what you created was a box (which you can name anything you want), and an interface for the box, which dictates how that box talks to other boxes. But the box is still empty, and waiting for you to plug in your own code to make it run. In the tutorial component, you would need to add your own UAV Navigation code which uses the AirVehicleState message in order for the design to actually mean anything.

But you did specify the AirVehicleState message in the component interface, and so Tangram Pro does in fact know what that looks like. If you continue on to Part 4 of the tutorial, you’ll learn how to generate the interface code that corresponds to that message. If you were actually building the example system, you’d be able to use the generated AirVehicleState classes and functions to implement your UAV Navigation code, rather than having to write all of the message code yourself.

Hope that helps conceptualize what components mean in Tangram!

1 Like

Thanks @brandon.henry! This helps a lot. Will continue with the tutorials. I understand the city buildings (boxes) much better now. So one other question(s). You said I could either plug in my own code to the “box” that is the “UAV Navigation Component” or use the generated classes and functions to implement my UAV Navigation Code. I will continue with the Tutorials now as maybe they answer the following questions. But, how would I plug in my own code to the box? Is there some “box” api that I need to have my code connect to? Or if I haven’t created my own code yet, do I use the generated classes and functions you describe within my own code? Are there any examples I can look at to understand? Thanks again, though, this helps a ton in getting started on what I am trying to do!

If you already have your code written for the component and have it stored in a git repository in a service like GitHub, GitLab, or BitBucket, then you can pull that code into your workspace component by linking the repository from the left-hand toolbar in the workspace view. You’ll need to link the remote service to Tangram Pro first, which the platform will direct you to do if you haven’t already.

Whether you’ve already written the main logic of your UAV component or not, you’ll that code to use the message code & APIs generated by the Tangram workflow, which will require some editing. The OMS message set contains some built-in tests and examples if you generate one of its messages, but there currently aren’t similar public examples for LMCP yet. There are however some internal Tangram repositories with examples, which we can direct you to via DM or email.

1 Like

Got it, thanks! This will keep me going.