graspit-simulator / graspit

The GraspIt! simulator
http://graspit-simulator.github.io/
Other
180 stars 81 forks source link

Save depth image of scene #46

Closed jvarley closed 7 years ago

jvarley commented 8 years ago

The render scripts were written by @jon-weisz

This adds a new item in the drop down menu right below saveImage that will save a depth Image of the scene.

Tested on: ubuntu 12.04, 14.04

jvarley commented 8 years ago

yy

jvarley commented 8 years ago

The depth images have a hardcoded max depth at 1, so anything greater than a meter away will saturate to black. I am not exactly sure what the best format for a depth image is. This is currently saving as a QImage Format_RGB32 with the r,g,b channels all having the same value. It definitely displays the nicest, but we are losing alot of precision. only 256 distinct depth values.

Would we want to get rid of scanSimulator? This is MUCH faster.:

jvarley@skye:~/graspit_img_save$ grep -ir ScanSimulator src src/DBase/dbase_grasp.h:#include "scanSimulator.h" src/DBase/dbase_grasp.cpp:#include "scanSimulator.h" src/DBase/dbase_grasp.cpp: ScanSimulator sim; src/DBase/dbase_grasp.cpp: sim.setType(ScanSimulator::WORLD_COORDINATES); src/DBase/dbase_grasp.cpp: sim.setPosition(loc, dir, up, ScanSimulator::STEREO_CAMERA); src/scanSimulator.cpp:// $Id: scanSimulator.cpp,v 1.5 2010/08/11 21:35:22 cmatei Exp $ src/scanSimulator.cpp:#include "scanSimulator.h" src/scanSimulator.cpp:ScanSimulator::ScanSimulator() src/scanSimulator.cpp:void ScanSimulator::setPosition(transf tr, AxesConvention convention) src/scanSimulator.cpp:void ScanSimulator::setPosition(position p, vec3 optical_axis, vec3 up_axis, AxesConvention convention) src/scanSimulator.cpp:void ScanSimulator::scan(std::vector cloud, std::vector rawData) src/scanSimulator.cpp:void ScanSimulator::computeRayDirection(float hAngle, float vAngle, vec3 &rayDirection) src/scanSimulator.cpp:bool ScanSimulator::shootRay(const vec3 &rayDirection, position &rayPoint) jvarley@skye:~/graspit_img_save$ grep -ir ScanSimulator include include/scanSimulator.h:// $Id: scanSimulator.h,v 1.6 2010/08/11 21:35:22 cmatei Exp $ include/scanSimulator.h:#ifndef _scansimulatorh include/scanSimulator.h:#define _scansimulatorh include/scanSimulator.h:class ScanSimulator { include/scanSimulator.h: ScanSimulator();

mateiciocarlie commented 7 years ago

Might be a plugin