Giter Site home page Giter Site logo

mveres01 / multi-contact-grasping Goto Github PK

View Code? Open in Web Editor NEW
53.0 4.0 21.0 5.08 MB

This project implements a simulated grasp-and-lift process in V-REP using the Barrett Hand, with an interface through a python remote API.

License: BSD 2-Clause "Simplified" License

Python 56.43% Lua 43.57%
grasping multi-contact gripper learning dataset vrep domain-randomization

multi-contact-grasping's People

Contributors

mveres01 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

multi-contact-grasping's Issues

Problems about Running the Scripts

My system is ubuntu 16.04 and V-REP version is 3.5 EDU. First, I open "grasp_scene.ttt". But when I run the simulation, I see the barretthand disappeared. Then I run the script "collect_grasps.py", but it comes out that an error occurs. Here is the traceback:
Traceback (most recent call last):

File "", line 1, in
runfile('/media/xiaoqing/Project/Git Grasp/multi-contact-grasping/src/collect_grasps.py', wdir='/media/xiaoqing/Project/Git Grasp/multi-contact-grasping/src')

File "/home/xiaoqing/anaconda2/lib/python2.7/site-packages/spyder/utils/site/sitecustomize.py", line 705, in runfile
execfile(filename, namespace)

File "/home/xiaoqing/anaconda2/lib/python2.7/site-packages/spyder/utils/site/sitecustomize.py", line 94, in execfile
builtins.execfile(filename, *where)

File "/media/xiaoqing/Project/Git Grasp/multi-contact-grasping/src/collect_grasps.py", line 274, in
collect_grasps(mesh_path, sim)

File "/media/xiaoqing/Project/Git Grasp/multi-contact-grasping/src/collect_grasps.py", line 165, in collect_grasps
gripper_offset=candidate_offset)

File "/media/xiaoqing/Project/Git Grasp/multi-contact-grasping/src/collect_grasps.py", line 107, in generate_candidates
h=(p - triangles)**2

ValueError: operands could not be broadcast together with shapes (95,3) (12,3)

Could you help me about this problem? Many thanks.

Questions about the use of simxCallSciptFunction

Hi, I am learning VREP recently for grasp simulation and find your code very helpful. Now I am trying to make some modifications to your code like replacing the barrett hand with other gripper and loading object I prepared in ttm format.

However, I find the use of simxCallSciptFunction in simulator.py hard to understand. For example in the load_object function:

r = vrep.simxCallScriptFunction(self.clientID, 'remoteApiCommandServer', vrep.sim_scripttype_childscript, 'loadObject', in_ints, in_floats, [object_path], bytearray(), vrep.simx_opmode_blocking)

I understand that this is to remotely call a V-REP script, and you have specified the script type as "vrep.sim_scripttype_childscript", which should be a child script that is attached to an object (in this case it is the dummy remoteApiCommandServer) in the scene. But in the child script attached to remoteApiCommandServer, there is only one line:
require('remoteApiCommandServer')

I guess this python function eventually makes call to the Regular API function simImportMesh, so would you please shed some light on how this works?

ERROR Loading object

Hello, I was running the code but encountered a problem. I was doing exact as instructed and I wonder what caused the problem.

Here's the running result:
mesh_path: E:\vrep_sim\data\meshes\cube.stl
Traceback (most recent call last):
File "E:/vrep_sim/src/collect_grasps.py", line 269, in
collect_grasps(mesh_path, sim)
File "E:/vrep_sim/src/collect_grasps.py", line 168, in collect_grasps
sim.load_object(mesh_path, com, mass, inertia.flatten())
File "E:\vrep_sim\src\simulator.py", line 297, in load_object
raise Exception('Error loading object! Return code ', r)
Exception: ('Error loading object! Return code ', (8, [], [], [], bytearray(b'')))

[/remoteApiCommandServer@childScript:error] 705: in sim.setInt32Signal: one of the function's argument type is not correct.
stack traceback:
[C]: in function 'simSetIntegerSignal'
E:/vrep_sim/scenes/remoteApiCommandServer.lua:705: in main chunk
[C]: in field 'require'
...rogram Files/CoppeliaRobotics/CoppeliaSimEdu/lua/sim.lua:27: in function 'require'
[string "/remoteApiCommandServer@childScript"]:1: in function 'sim_code_function_to_run'
"Error: ",[long string]

And line705 is “simSetIntegerSignal('h_gripper_config_buffer', h_gripper_config_buffer)”

Could anyone give a clue? Many thanks!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.