We here at Hirebotics use a lot of tools to make sure that we are producing the best quality code we can to run on our robotic workers. We have been working for a while now on a suite of tools that allow us to quickly produce, test and distribute code to our robots. As of today, these tools are now being open-sourced and are available for anyone to use. To find out more visit the project at GitHub - Hirebotics/urscript-tools
One of the really cool tools we just recently developed is the ability to run a single script file without needing to load it onto a simulator or actual robot. Just using the terminal on your computer or the integrated terminal in your IDE you can now execute script files locally. This is great for finding out what a function does or even simply testing to make sure that the file compiles before moving it to the robot.
We look forward to hearing from the community about this project and how it helps you develop better robot code faster.
ERROR - Runtime error (0:0): Runtime error: Unknown / unexpected error in the program:
“Unknown server error”
Running on MacOS for now. Will try to run a docker in a docker once I get everything working correctly on my laptop. I run the simulator and build our urcap in a docker image.
Hmm, if you want to put a simple test case up in a repo where I can get access to it I can take a look at your configuration and let you know if I can see any issues. If not, I can send it over to our software team that wrote the test engine and have them look at it as well. We use this daily in development and once configured correctly haven’t had any issues. We run both locally on our Macbooks as well as in our CI process in a docker container.
Yes, we built a mock RPC server and then use a package that starts that server then runs the tests against the server. We are using this package from NPM https://www.npmjs.com/package/start-server-and-test
So we have a function that gets called within the tests that want to use the RPC server where they will connect to the RPC server. You should have access to a global variable called TEST_HOST that is initialized with the correct IP address of the docker server. In our function that initializes the cloud, we take host as an argument and build the RPC factory call using string concat.
def initializeRPC(host):
local xmlIPAddr = str_cat("http://", str_cat(host, ":9999/RPC2"))
textmsg("XML ADDR: ", xmlIPAddr)
global rpc = rpc_factory("xmlrpc", xmlIPAddr)
end
In our e2e test framework that uses the RPC calls we call this iniatilize RPC function and pass it the global variable TEST_HOST
For instance
def test_loadScratchPad():
initializeRPC(TEST_HOST)
assertEqual(
name = "Load scratchpad",
result = rpc.loadScratchPad(to_str(ID)),
expected = ID
)
end
Yes because we are running a mock server, not the actual production server. This way we can load mock data for consumption by the programs and we also have additional RPC calls that are only used by the test suite that do not need to be in production.
If you need to run the server outside of docket you will need to give your docker the ability to access servers outside of its environment. I believe this is done in the docker compose file
hi@mbush
When I use Winsocket to communicate, I use socket_send_string() to send the force value information of the robot on the robot side and RECV to receive it on the PC side. May I ask how I can transcode the data for my use?
Could you provide the UR5e 30003 port data mapping table?
Looking forword to your reply!
Thanks.