-
Notifications
You must be signed in to change notification settings - Fork 409
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unstable connection to URSim #367
Comments
You are trying to run a system with real-time requirements inside multiple VMs. With this kind of setup I would expect things like that happening. The The ros driver itself also has realtime requirements which it probably won't meet inside the VM. Ontop of that we have the network connection between the two VMs which is probably not really optimized for fast response times. All those problems seem to sum up into a non-working system in your case. I know there have been people using such a kind of setup for testing purposes, but for me this is out of scope to answer, I'm afraid. |
Is there any way to improve stability? Installing a RT kernel on the VM? I'd like to avoid running natively or relying on Gazebo @fmauch Just to clarify, I'm running a single VM only. URSim is installed directly in the VM |
Ah, I misunderstood that. So, you have a native URSim inside the same container as your ROS environment. This should in theory workout. How about resource restrictions? Is your machine anywhere near maximum load when executing this? |
The VMs resource usage is max 80% of CPU, RAM 40% while planning and executing an rviz moveit trajectory |
I don't believe |
To my knowledge 0.0.0.0 is used when opening ports to say that connections from any interface are allowed. In that particular setup I am not sure how it should be configured correctly. I guess, URSim opens the necessary ports without any IP range restriction, so passing What does |
There is a difference between passing a hostname/IP address to functions like The latter is what's happening in the driver. The correct IP to use when using ursim would be the IP address of the machine running URSim.
URSim does not show valid IP addresses most of the time in the dialog you show @ljden. that dialog works on the real controller, but it doesn't have the required infrastructure on a URSim setup to work correctly. For all intents and purposes, you can't really use that dialog for anything. Edit: if the driver and URSim are running on the same machine, Edit 2: and apparently, when passing However, I would strongly recommend not doing that, as it's uncommon and |
|
Ah makes sense
Gotcha, duly noted. Running with
Edit: as expected, running the driver with the VM ip (192.168.8.136) has same behaviour. |
That would have been my question, whether connection is established over the VM interface (and therefore might get routet through the host) or the loopback interface |
The VM network is currently set to bridged adapter (so I can access real HW), would NAT be any better/worse for Sim only testing? |
It should not matter. Personally I would probably check a few things:
And:
that seems pretty high to me actually. On a typical system, |
I was doing a fresh install of the VM, and with a clearer head attempted to solve my networking issues. Looks like it may have been in part the fault of URSim and the net-statistics script that was invalid for Ubuntu 18.04 (see commit for details. I managed to set a consistent static IP (while maintaining an internet connection) for the VM and URSim picks up this IP (likely from the net-statistics script). Running URSim with ROS UR Driver + moveit config planner + rvis ran smoothly with no comms issues. I may have done something slightly differently elsewhere but the major change was having the net-statistics script running correctly, so I suspect it was a URSim side issue. As such closing off the issue, thanks heaps for you help @gavanderhoorn @fmauch! |
Well... I went back just now to check how much of the resource usage was URSim taking as I suspect it is the main user, and lo and behold the same errors of re your question @gavanderhoorn ursim prints an error message about RobotStat messages being queued up:
Each time that error message is printed, ROS is also printing it's error messages |
|
I'm not sure why you (and the author of the guide you link to) find that dialog so important. You're using a simulated environment, why care about what that dialog tells you?
Unless something has changed recently (other than requiring an account to be able to download it .. 😞), |
To be honest, mostly due to not having a solid grasp of what is and isn't required and the fact that I am having network/stability issues. |
Anything is possible (as this is software), but unless you've specifically configured your network to work that way (and your VM is using that configuration as well), I'd assume all traffic destined for local hosts (note I'm not writing And "ROS" is not really involved here. The connection is made between It'd still be interesting to see a wireshark capture, to see which side (tries to) tear(s) down the connection, causing these reconnection log messages. It'd also be interesting to know whether other versions of ursim exhibit the same symptom. Does a regular simulated CB3 (so not e-Series) also disconnect and reconnect all the time for instance? |
It's been a while since I used wireshark, can I get a tldr of what commands to run/what to look for? Haven't tested any other versions of URSim or robot series. |
All in your VM:
now start wireshark. start a capture on the run what you normally run (start the driver, etc). stop the capture and save it. Compress and attach it to the issue here. |
Cheers. I have a longer capture if you need more but I assume this should be heaps. |
The capture shows a lot of spurious retransmissions in bursts of a couple hundred packets each time. This could indicate thread starvation of some sort in the driver. If you can, try configuring ursim for a regular CB3 controller instead of the e-Series one, as that will run at 125 Hz instead of 500 Hz. It could be the VM is just too resource constraint for the driver to be able to properly process all the incoming traffic at 500 Hz. |
I think it is network related as the connection runs stably if the VM is not connected to the network, with no other changes. Can't spend the time testing a CB3 controller at this point. Installing a new version of URSim would be an hour or so of work as it must be installed prior to ROS (dependencies... ) so I would have to create a new VM instance and get it all set up with the Sim then ROS. Plus we have e-series hardware so we need the VM to be the same. Appreciate the help though. |
This issue has not been updated for a long time. If no further updates are added, this will be closed automatically. Comment on the issue to prevent automatic closing. |
This issue has been closed due to inactivity. Feel free to comment or reopen if this is still relevant. |
Summary
Running ROS and URSim within a VM has unstable connection
Versions
Impact
Stability of ROS Driver to URSim connection
Issue details
Running on clean install on Ubuntu 18.04 VM
Installed URSim Polyscope 5.10 within VM
Installed ros Melodic
Installed UR ROS Driver as per README instructions. (Including fmauch/universal_robot).
Change
ROS_WS/src/fmauch_universal_robot/ur5_e_moveit_config/config/controllers.yaml
line 3action_ns: follow_joint_trajectory
->action_ns: /scaled_pos_joint_traj_controller/follow_joint_trajectory
(#55 comment)Load URCap
externalcontrol-1.0.5.urcap
and set vm IP (from ifconfig)Get IP from Polyscope settings (NB: 0.0.0.0)
Run:
✅ Can plan and execute motion in rviz and move robot in URSim
❌ Drops connection frequently and errors occur
Actual Behavior
If you need any other logging info let me know
The text was updated successfully, but these errors were encountered: