-
Notifications
You must be signed in to change notification settings - Fork 42
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
UR Reacher on UR e-series #42
Comments
Full error log: $ python ur5_reacher.py
WARN: gym.spaces.Box autodetected dtype as <class 'numpy.float32'>. Please provide explicit dtype.
WARN: gym.spaces.Box autodetected dtype as <class 'numpy.float32'>. Please provide explicit dtype.
0.009797096252441406: Hiccup of 1.80ms overhead between UR packets)
0.12884044647216797: Hiccup of 106.87ms overhead between UR packets)
timed out : Lost socket to UR, going into reconnect loop
2018-11-12 08:44:35.757849: I tensorflow/core/platform/cpu_feature_guard.cc:141] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA
Started plotting routine
0.8315298557281494: Hiccup of 689.29ms overhead between UR packets)
Init param sum -2.3423016
********** Iteration 0 ************
sampling
Resetting
Reset done
WARNING:root:Agent has over-run its allocated dt, it has been 0.050118446350097656 since the last observation, 0.010118446350097655 more than allowed
Process Process-2:
Traceback (most recent call last):
File "/usr/lib/python3.6/multiprocessing/process.py", line 258, in _bootstrap
self.run()
File "/usr/lib/python3.6/multiprocessing/process.py", line 93, in run
self._target(*self._args, **self._kwargs)
File "/home/nily/Projects/SenseAct/SenseAct/senseact/rtrl_base_env.py", line 480, in _run_loop_
self._action_to_actuator_()
File "/home/nily/Projects/SenseAct/SenseAct/senseact/rtrl_base_env.py", line 351, in _action_to_actuator_
self._compute_actuation_(action[0], timestamp, index)
File "/home/nily/Projects/SenseAct/SenseAct/senseact/envs/ur/reacher_env.py", line 505, in _compute_actuation_
self._handle_bounds_speedj()
File "/home/nily/Projects/SenseAct/SenseAct/senseact/envs/ur/reacher_env.py", line 643, in _handle_bounds_speedj
if not self.angle_return_point:
AttributeError: 'ReacherEnv' object has no attribute 'angle_return_point'
ERROR:root:One of the environment subprocess has died, closing all processes.
Traceback (most recent call last):
File "ur5_reacher.py", line 185, in <module>
main()
File "ur5_reacher.py", line 84, in main
callback=kindred_callback
File "/home/nily/Projects/SenseAct/lib/python3.6/site-packages/baselines/trpo_mpi/trpo_mpi.py", line 199, in learn
seg = seg_gen.__next__()
File "/home/nily/Projects/SenseAct/lib/python3.6/site-packages/baselines/trpo_mpi/trpo_mpi.py", line 56, in traj_segment_generator
ob, rew, new, _ = env.step(ac)
File "/home/nily/Projects/SenseAct/SenseAct/senseact/utils.py", line 150, in step
wrapped_step = self._wrapped_env.step(scaled_action)
File "/home/nily/Projects/SenseAct/SenseAct/senseact/rtrl_base_env.py", line 243, in step
self.act(action)
File "/home/nily/Projects/SenseAct/SenseAct/senseact/rtrl_base_env.py", line 235, in act
raise e
File "/home/nily/Projects/SenseAct/SenseAct/senseact/rtrl_base_env.py", line 232, in act
self._write_action(action)
File "/home/nily/Projects/SenseAct/SenseAct/senseact/rtrl_base_env.py", line 401, in _write_action
raise Exception("Environment has been shutdown due to subprocess error.")
Exception: Environment has been shutdown due to subprocess error.
Process Process-4:
Traceback (most recent call last):
File "/usr/lib/python3.6/multiprocessing/managers.py", line 749, in _callmethod
conn = self._tls.connection
AttributeError: 'ForkAwareLocal' object has no attribute 'connection'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3.6/multiprocessing/process.py", line 258, in _bootstrap
self.run()
File "/usr/lib/python3.6/multiprocessing/process.py", line 93, in run
self._target(*self._args, **self._kwargs)
File "ur5_reacher.py", line 125, in plot_ur5_reacher
old_size = len(shared_returns['episodic_returns'])
File "<string>", line 2, in __getitem__
File "/usr/lib/python3.6/multiprocessing/managers.py", line 753, in _callmethod
self._connect()
File "/usr/lib/python3.6/multiprocessing/managers.py", line 740, in _connect
conn = self._Client(self._token.address, authkey=self._authkey)
File "/usr/lib/python3.6/multiprocessing/connection.py", line 487, in Client
c = SocketClient(address)
File "/usr/lib/python3.6/multiprocessing/connection.py", line 614, in SocketClient
s.connect(address)
FileNotFoundError: [Errno 2] No such file or directory |
Update In the new e-series teach pendant it is required that "remote control" is enabled. To do so:
Then when you want to remote control the robot you should ensure that it is active by clicking at the teach pendant icon at the top right, and select "Remote Control". Now you can control the robot through TCP. |
This however is not the complete solution. Now the robot doesn't reset upon request. It continues to be in the speedj program on the UR controller all the time. |
Can you clarify on how you managed to get SenseAct working with the offline simulators? Thanks! I have URSim installed on Ubuntu 16.04, but I don't seem to be able to get it to enable networking in either Setup Robot > Setup Networking or Program Robot > Installation > Ethernet/IP. |
@fisherxue sorry for the long response time. Did you manage to native-install the UR offline simulator in Ubuntu? Then you installed the oldest version of Java on the planet (or close to v.1.6)? I'd not recommend to do that, but rather use their VM, despite the overhead. I currently don't have a complete guide for setting up the simulators, but I'll try to outline what I did (I'll try to verify it later and come back to you):
Docker: If you're using Docker then (I've been told that) you shouldn't run VM on the same machine as the machine you run Docker on. |
@nily-dti |
Frankly, I don’t remember. I’m pretty sure that I had both my PCs on our Ethernet network, where one of them ran our docker implementation of SenseAct and the other ran the URSim in VirtualBox. Then, in VirtualBox the network was set to bridge adapter to the eth0 interface. I’ll see if I can reproduce it Monday and come back to you.
|
@fisherxue are you sure that the PC you are running VM on have obtained an IP? Are both PCs connected to the same network or are they directly connected? If the latter one, have you set fixed IPs for your PCs? I've just tried to follow the guide from above and that works flawlessly. I'm running two separate PCs on the same corporate network. |
Ran the VM in Host-Only mode instead of Bridged mode (on Virtualbox) and it runs flawlessly. Thanks for all the help! |
System: I'm using PR #29 on Ubuntu 18.04 with both real UR5s and the URSim in Virtualbox
Intro: I've successfully run SenseAct on the CB3 (v.3.7.0) and the new e-series (v.5.1.2) simulators.
Problem: I'm trying to move from UR offline simulators to the real UR5s. This time the newest e-series v.5.1.2. However when I run the example code I get an error stating
This does not occur when connecting to the offline simulator.
The text was updated successfully, but these errors were encountered: