rcruzoliver_0-1721651806086.png

Kassow Robots - Command from ROS2

rcruzoliver
Long-established Member

The main goal of this How-to is to learn how to comission a Kassow Robot (KR) from ROS2, however we will first give a short overview about the Kassow Robot Cbun ecosystem. 

1. Understanding the Cbun modular ecosystem

KR underlaying OS is based on Ubuntu 18. As a base it provides controllers for the robot drivers and several functionalities that can be seamlessly used from the GUI to implement custom use cases. Please refer to the official documentation for more details about the built-in default functionalities. If you want to have access to such user manual do not hesitate to contact us via the email at the end of this post.

Although the built-in functionalities are enough for many applications, there are cases when the user wants to use functions or peripherials that are not supported by default. For this reason KR has developped the Cbun ecosystem, which allows users to enhance the robotic platforms with custom solutions. The Cbuns are classified in 3 main categories:

  • Device: it allows wrap handling code of some physical device (such as gripper, or sensor) into the CBun and hide it from the end user. This allows the user to simply control and monitor devices without the need to implement the communication and logic.
  • Command: it extends the set of built-in commands and therefore allow the user to build more sophisticated programs in more intuitive way. The user can drag&drop CBun commands into the Program Tree the same way like any other built-in command.
  • Application (CbunX): it provides a way to build frontends that interact in graphical way with the underlaying backend functions. The CbunX App can be developed in a similar manner to other Android applications.

With this modular approch, KR joins the automation industry lastest modularity trends, philosophy undoubtely shared with its brother ctrlX by the way.

If you want to know more about Cbuns and how you can pack your own solution, we point again to the official documentation. Please request access via the email at the end of the post!

2. ROS2 Cbun

Luckily for us, the KR team have developed a ROS2 Cbun that exposes many motion control functionalties to the ROS2 DDS (Data Distribution Service) communicatoin layer. The interface, which uses custom messages, is described here. To be able to install the KR custom messages in your ROS2 environament follow the instructions stated here

NOTE: The API has been successfully connected to ROS2 applications running on external devices, with the following OS + ROS2_DISTRO:

  • Ubuntu 18.04 + Dashing
  • Ubuntu 20.04 + Foxy
  • Ubuntu 22.04 + Humble (minor modifications in some service call, no definition change)

It is foreseen that it will not work on Iron onwards because there are substancial changes in the DDS communication architecture. If you need to use a newer distribution, please contact our team.

2.1. Cbun installation

The ROS2 Cbun installation file is already stored in your KR directly by the manufacturer. To install such Cbun and hence be able to profit from its functions you need to follow the following steps:

1. Open the CBun settings clickling as shown in the next picture.

Cbun menuCbun menu

2. Click on the ¨+¨ to open the Cbun file search as shown in the next picture.

Open Cbun searchOpen Cbun search

3. Search for the "ros2_interface".

"ros2_interface""ros2_interface"

4. Proceed with the installation.

ROS2 interface - Proceed with installationROS2 interface - Proceed with installation

2.2. Configure the EtherNet interface

Configure Ethernet interfaceConfigure Ethernet interface

NOTE: It is possible that the PROFINET interface is not disabled and continuous warnings/errors are poping up. We suggest disabling it if you want to command from ROS2 (which is using the EtherNet interface). Please refer to the official documentation for this, or contact our support.


2.3. Configure the external device

You need to configure the device in which the ROS2 application is running in the same subnet as the robot. In particular in this example:

ExampleExample

2.4. Configure the ROS2 Cbun

Once the external device is configured, it is time to configure the ROS2 Cbun.

First, we will need to "add a device". Go to "Workcell" on the left panel, then search for "Custom interfaces", and click on "Add device".

Add device menuAdd device menu

The following window will appear. Click first on "ROS2 Interface", and when the left menu appears, click on the "+" to add the "ROS2 Control" device.

Add device from the CbunAdd device from the Cbun

The screen will now display something like shown in the next image.

Setting up the connectionSetting up the connection

