zfw1226 / craves_control Goto Github PK
View Code? Open in Web Editor NEWThe control module of "CRAVES:Controlling Robotic Arm with a Vision-based, Economic System"
The control module of "CRAVES:Controlling Robotic Arm with a Vision-based, Economic System"
hello!
when I run OWI-535 in the virtual environment,as following:
python` main.py --gpu-ids 0 --rescale --test --env UnrealArm-ContinuousPose-v1 --model-dir models/best.pt
An error occurred:
ERROR:init:174:No message handler to handle message with length 10
Traceback (most recent call last):
File "main.py", line 57, in
test(device, args)
File "/home/dell3/craves_control-master/ddpg/test.py", line 35, in test
new_observation, reward, done, info = env.step(action_rescale)
File "/home/dell3/craves_control-master/ddpg/environment.py", line 147, in step
ob, rew, done, info = self.env.step(action)
File "/home/dell3/craves_control-master/ddpg/environment.py", line 61, in step
ob, rew, done, info = self.env.step(action)
File "/home/dell3/anaconda3/envs/rlpyt/lib/python3.7/site-packages/gym/wrappers/time_limit.py", line 16, in step
observation, reward, done, info = self.env.step(action)
File "/home/dell3/gym-unrealcv-1.0/gym_unrealcv/envs/unrealcv_arm_reach.py", line 101, in step
tip_pose = self.unrealcv.get_tip_pose()
File "/home/dell3/gym-unrealcv-1.0/gym_unrealcv/envs/robotarm/interaction.py", line 93, in get_tip_pose
result = self.client.request(cmd)
File "/home/dell3/anaconda3/envs/rlpyt/lib/python3.7/site-packages/unrealcv/init.py", line 309, in request
message = self.raw_message_handler(raw_message)
File "/home/dell3/anaconda3/envs/rlpyt/lib/python3.7/site-packages/unrealcv/init.py", line 171, in raw_message_handler
assert(False)
AssertionError
It seems that this error occurs when the robotic arm moves to the ground.
Please load env binary in UnrealEnv and Check the env_bin in setting file!
Hey, I wonder if GPU is necessary. I just want to test, not for training.
Must I need a video card from NVIDIA?
When I running main.py script I get "No registered env with id: UnrealArm-ContinuousPose-v1" with argument " errors. Where I can get the environment of "UnrealArm-ContinuousPose-v1". Thanks.
`/home/sw/py3_virtualenv/bin/python3.5 /home/sw/project/craves/craves_control-master/ddpg/main.py --gpu-ids 0 --rescale --test --env UnrealArm-ContinuousPose-v1 --model-dir models/best.pt
using gpu 0
Traceback (most recent call last):
File "/home/sw/py3_virtualenv/lib/python3.5/site-packages/gym/envs/registration.py", line 143, in spec
return self.env_specs[id]
KeyError: 'UnrealArm-ContinuousPose-v1'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/sw/project/craves/craves_control-master/ddpg/main.py", line 57, in
test(device, args)
File "/home/sw/project/craves/craves_control-master/ddpg/test.py", line 10, in test
env = create_env(args.env, args)
File "/home/sw/project/craves/craves_control-master/ddpg/environment.py", line 17, in create_env
env = gym.make(env_id)
File "/home/sw/py3_virtualenv/lib/python3.5/site-packages/gym/envs/registration.py", line 167, in make
return registry.make(id)
File "/home/sw/py3_virtualenv/lib/python3.5/site-packages/gym/envs/registration.py", line 118, in make
spec = self.spec(id)
File "/home/sw/py3_virtualenv/lib/python3.5/site-packages/gym/envs/registration.py", line 153, in spec
raise error.UnregisteredEnv('No registered env with id: {}'.format(id))
gym.error.UnregisteredEnv: No registered env with id: UnrealArm-ContinuousPose-v1`
Can the pose estimation code be use to estimate two robot arms in one picture?Is it very difficult to estimate the pose of two robot arms in one picture?
Hello,
I would like to use the same RL framework as in this repo to control a different arm in Unreal Engine. Could you explain how did you create the uproject file with this robot in Unreal Engine? I already know to to convert a uproject to a binary file.
After reading the paper, I guess you directly imported a whole robot model into UE without using URDF etc. Is this correct? Maybe you could explain the procedure of importing a robot into UE Editor into detail.
Also after reading the interface code in gym-unrealcv that communicates between this arm and UE-binary, I noted that there are some unrealcv commands that looks like to be unique. Did you create come custom unrealcv commands? If so, can you provide an example?
Also it would be great if you can provide the uproject file of this robot. This way I could know how a robot in UE is connected to unrealcv commands. For example, in US each joint has an ID, and unrealcv needs to know the mapping from an ID to that robot joint in UE. Right now I have no idea how can I do this.
Thank you!
1.Why does the robot arm move so strangely when I ran the reinforcement learning code?just like that it may move up and down again and again so it reach the certain point with repeateded movement.Is it for the weakness of RL or my module isn't good enough.I am using "best.pt " provided by you.
2.And is there any way to accelerate the movement of the robot?It spends me lots of time in waiting.
3.Did you grab the dice by running the reinforcement learning code?I try the RL but it didn't work well.
I sincerely look forward to your reply.Thanks!
The following code occures when running :
python demo_control.py --kp --pose 0 0 0 0
D:\craves_control-master\craves_control>python demo_control.py --kp --pose 0 0 0 0
D:\craves_control-master\craves_control\utils\trans.py:1926: UserWarning: No module named 'craves_control.utils._transformations'
warnings.warn(str(err))
usb cam started!
Traceback (most recent call last):
File "demo_control.py", line 34, in
arm_ctl = usb_arm.Arm() # inti arm controller
File "D:\craves_control-master\craves_control\hardware\usb_arm.py", line 68, in init
self.dev.set_configuration()
File "F:\anaconda\envs\pytorch_zyx\lib\site-packages\usb\core.py", line 869, in set_configuration
self._ctx.managed_set_configuration(self, configuration)
File "F:\anaconda\envs\pytorch_zyx\lib\site-packages\usb\core.py", line 102, in wrapper
return f(self, *args, **kwargs)
File "F:\anaconda\envs\pytorch_zyx\lib\site-packages\usb\core.py", line 147, in managed_set_configuration
self.managed_open()
File "F:\anaconda\envs\pytorch_zyx\lib\site-packages\usb\core.py", line 102, in wrapper
return f(self, *args, **kwargs)
File "F:\anaconda\envs\pytorch_zyx\lib\site-packages\usb\core.py", line 120, in managed_open
self.handle = self.backend.open_device(self.dev)
File "F:\anaconda\envs\pytorch_zyx\lib\site-packages\usb\backend\libusb1.py", line 786, in open_device
return _DeviceHandle(dev)
File "F:\anaconda\envs\pytorch_zyx\lib\site-packages\usb\backend\libusb1.py", line 643, in init
_check(_lib.libusb_open(self.devid, byref(self.handle)))
File "F:\anaconda\envs\pytorch_zyx\lib\site-packages\usb\backend\libusb1.py", line 593, in _check
raise NotImplementedError(_strerror(ret))
NotImplementedError: Operation not supported or unimplemented on this platform
After I ran this command
python main.py --gpu-ids 0 --rescale --test --env UnrealArm-ContinuousPose-v1 --model-dir models/best.pt
Traceback (most recent call last):
File "craves_control/demo_control.py", line 32, in
arm_ctl = usb_arm.Arm() # inti arm controller
File "/home/nxt/arm/craves_control/craves_control/hardware/usb_arm.py", line 68, in init
self.dev.set_configuration()
AttributeError: 'NoneType' object has no attribute 'set_configuration'
does it need OWI USB Interface for Robotic Arm Edge to drive robotic arm?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.