Hello,
I am unable to run the externalcontrol urcap on the teach pendant in a docker container created from the universalrobots/ursim_e-series image. I get a “connect timed out” error message. I am running the ursim in one docker container, and have ros humble running on ubuntu 22.04 in another docker container on the same bridge network.
Here are my steps outlined below for repeatability:
On my host machine (windows 11), I open the command prompt.
# [cmd] create user-defined bridge network
docker network create --subnet 192.168.1.0/24 urnet
# [cmd] after downloading externalcontrol-1.0.5.jar to .\urcaps, start the ursim in new container
docker run -it --network urnet --name ursim -e ROBOT_MODEL=UR3 -p 6080:6080 -v .\urcaps:/urcaps/ universalrobots/ursim_e-series
I navigate to http://localhost:6080/vnc.html in my web browser and connect to the teach pendant. Then, I power on the robot.
Now, in a new command prompt, I start up another docker container and install the ros-humble-ur
driver. The -e DISPLAY=host.docker.internal:0.0
just allows me to see the RViz window using the free XLaunch program.
# [cmd] start docker container with ros2:humble installed
docker run -it --network urnet --name ros_container -e DISPLAY=host.docker.internal:0.0 osrf/ros:humble-desktop-full
# [ros_container] install ros-humble-ur driver
apt-get update && apt-get install -y ros-humble-ur
# [ros_container] source ros2
source /opt/ros/humble/setup.bash
In a new command prompt, I check the IP addresses of my docker containers
# [cmd] get IP addresses of docker containers
docker network inspect urnet
# output
... {"Name": "ursim", "IPv4Address": "192.168.1.3/24",},
... {"Name", "ros_container", "IPv4Address": "192.168.1.2/24"}
Then I launch the ur_robot_driver.
# {ros_container} launch the ur_robot_driver
ros2 launch ur_robot_driver ur_control.launch.py ur_type:=ur3e robot_ip:=192.168.1.3 use_fake_hardware:=true launch_rviz:=true
At this point, RViz is open and I can visually inspect that the ur3e arm is in the in the home position (arm raised straight up in the air).
Now I open another terminal to ros_container
and then run the ur_robot_driver
to make the robot move in RViz.
# [cmd] get access to ros_container terminal
docker exec -it ros_container bash
# [ros_container] source ros2
source /opt/ros/humble/setup.bash
# [ros_container] make the robot move
ros2 launch ur_robot_driver test_scaled_joint_trajectory_controller.launch.py
At this point, the robot is moving in RViz. However, when the robot is not moving on the teaching pendant. Additionally, when I configure the urcap in the installation menu (setting the IP address of remote PC to 192.168.56.2), insert the External Control programming node and hit run, I get a “connect timed out” error message.
I have two questions:
- How do I use the externalcontrol urcap on the simulator?
- Can I run a program from the simulator and make the robot movements appear in RViz?
Thank you,
Logan Dihel
PhD Student
Purdue University