Set up the IP address of the external device, and then click activate. The Cbun will be only activated if the connection is successful.

NOTE: If the "DEVICE IP" is configured to localhost (127.0.0.1) or the robot IP, the Cbun will also succesfully activate, but of course it will not be available from the external device. Be careful with this information when troubleshooting.

If the connection is successful, it should look like this:

ROS2 successfully configuredROS2 successfully configured

2.5. Test the communication

Now, let's check if the ROS2 API is available in the external device.

First, inspect that the topic and services are available. Do not forget to source your ros2 distribution, so the ros2 command line is available.

Test the communicationTest the communication

If the topics and services are available, congratulations!, it is working.

You can try to publish some topic and see if the robot responds. For instance, in this example we will jog the joints.

Example: "jog the joints"Example: "jog the joints"

Remember, to be able to publish these custom messages you need to have built the custom interfaces described in here, and source the workspace in which inerfaces are built, so they are available from your console. 

3. Use case with ctrlX OS

In this section we will present a use case in which ctrlX OS is used to orchestrate an application involving the Kassow Robot and an external sensor or actuator. 

Use case with ctrlX OSUse case with ctrlX OS

For instance, we could deploy a ROS2 base application in ctrlX OS that interfaces with both the Kassow Robot Cbun and the ctrlX Datalayer. Thanks to the connection with the datalayer, any other application running in ctrlX could receive/sent information from/to the robot. The possibilities are endless!

NOTE: Although in this case we are deploying the master ROS2 application on ctrlX OS, it could be indeed running on any platform that supports ROS2 and a ethernet interface through which it will be connected to the KR.

3.1. Other ways to control KR 

The KR could also be controlled through a PROFINET interface. We welcome you to read this article that presents a tutorial about this topic. Likewise, you will find information about this in the official KR documentation.

4. Do you want to know more?

Do not hesitate to contact support@kassowrobots.com or simply leave a comment in this post.
We are looking forward to your advanced robotic applications on the Kassow Platform. 

rcruzoliver
rcruzoliver
Enhancing ctrlX platform with solutions. Everything can be snapcrafted! Robotics specialist, ask me anything about ROS2 and ctrlX OS.
Must Read
Icon--AD-black-48x48Icon--address-consumer-data-black-48x48Icon--appointment-black-48x48Icon--back-left-black-48x48Icon--calendar-black-48x48Icon--center-alignedIcon--Checkbox-checkIcon--clock-black-48x48Icon--close-black-48x48Icon--compare-black-48x48Icon--confirmation-black-48x48Icon--dealer-details-black-48x48Icon--delete-black-48x48Icon--delivery-black-48x48Icon--down-black-48x48Icon--download-black-48x48Ic-OverlayAlertIcon--externallink-black-48x48Icon-Filledforward-right_adjustedIcon--grid-view-black-48x48IC_gd_Check-Circle170821_Icons_Community170823_Bosch_Icons170823_Bosch_Icons170821_Icons_CommunityIC-logout170821_Icons_Community170825_Bosch_Icons170821_Icons_CommunityIC-shopping-cart2170821_Icons_CommunityIC-upIC_UserIcon--imageIcon--info-i-black-48x48Icon--left-alignedIcon--Less-minimize-black-48x48Icon-FilledIcon--List-Check-grennIcon--List-Check-blackIcon--List-Cross-blackIcon--list-view-mobile-black-48x48Icon--list-view-black-48x48Icon--More-Maximize-black-48x48Icon--my-product-black-48x48Icon--newsletter-black-48x48Icon--payment-black-48x48Icon--print-black-48x48Icon--promotion-black-48x48Icon--registration-black-48x48Icon--Reset-black-48x48Icon--right-alignedshare-circle1Icon--share-black-48x48Icon--shopping-bag-black-48x48Icon-shopping-cartIcon--start-play-black-48x48Icon--store-locator-black-48x48Ic-OverlayAlertIcon--summary-black-48x48tumblrIcon-FilledvineIc-OverlayAlertwhishlist