UFACTORY Studio simulation

A way to run UFACTORY Studio simulation on your computer without a real robot.

1.Get the docker image

docker pull danielwang123321/uf-ubuntu-docker

2.Create and run container

Recommend, include web simulation and SDK ports

docker run -it --name uf_software -p 18333:18333 -p 502:502 -p 503:503 -p 504:504 -p 30000:30000 -p 30001:30001 -p 30002:30002 -p 30003:30003 danielwang123321/uf-ubuntu-docker

Not recommend, only use UFACTORY Studio web simulation

docker run -it --name uf_software -p 18333:18333 danielwang123321/uf-ubuntu-docker

3.Run the xArm robot firmware and UFACTORY Studio

For example, start the UFACTORY Studio and firmware of xArm 6.

/xarm_scripts/xarm_start.sh 6 6

The 6 6 means xArm 6, change it accordingly if you prefer other robots:

5 5, xArm 5
6 6, xArm 6
7 7, xArm 7
6 9, Lite 6
6 12, 850

4.Access the UFACTORY Studio web simulation

Run a web browser and input 127.0.0.1:18333 or locathost:18333
If there is a prompt of “Unable to get robot SN …” comes out on the web simulation page, click “Close" and then you can use the web simulation.

5. Connect the simulator and running codes on your host machine.

If you need connect the simulated robot and run your codes in your host computer, for example running your python codes, change the IP address to 127.0.0.1 and run.

6 Run the “Blockly-to-Python” codes with external IDE like VSCode or Pycharm

In case you copy the “Blockly-to-Python” codes from the internal Python IDE and run in the external IDE like VSCode or Pycharm on your computer, make sure add “check_joint_limit=False” in the line of instantiation like this

arm = XArmAPI('127.0.0.1', baud_checkset=False, check_joint_limit=False)

Note:
1.Test under Ubuntu 24.04 x86-64 and Windows 11 x86-64
2.Some uesfull commands

  • Show the running container
  docker ps
  • Stop the running container
  docker stop <container ID or container name >
  • Start the container ''uf_software"
  docker start uf_software
  • Enter the shell of the container “uf_software”
  docker exec -it uf_software /bin/bash

Release notes

2025.2.5

  1. Add methoed of running “Blockly-to-Python” codes with external IDE like VSCode and Pycharm.
  2. Modify the commands for Linux Ubuntu 24.04 x86-64
1 Like

Hi Daniel

I tried your instructions, it’s very easy now, thanks a lot. However, I had to modify some parts to make it work.

First, when I created the container, I had to expose port 18333 like this:

docker run -it --name uf_software -p 18333:18333 danielwang123321/uf-ubuntu-docker

Lastly, even though the IP of the bot is the one you mention, I had to use http://localhost:18333 to access the simulator in my web browser


1 Like

Hi Fabian,
Did you use the Windows?
I did a test on Windows 10 and found it do requires to expose the port while creating the container.
The url on windows is 172.0.0.1:18333 after execute the below command and start the robot software.
docker run -it --name uf_software -p 18333:18333 danielwang123321/uf-ubuntu-docker
Let me modify the guidance.

Hi Daniel,

Yes, I use Windows 10

Hi Fabian,
Thanks for your feedback, I did update the guidance for Windows.
Please let me know if you have any questions.

Hello, I have the simulator up and running, thanks for making that possible. The sim is telling me that the contents of the friction file are invalid. Is there a way I can get around this?
image

Please provide more information

  1. The platform, windows or linux?
  2. The firmware/software version of the information page like that.
  3. Did you update the software/firmware?

Thanks for replying Daniel, I figured it out. I do not have an arm at the moment, I am only playing with the sim. I got around the alert to get the sim working.

Thank you for your feedback! We’re glad to hear that you managed to resolve the issue. The purpose of our simulation environment is precisely to support users who may not have access to a physical robot temporarily, allowing them to learn and develop in a virtual environment.

If you encounter any further issues while using the simulator, please don’t hesitate to reach out. We’re here to assist you!

Wishing you continued success with your projects! :blush:

Hi Daniel,

Thanks a lot for the input. I also managed to use the simulator for days. However, I found that, once I restarted my laptop, I couldn’t access the simulator but this can be solved by following the instructions again and removing the previous container.

This would cause some troubles because the scripts tried on the previous container would also disappear. Do you have advice on solving this?

Regards,
Lee

Thanks for the feedback.
Maybe the problem is after you restarting your computer, you craeted a new container insteat of starting the previouse container. Here is the normal steps to start the previouse contrainer on Winodws. Please give a try and let me know the result.

  1. Start the container by docker start command on your windows shell.
docker start uf_software
  1. Enter the shell of the container
docker exec -it uf_software /bin/bash
  1. Start the xArm 6 firmware and the ufactory studio on the shell of the container
/xarm_scripts/xarm_start.sh 6 6

Is it possible to connect to the simulated robot running in the Docker container via the UFactory XArm Python SDK? For example, if I want to write an example program with the Python SDK and run it on a simulated robot is it possible using this container?

I’m using the xArm Python SDK (v1.14.7) with a virtual robot that has an IP address but no serial number (SN). When calling set_servo_angle(), I get ValueError: invalid literal for int() with base 10: '' from xarm.py line 71 in _is_out_of_joint_range(). The function call flow is: set_servo_angle() → _set_servo_angle_absolute() → _is_out_of_joint_range(), where self.sn[2:6] is accessed but is empty, causing the error. Is there a way to use set_servo_angle() without requiring an SN in a virtual environment?

Yes, please check the guidance above and I just update it.

Yes, please check the step 6 of the guidance above, I just updated it.

Dear Daniel,

Amazing! It fully works with your new instructions.

Regards,
Lee

Great! Feel free to contact us if you have any questions.