Skip to content

Latest commit

 

History

History
153 lines (97 loc) · 5.57 KB

File metadata and controls

153 lines (97 loc) · 5.57 KB

PC setup with ROS 2

The commissioning PC host runs a Dockerized ROS 2 environment to communicate with the ctrlX CORE.

1. Prerequisites

1.1 Clone this repository

git clone https://github.com/b-robotized/b_ctrldbox_commissioning.git
cd b_ctrldbox_commissioning

1.2 Install Docker Desktop

Docker desktop is required to run the container and set up networking via docker compose command. Refer to this documentation for instructions.

1.3 Network Configuration:

Zenoh:


b-controlled box uses zenoh as the middleware of choice due problems which DDS introduces with UDP multicast for discovery and transport, as well as its opaque and arcane configuration options.

We encourage you to try out zenoh for your workspace. To easily transition to zenoh, check out our zenoh setup guide.

FastRTPS:


Configure a static IP address on your PC's port connected to CtrlX XF10 port to 192.168.28.201 with netmask 255.255.255.0.

IMPORTANT: ROS 2 DDS on the b-controlled box is configured to see only IP addresses 192.168.28.201 (for the dev PC) and 192.168.28.202 (for the commissioning Docker container).

for example, if these are the default and recommended IPs in the system:

  • CtrlX CORE: 192.168.28.7
  • ROS 2 PC: 192.168.28.201
  • commissioning Docker container: 192.168.28.202

.. then these are ROS_STATIC_PEERS env variables:

  • CtrlX CORE: 192.168.28.201, 192.168.28.202
  • commissioning Docker container: 192.168.28.7

depending on which participant the actor expects to see.

Verify you can ping the ctrlX controller at its IP address from the docker container.

1.4 Set up date-and-time NTP server

To make sure the Date and Time are synchronized between the commissioning container and the CtrlX, navigate to Settings -> Date and Time and connect to the NTP server.

IMPORTANT: The commissioning container must be running for NTP server connection to succeed.

Enter the IP address of the commissioning container (192.168.28.202) and test the connection. If it succeeds, click "Save"

If encountering NTP connection issues, refer to NTP server setup instructions for more details.

date-and-time

1.5 Environment Configuration:

The repo contains an example .env file called comissioning.env.example which must be configured with your host information for the container to properly run

cp comissioning.env.example commissioning.env
  • ROBOT_TYPE: Set to your robot model (e.g., kuka). Supported: ur, kuka, kassow, pssbl, dobot, fanuc.

  • VERSION_TAG: Image version tag. Should match your b-controlled-box app version (e.g., 1.6.x).

  • HOST_NETWORK_INTERFACE: The name of the network interface on your PC connected to the ctrlX device (e.g., eth0). Use ip addr or ifconfig to find it.

  • CONTAINER_MACVLAN_IP: The static IP for the Docker container. Set it to 192.168.28.202.

For a full reference of all configuration variables (including private registry support), see RUNNING_CONTAINERS.md.

1.6 Make scripts executable:

Make the start/enter/stop bash scripts executable:

chmod +x start.sh enter.sh stop.sh

2. Usage

2.1 Start the container: start.sh

Upon first start, the container image will be automatically pulled from the public container registry. On subsequent starts, the locally cached image is used.

./start.sh

2.2 Access the container shell: enter.sh

To access the container from other terminals, run:

./enter.sh

When entering the container, the ROS 2 environment will automatically be sourced. You can immediately run ros2 commands.

You can open multiple terminals into the same container by running ./enter.sh from separate terminal windows.

2.3 Verify container network:

Inside the container, run a quick ping to make sure it can see the ctrlX CORE:

ping 192.168.28.7

2.5 Configuring ros2_control controllers

For ros2_control, it is necessary to configure the names and types of controllers we use.

In CtrlX UI, Navigate to app data, and open it in file view:

app-data

Open b-controlled-box directory and open scenario_controllers.yaml

scenario-controllers

In the commissioning container, navigate to b_ctrldbox_commissioning/scripts directory, and copy the contents of scenario_controllers.yaml there to the scenario_controllers.yaml on CtrlX.

Click SAVE and you're ready to spawn the controllers!

2.6 Launch the robot commands

To run scenario commands from the container, refer to the LAUNCH.md file in the corresponding workspaces/<robot>/ directory.

2.7 Stop the container: stop.sh

When you are finished, exit the container:

exit

and run this from the host machine, not the container.

./stop.sh

Further Reading

Topic Document
Detailed container workflows (private images, custom builds, troubleshooting) RUNNING_CONTAINERS.md
Building your own containers, next steps after commissioning FAQ_NEXT_STEPS.md
ctrlX CORE device setup SETUP_CTRLX.md
Zenoh middleware configuration SETUP_ZENOH.md
NTP server setup SETUP_NTP_SERVER.md