# LeoRover Real Robot Connection issue

**URL:** <https://get-help.theconstruct.ai/t/leorover-real-robot-connection-issue/30143>\
**Category:** General Support\
**Created:** [April 23, 2024, 8:40am UTC](https://get-help.theconstruct.ai/t/leorover-real-robot-connection-issue/30143 "2024-04-23T08:40:27Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![loickchovet](https://get-help.theconstruct.ai/letter_avatar_proxy/v4/letter/l/7bcc69/32.png) [@loickchovet](https://get-help.theconstruct.ai/u/loickchovet)\
**Post date:** [April 23, 2024, 8:40am UTC](https://get-help.theconstruct.ai/t/leorover-real-robot-connection-issue/30143/1 "2024-04-23T08:40:27Z")

</div>

Greetings,

I am currently trying to connect a LeoRover to the construct development environment.  
I managed to follow every step and have the robot connected to the development environment.  
If I open a terminal and launch anything, I will be able to see it on the website and a local terminal.

**However** everything that is autonomously launched is not visible on a local terminal or the web interface, so the firmware running on the leocore board and communicating thanks to microros but also the camera feed. Noticably, these remains visible from any remote computer locally connected to the leorover.

Would you have any clue to guide us ?

It seems that the husarnet do not account for whats already running.

Thanks

---

<div class="post-metadata">

**Author:** ![bayodesegun](https://get-help.theconstruct.ai/user_avatar/get-help.theconstruct.ai/bayodesegun/32/10684_2.png) [@bayodesegun](https://get-help.theconstruct.ai/u/bayodesegun)\
**Post date:** [April 23, 2024, 1:16pm UTC](https://get-help.theconstruct.ai/t/leorover-real-robot-connection-issue/30143/2 "2024-04-23T13:16:43Z")

</div>

@loickchovet  
Greetings!

> [@loickchovet](#):
>
> If I open a terminal and launch anything, I will be able to see it on the website and a local terminal.

This statement seems to negate what the next paragraph began to say.

> [@loickchovet](#):
>
> **However** everything that is autonomously launched is not visible on a local terminal or the web interface,

I’m struggling to understand the problem here. In sure you understand what you are saying and the terminology, but it seems you are assuming that we have the same understanding. Please define:

- the local terminal
- the web interface, and
- the website

Please also clarify “autonomously launched” vs “if I open a terminal and launch anything”.

Some images will also help here.

> [@loickchovet](#):
>
> so the firmware running on the leocore board and communicating thanks to microros but also the camera feed. Noticably, these remains visible from any remote computer locally connected to the leorover.

For some reason, this seems to indicate that there is no problem! How is “any remote computer locally connected to the leorover” connected to it? Serial? USB? Network?

* * *

I hope you understand my point. Thanks in advance for your patience and clarifications!

---

<div class="post-metadata">

**Author:** ![loickchovet](https://get-help.theconstruct.ai/letter_avatar_proxy/v4/letter/l/7bcc69/32.png) [@loickchovet](https://get-help.theconstruct.ai/u/loickchovet)\
**Post date:** [April 23, 2024, 3:30pm UTC](https://get-help.theconstruct.ai/t/leorover-real-robot-connection-issue/30143/3 "2024-04-23T15:30:16Z")

</div>

So let me try to make things clearer. In my current settings I have :

→ A laptop

→ A leorover connected to internet

The laptop is connected to the access point created by the leorover.

→ The local terminal : A terminal directly running on the leorover by ssh on it

→ The web interface : The robot ignite academy robot, where I am supposed to be able to connect to real robots = the website

At boot the robot launches some process, for exemple the raspberry pi camera is published.  
There is also a uros agent publishing the topics related to the firmware of the robot (cmd\_vel and such).  
As I was saying, all of these topics are not visible if I do ros2 topic list on the “local terminal” neither on the website when connected to the robot.

However, if I do ros2 topic list from my laptop, I can see the topics.

I hope these clarifications will help you.

---

<div class="post-metadata">

**Author:** ![bayodesegun](https://get-help.theconstruct.ai/user_avatar/get-help.theconstruct.ai/bayodesegun/32/10684_2.png) [@bayodesegun](https://get-help.theconstruct.ai/u/bayodesegun)\
**Post date:** [April 24, 2024, 9:51am UTC](https://get-help.theconstruct.ai/t/leorover-real-robot-connection-issue/30143/4 "2024-04-24T09:51:13Z")

</div>

Thanks for the clarification. Here I’m assuming that you have completely configured the robot by running the setup command given, similar to the one below:

![image](https://get-help.theconstruct.ai/uploads/default/original/2X/7/7d814b4a06b92d95762c17fc2c9eec8d07d70959.png)

If so, this looks like a Leo Rover config, and not what we can fix from here. I think this is the key to this issue:

> [@loickchovet](#):
>
> all of these topics are not visible if I do ros2 topic list on the “local terminal”

I would expect the topics to be available on the SSH terminal. If not, it’s not likely to be available on The Construct either.

Things you could check:

- Are you able to access the topics of the robot without anything (PC or The Construct) connected, via the local terminal?
  - Is this something the Leo Rover supports?

- Is the “access point mode” blocking access via the local terminal (and The Construct). Perhaps there are different connection modes that do not work simultaneously.

---

<div class="post-metadata">

**Author:** ![loickchovet](https://get-help.theconstruct.ai/letter_avatar_proxy/v4/letter/l/7bcc69/32.png) [@loickchovet](https://get-help.theconstruct.ai/u/loickchovet)\
**Post date:** [April 24, 2024, 12:45pm UTC](https://get-help.theconstruct.ai/t/leorover-real-robot-connection-issue/30143/5 "2024-04-24T12:45:09Z")

</div>

Well before executing the command on the robot, it was working perfectly. And I tried removing everything using the rll\_uninstall command, and it works perfectly again.  
But as soon as we install everything using the command you showed, it produces the behaviour detailed above.

Well, I do no think there is any conflict between the access point mode (which is the default behaviour) and the local terminal, because as explained before, if I ssh to the robot and publish something there, it become visible on The Construct.

To answer your suggestions :

> Are you able to access the topics of the robot without anything (PC or The Construct) connected, via the local terminal?

We cannot really access the local terminal because it would mean opening the whole robot and pulling a cable, but, **if the construct script is installed** , the local terminal do not see anything, **if not** , the local terminal view topics such as /leo/camera or cmd\_vel

---

<div class="post-metadata">

**Author:** ![bayodesegun](https://get-help.theconstruct.ai/user_avatar/get-help.theconstruct.ai/bayodesegun/32/10684_2.png) [@bayodesegun](https://get-help.theconstruct.ai/u/bayodesegun)\
**Post date:** [April 25, 2024, 9:27am UTC](https://get-help.theconstruct.ai/t/leorover-real-robot-connection-issue/30143/6 "2024-04-25T09:27:44Z")

</div>

Thank you for providing the clarifications. Let me refer this to one of our experts in this area.

---

<div class="post-metadata">

**Author:** ![ralves](https://get-help.theconstruct.ai/user_avatar/get-help.theconstruct.ai/ralves/32/7039_2.png) [@ralves](https://get-help.theconstruct.ai/u/ralves)\
**Post date:** [April 25, 2024, 12:19pm UTC](https://get-help.theconstruct.ai/t/leorover-real-robot-connection-issue/30143/7 "2024-04-25T12:19:15Z")

</div>

Hi @loickchovet,

When the script for setting up a remote connection to the robot is executed, in addition to installing Husarnet, the script adds some variable exports on **~/.bashrc** , which are:

```auto
export ROS_IPV6=on
export ROS_MASTER_URI=http://master:11311
export ROS_HOSTNAME=master

export RMW_IMPLEMENTATION=rmw_cyclonedds_cpp
export CYCLONEDDS_URI=file:///var/lib/theconstruct.rrl/cyclonedds.xml
export FASTRTPS_DEFAULT_PROFILES_FILE=/var/lib/theconstruct.rrl/fastdds_husarnet.xml

```

The first 3 variables are related to ROS1, and the 3 last variables are related to ROS2.

You said that when you launch something manually on the robot, you are able to see it from The Construct.

This makes sense, because after running that script, the next time that you connect to the robot, the `~/.bashrc` file is sourced automatically, so ROS2 considers those variables, and any ROS2 node launched after the automatic source of `~/.bashrc` can be seen on The Construct.

The reason why you cannot see the topics launched automatically when the robot boots up is that the script launched on boot is **NOT** sourcing `~/.bashrc`.

I don’t own a Leo Rover, so I don’t know exactly what is the name of the script used for launching everything on boot. Using the `ps faux` command, you can see the processes tree, and you will probably find the script that is responsible for launching the ROS nodes.

You just have to modify that script to export the Cyclone-related variables before launching any node. The Cyclone variables are the ones I mentioned earlier:

```auto
export RMW_IMPLEMENTATION=rmw_cyclonedds_cpp
export CYCLONEDDS_URI=file:///var/lib/theconstruct.rrl/cyclonedds.xml

```

After that, you have to relaunch the automatically-launched nodes (maybe restarting Leo Rover).

To give you more context, the _ **cyclonedds.xml** _ file tells ROS2 where to find nodes connected to the same Husarnet network. Husarnet is the tool we use to establish the connection between The Construct and your robot.

After exporting the variables aforementioned, and restarting the nodes, please let us know if you still have any other problems.

---

<div class="post-metadata">

**Author:** ![ralves](https://get-help.theconstruct.ai/user_avatar/get-help.theconstruct.ai/ralves/32/7039_2.png) [@ralves](https://get-help.theconstruct.ai/u/ralves)\
**Post date:** [April 25, 2024, 12:24pm UTC](https://get-help.theconstruct.ai/t/leorover-real-robot-connection-issue/30143/8 "2024-04-25T12:24:59Z")

</div>

Hi again, @loickchovet ,

I told you to add Cyclone-related variables because I assumed that you are using ROS2.

But if your robot is using ROS1, you have to add the ROS1-related variables to the script responsible for launching everything, which are:

```auto
export ROS_IPV6=on
export ROS_MASTER_URI=http://master:11311
export ROS_HOSTNAME=master

```

Or if you prefer, just add all variables that The Construct’s script adds to `~/.bashrc`:

```auto
export ROS_IPV6=on
export ROS_MASTER_URI=http://master:11311
export ROS_HOSTNAME=master

export RMW_IMPLEMENTATION=rmw_cyclonedds_cpp
export CYCLONEDDS_URI=file:///var/lib/theconstruct.rrl/cyclonedds.xml
export FASTRTPS_DEFAULT_PROFILES_FILE=/var/lib/theconstruct.rrl/fastdds_husarnet.xml

```

---

<div class="post-metadata">

**Author:** ![system](https://get-help.theconstruct.ai/uploads/default/original/2X/9/9d3ce8305cc0d0d9b6e07d15767a6f245c526f1b.jpeg) [@system](https://get-help.theconstruct.ai/u/system)\
**Post date:** [May 5, 2024, 12:25pm UTC](https://get-help.theconstruct.ai/t/leorover-real-robot-connection-issue/30143/9 "2024-05-05T12:25:43Z")

</div>

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.

---

<div class="post-metadata">

**Author:** ![ralves](https://get-help.theconstruct.ai/user_avatar/get-help.theconstruct.ai/ralves/32/7039_2.png) [@ralves](https://get-help.theconstruct.ai/u/ralves)\
**Post date:** [May 7, 2024, 10:05am UTC](https://get-help.theconstruct.ai/t/leorover-real-robot-connection-issue/30143/10 "2024-05-07T10:05:53Z")

</div>



---

<div class="post-metadata">

**Author:** ![ralves](https://get-help.theconstruct.ai/user_avatar/get-help.theconstruct.ai/ralves/32/7039_2.png) [@ralves](https://get-help.theconstruct.ai/u/ralves)\
**Post date:** [May 9, 2024, 8:30pm UTC](https://get-help.theconstruct.ai/t/leorover-real-robot-connection-issue/30143/11 "2024-05-09T20:30:36Z")

</div>

Hi again, @loickchovet,

After talking to Gabriel it was found that the DDS connection really didn’t work.

I would suggest trying the connection using **Zenoh** then, to see if it works.

The 13 steps to test Zenoh are the following, to be followed in order, to make sure everything is correctly set:

1. Run on the robot the installation script provided by The Construct

2. Connect to the robot by pressing the Connect button.

3. Make sure you can ping the robot, using either “`ping master`”, or “`ping leo01`”. (Assuming the robot name is **leo01**. You can check the robot name using “`cat /etc/hosts`” on the rosject after the connection is established. Try to ping the rosject from the robot also. Type “`hostname`” on the rosject to see the rosject hostname, to be able to ping it from the robot.

4. Install “`zenoh-bridge-ros2dds`” on the **ROSJECT** using the three commands below:

```auto
echo "deb [trusted=yes] https://download.eclipse.org/zenoh/debian-repo/ /" | sudo tee -a /etc/apt/sources.list > /dev/null  
 
sudo apt-get update 
 
sudo apt install -y zenoh-bridge-ros2dds

```

1. Install “`zenoh-bridge-ros2dds`” also on the **ROBOT** , using the same commands:

```auto
echo "deb [trusted=yes] https://download.eclipse.org/zenoh/debian-repo/ /" | sudo tee -a /etc/apt/sources.list > /dev/null  
 
sudo apt-get update 
 
sudo apt install -y zenoh-bridge-ros2dds

```

1. On the **ROSJECT** , check the hostname using the “`hostname`” command.

2. On the **ROBOT** , create a file named “`zenoh_leo.json`” with the following content:

```auto
{
  plugins: {
    ros2dds: {
      domain: 0,
      allow: {
        publishers: ["/chatter"],
        subscribers: [],
        service_servers: [],
        service_clients: [],
        action_servers: [],
        action_clients: [],
      },
    },
  },
  connect: {
    endpoints: [
      "tcp/2_xterm:7447",
    ]
  }
}

```

1. On the 4th last line of the “`zenoh_leo.json`” file aforementioned, replace **2\_xterm** with the hostname of the rosject retrieved on the 6th step.

2. Run the “`zenoh-bridge-ros2dds`” on the **ROBOT** using the following command:

```auto

zenoh-bridge-ros2dds -c zenoh_leo.json

```

1. Now, on the rosject, create a “`zenoh_rosject.json`” file with the following content:

```auto

{
  plugins: {
    ros2dds: {
      domain: 1,
      allow: {
        publishers: [],
        subscribers: ["/chatter"],
        service_servers: [],
        service_clients: [],
        action_servers: [],
        action_clients: [],
      },
    },
  },
  connect: {
    endpoints: [
      "tcp/master:7447",
    ]
  },
}

```

1. Run “`zenoh-bridge-ros2dds`” on the **ROSJECT** using the following command:

```auto

zenoh-bridge-ros2dds -c zenoh_rosject.json

```

1. Now, on the **ROBOT** , run the talker on domain 0:

```auto
ROS_DOMAIN_ID=0 ros2 run demo_nodes_cpp talker

```

1. Now, on the **ROSJECT** , run the listener on _ **DOMAIN 1** _ (_ **YES, DOMAIN 1** _. When using Zenoh, the domains have to be different to make sure the connection is through Zenoh and not through DDS).

```auto

ROS_DOMAIN_ID=1 ros2 run demo_nodes_cpp listener

```

Now, after a few seconds, you should see messages being printed on the **ROSJECT**. If you see the messages, it is proved that the connection works through **Zenoh but not through DDS**.

Can you tell us if the listener on the rosject is able to see the messages coming from the talker on the robot?
