jontromanab / fetchpy

running fetch from openrave
9 stars 4 forks source link

How to access the head camera? #2

Open xiaoyuch24 opened 6 years ago

xiaoyuch24 commented 6 years ago

Hi,

I already successfully run 'env, robot = fetchpy.initialize()'.

In my project, I need access the fetch robot's head camera in the openrave simulator. I tried:

'robot.GetSensors()' 'robot.GetAttachedSensor()'

Thay all return None. But there is sensor's information in the urdf file. Could you please let me know how to access the camera in the openrave simulator?

Thank you very much!

jontromanab commented 6 years ago

hello, Glad you could run fetchpy. Accessing the head camera is not yet set up. The project is stalled for couple of months. I am currently busy in something for the next couple of days. Will it work if I can look at it and get back to you by Monday. In the meantime, please let me know if you can come up with something.

That will be great. Thank you.

xiaoyuch24 commented 6 years ago

Hi,

Thanks for your reply! If you could back to me by Monday, it will be great and I really appreciate. Accessing the camera is very necessary to me.

In the meantime, I will try to come up with something.

Btw, if I set the viewer to be 'qtcoin' by calling "fetchpy.initialize(viewer='qtcoin')", the robot doesn't look correct, which is same as the first picture you post here. Did you make it work for 'qtcoin' viewer?

Additionally, did you ever try openrave grasping Module on the fetch?

I inserted an object into the environment, and run:

gmodel = databases.grasping.GraspingModel(robot,target) if not gmodel.load(): gmodel.autogenerate() validgrasps, validindicees = gmodel.computeValidGrasps(returnnum=1)

However, the validgrasps is always None.

Thank you very much!

jontromanab commented 6 years ago

I will try to come back to you asap. About rotated models, please check out this branch for or_urdf

https://github.com/jontromanab/or_urdf/tree/dae_fix

I have created a PR at or_urdf repo. But certainly it did not got merged and I almost forgot about that. In my branch, look for scripts/process_urdf.py This file will rotate all your models from Z-up to Y-up

Yes. I have done grasping on Fetch model in openrave. It can be done pretty easily either by the openrave grasping module, or you can use fetchpy.

xiaoyuch24 commented 6 years ago

Hi Abhijit,

Just let you know that I haven't figure out how to attached sensor and access it.

I know the general way to do this is to edit an environment xml file, in which we load the robot.xml first and then attach a sensor to a link.

However, using fetchpy, by calling 'env, robot = fetchpy.initialize()', we add the robot into env without getting robot.xml file. Then, I don't know how to dynamically attach a sensor in python code.

Accessing the fetch senor to get image data and pointcloud data is very significant to my project, I will really appreciate if you could help me figure it out!

Have a nice weekend, and look forward to receiving your response by Mon.

Thank you very much!

Best, Yuchen