Docker with static ip and outward connection

Hello I am trying to create a docker container that is able to commnunicate with a robotic arm through ethernet.
I have look at the networking documentation but aside from assigning an ip to the docker I have not been able to create a connection.

The docker container is run on an Nvidia Jetson AGV Xavier. An embedded device with ARM.

From what I understand I can assign the docker to an overlay network that I need to create first. These were the commands that I used:

sudo docker swarm init
sudo docker network create -d overlay --subnet=192.168.2.0/25 --aux-address="[MYNETWORK]=192.168.2.11" --attachable [MYNETWORK]
sudo docker run -it --net=[MYNETWORK] --ip=192.168.2.11 [MYDOCKER]

This runs the docker with an ip of 192.168.2.11 and I can confirm that it has an outgoing connection when I ping google.com for instance, however I am not able to ping my robot which is connected with ip 192.168.2.10 on a direct ethernet cable.

I am able to ping the robot when I place my windows system in the proper range.
What my question comes down to is:
Is the failing of the docker to ping the robot caused by something i misconfigured? Is it possible to connect docker to other device, feel a little stupid for asking this? Or should I look for the issue in my ubuntu system and have that in the same ip range also?

With kind regards