<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://openrave.programmingvision.com/wiki/index.php?feed=atom&amp;namespace=0&amp;title=Special%3ANewPages</id>
		<title>OpenRAVE - New pages [en]</title>
		<link rel="self" type="application/atom+xml" href="http://openrave.programmingvision.com/wiki/index.php?feed=atom&amp;namespace=0&amp;title=Special%3ANewPages"/>
		<link rel="alternate" type="text/html" href="http://openrave.programmingvision.com/wiki/index.php/Special:NewPages"/>
		<updated>2026-11-08T21:36:57Z</updated>
		<subtitle>From OpenRAVE</subtitle>
		<generator>MediaWiki 1.24.4</generator>

	<entry>
		<id>http://openrave.programmingvision.com/wiki/index.php/GraspModuleIK</id>
		<title>GraspModuleIK</title>
		<link rel="alternate" type="text/html" href="http://openrave.programmingvision.com/wiki/index.php/GraspModuleIK"/>
				<updated>2011-12-19T09:39:00Z</updated>
		
		<summary type="html">&lt;p&gt;SteveHegenbart: /* Using the grasping module for an neuronics-katana 5D arm */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The GraspModuleIK is a grasping plugin for the C++ API. The currently version uses both an IkSolver for the main path planning and an trajectory and collision detection algorithm to open and close the gripper for grabbing an object. Yet it has only implemented simple grasping positions and an 5D IkParameterization. Still, the module is designed for simple extensions to add also other robot models.&lt;br /&gt;
&lt;br /&gt;
== Sourceforge Directory ==&lt;br /&gt;
&lt;br /&gt;
https://sourceforge.net/projects/orgraspmoduleik/&lt;br /&gt;
&lt;br /&gt;
== The GraspingModuleIK class == &lt;br /&gt;
&lt;br /&gt;
=== Attributes ===&lt;br /&gt;
&lt;br /&gt;
The class keeps simple private attributes, mostly initialized when the module is created:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
private:&lt;br /&gt;
    OpenRAVE::RobotBasePtr _probot;              ///&amp;lt; The active robot that will grab&lt;br /&gt;
    OpenRAVE::ModuleBasePtr _pikmodule;          ///&amp;lt; IkSolver module to get joint solutions&lt;br /&gt;
    OpenRAVE::ModuleBasePtr _pbasemanip;         ///&amp;lt; Basemanipulator to simulate the robots movement&lt;br /&gt;
    OpenRAVE::RobotBase::ManipulatorPtr _pmanip; ///&amp;lt; Active manipulator to load the ikSolver&lt;br /&gt;
    boost::shared_ptr&amp;lt;GraspParameters&amp;gt; _params;  ///&amp;lt; Grasping parameter struct&lt;br /&gt;
&lt;br /&gt;
    enum handPosition {positionClose, positionOpen, positionBase};&lt;br /&gt;
    enum handMoveMode {openHand, closeHand};&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The enumerations are used inside inner methods to change the gripper position. Yet the grasping module needs to be reinitialized to change the base pointers i.g. the robot and modules specified for the robot.&lt;br /&gt;
&lt;br /&gt;
=== Public Methods ===&lt;br /&gt;
&lt;br /&gt;
The main functions to use are the grasping function, releasing objects and the main move function (normally used after an object is grabbed, it can also be used without any object).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
bool GraspTarget(boost::shared_ptr&amp;lt;GraspParameters&amp;gt; params);&lt;br /&gt;
void ReleaseAllObjects();&lt;br /&gt;
bool ReleaseObject(OpenRAVE::KinBodyPtr target);&lt;br /&gt;
bool MoveObjectToPosition(OpenRAVE::RAY ray);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The GraspTarget will open the gripper if possible, then move to the target and grab it. The main usage of the module is as following:&lt;br /&gt;
&lt;br /&gt;
* Create the module&lt;br /&gt;
* Call GraspTarget()&lt;br /&gt;
* Call MoveObjectToPosition()&lt;br /&gt;
* Call ReleaseObject() or ReleaseAllObjects()&lt;br /&gt;
&lt;br /&gt;
=== GraspParameters ===&lt;br /&gt;
&lt;br /&gt;
The GraspParameters struct is holding all informations to grab an object. It is defined as followed:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
struct GraspParameters {&lt;br /&gt;
    OpenRAVE::KinBodyPtr _target;                   &lt;br /&gt;
        ///&amp;lt; The target which shall be grabbed&lt;br /&gt;
    OpenRAVE::dReal _standoff;                 &lt;br /&gt;
        ///&amp;lt; Standoff between target and robot in grab direction that will be held, in default this will be zero&lt;br /&gt;
    OpenRAVE::dReal _offset;                   &lt;br /&gt;
        ///&amp;lt; The offset in z direction from the basic point of the target where the robot will grab the target&lt;br /&gt;
    OpenRAVE::dReal _coarsestep;               &lt;br /&gt;
        ///&amp;lt; Coarse step value used to approach the target while closing the gripper&lt;br /&gt;
    OpenRAVE::dReal _finestep;                 &lt;br /&gt;
        ///&amp;lt; Fine step value used to approach the target while closing the gripper, this will be used after the coarse approximation&lt;br /&gt;
    int _grabDirection;            &lt;br /&gt;
        ///&amp;lt; The used grab direction to grab the target with the robot arm. Here the OpenRAVE DOF-Values DOF_X, DOF_Y and DOF_Z can be used&lt;br /&gt;
    int _ikParameterization;       &lt;br /&gt;
        ///&amp;lt; The ikParameterization for the robot used to initialize the ikSolver&lt;br /&gt;
    bool _avoidTargetCollision;     &lt;br /&gt;
        ///&amp;lt; If set, the gripper will step back a bit after there was a collision with the target while closing the gripper&lt;br /&gt;
};&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There is also an constructor defined for the struct, defining default values for all parameters except the target, the grabDirection and the ikParameterization.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
GraspParameters(OpenRAVE::KinBodyPtr target, int grabDirection, int ikParameterization, OpenRAVE::dReal standoff = 0.0f,&lt;br /&gt;
                    OpenRAVE::dReal offset = 0.05f, OpenRAVE::dReal coarsestep = 0.1f, OpenRAVE::dReal finestep = 0.01f,&lt;br /&gt;
                    bool avoidTargetCollision = true)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Code Examples ==&lt;br /&gt;
=== Using the grasping module for an neuronics-katana 5D arm ===&lt;br /&gt;
&lt;br /&gt;
The following code shows how to initialize the module, define some parameters and call the main methods to grab some cups. There are two cups in the environment, standing on a table, as well as a bottle of ketchup. The first cup will be grabbed and placed down between the second cup and the bottle. Then, the second cup will be grabbed and placed to the original position of the first cup.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;cpp&amp;quot;&amp;gt; &lt;br /&gt;
// ***** Get target KinBody&lt;br /&gt;
KinBodyPtr target = penv-&amp;gt;GetKinBody(&amp;quot;cup1&amp;quot;);&lt;br /&gt;
std::string targetType;&lt;br /&gt;
targetType = target-&amp;gt;GetURI().substr(target-&amp;gt;GetURI().find_last_of(&amp;#039;/&amp;#039;) + 1).c_str();&lt;br /&gt;
&lt;br /&gt;
// ***** Initialize grasper and graspParameters&lt;br /&gt;
GraspingModuleIK grasper(penv, probot);&lt;br /&gt;
&lt;br /&gt;
dReal standoff = 0.0f;&lt;br /&gt;
dReal offset = 0.5f;&lt;br /&gt;
&lt;br /&gt;
RAY first;&lt;br /&gt;
first.pos = target-&amp;gt;GetTransform().trans;&lt;br /&gt;
first.dir = Vector(0,0,1);&lt;br /&gt;
first.dir.normalize3();&lt;br /&gt;
&lt;br /&gt;
boost::shared_ptr&amp;lt;GraspParameters&amp;gt; params(new GraspParameters(target, (int)DOF_Z, (int)IkParameterization::Type_TranslationDirection5D, standoff, offset));&lt;br /&gt;
params-&amp;gt;_coarsestep = 0.1f;&lt;br /&gt;
params-&amp;gt;_finestep = 0.01f;&lt;br /&gt;
params-&amp;gt;_avoidTargetCollision = false;&lt;br /&gt;
params-&amp;gt;_target = penv-&amp;gt;GetKinBody(&amp;quot;cup1&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
// ***** Grasp target object&lt;br /&gt;
grasper.GraspTarget(params);&lt;br /&gt;
&lt;br /&gt;
// ***** Move object to new position and release it&lt;br /&gt;
RAY ray;&lt;br /&gt;
ray.pos = penv-&amp;gt;GetKinBody(&amp;quot;cup2&amp;quot;)-&amp;gt;GetTransform().trans;&lt;br /&gt;
ray.pos.y = (ray.pos.y + penv-&amp;gt;GetKinBody(&amp;quot;ketchup&amp;quot;)-&amp;gt;GetTransform().trans.y) / 2.0;&lt;br /&gt;
ray.pos.z += params-&amp;gt;_offset;&lt;br /&gt;
ray.dir = Vector(0,0,1);&lt;br /&gt;
ray.dir.normalize3();&lt;br /&gt;
grasper.MoveObjectToPosition(ray);&lt;br /&gt;
grasper.ReleaseAllObjects();&lt;br /&gt;
&lt;br /&gt;
// ***** Grab new target and move it&lt;br /&gt;
params-&amp;gt;_target = penv-&amp;gt;GetKinBody(&amp;quot;cup2&amp;quot;);&lt;br /&gt;
grasper.GraspTarget(params);&lt;br /&gt;
&lt;br /&gt;
first.pos.z += params-&amp;gt;_offset;&lt;br /&gt;
grasper.MoveObjectToPosition(first);&lt;br /&gt;
grasper.ReleaseAllObjects();&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;/div&gt;</summary>
		<author><name>SteveHegenbart</name></author>	</entry>

	<entry>
		<id>http://openrave.programmingvision.com/wiki/index.php/BaseManipulation</id>
		<title>BaseManipulation</title>
		<link rel="alternate" type="text/html" href="http://openrave.programmingvision.com/wiki/index.php/BaseManipulation"/>
				<updated>2011-11-29T22:14:54Z</updated>
		
		<summary type="html">&lt;p&gt;Rdiankov: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Code Examples ==&lt;br /&gt;
=== Setting A Robots Manipulators To Default ===&lt;br /&gt;
&amp;lt;source lang=&amp;quot;cpp&amp;quot;&amp;gt; &lt;br /&gt;
baseManip = RaveCreateModule(penv, &amp;quot;BaseManipulation&amp;quot;);&lt;br /&gt;
if(baseManip == NULL)&lt;br /&gt;
{&lt;br /&gt;
	ROS_FATAL(&amp;quot;Was unable to create module BaseManipulation.  Check your $OPENRAVE_PLUGINS\n&amp;quot;);&lt;br /&gt;
	return false;&lt;br /&gt;
}&lt;br /&gt;
penv-&amp;gt;AddModule(baseManip, myRobot-&amp;gt;GetName());&lt;br /&gt;
//Move our manipulators to default positions so they don&amp;#039;t fall with physics...&lt;br /&gt;
stringstream sinput, soutput;&lt;br /&gt;
for(vector&amp;lt;RobotBase::ManipulatorPtr&amp;gt;::const_iterator myIt = myRobot-&amp;gt;GetManipulators().begin();&lt;br /&gt;
	myIt != myRobot-&amp;gt;GetManipulators().end(); myIt++)&lt;br /&gt;
{&lt;br /&gt;
	sinput.clear();&lt;br /&gt;
	sinput.str(&amp;quot;&amp;quot;);&lt;br /&gt;
	sinput &amp;lt;&amp;lt; &amp;quot;MoveManipulator goal&amp;quot;;&lt;br /&gt;
	for(unsigned int i = 0; i &amp;lt; (*myIt)-&amp;gt;GetArmIndices().size(); i++)&lt;br /&gt;
		sinput &amp;lt;&amp;lt; &amp;quot; 0&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
	myRobot-&amp;gt;SetActiveManipulator((*myIt)-&amp;gt;GetName());&lt;br /&gt;
	baseManip-&amp;gt;SendCommand(soutput, sinput);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;/div&gt;</summary>
		<author><name>Constantin</name></author>	</entry>

	<entry>
		<id>http://openrave.programmingvision.com/wiki/index.php/FAQ</id>
		<title>FAQ</title>
		<link rel="alternate" type="text/html" href="http://openrave.programmingvision.com/wiki/index.php/FAQ"/>
				<updated>2011-11-21T16:08:55Z</updated>
		
		<summary type="html">&lt;p&gt;Rdiankov: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Installation Questions ==&lt;br /&gt;
# &amp;#039;&amp;#039;&amp;#039;How do I use OpenRAVE with ROS?&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
#* Install the &amp;#039;&amp;#039;&amp;#039;rospackages&amp;#039;&amp;#039;&amp;#039; &amp;#039;&amp;#039;openrave&amp;#039;&amp;#039;, &amp;#039;&amp;#039;collada_robots&amp;#039;&amp;#039;, and &amp;#039;&amp;#039;soqt&amp;#039;&amp;#039; found on the ROS website.  Also make sure you have &amp;#039;&amp;#039;python-sympy&amp;#039;&amp;#039; from your OS repo.  Now, whenever you want to use openrave, just update your manifest.xml with a&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;depend package=&amp;quot;openrave&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
#* You also have another option, download openrave from source.  Compile and install it.  To add it to your ROS_PATH, you need a manifest.xml in an &amp;quot;openrave&amp;quot; folder inside your &amp;#039;&amp;#039;&amp;#039;ROS_PACKAGE_PATH&amp;#039;&amp;#039;&amp;#039;.  I need to update this and add a manifest.xml you can use. (just the same one from the ros repo install)&lt;br /&gt;
&lt;br /&gt;
== Physics and OpenRAVE ==&lt;br /&gt;
# &amp;#039;&amp;#039;&amp;#039;When I turned physics on, my robot fell apart.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
#: This is because the time step of your simulation is too large.  Try setting a smaller timestep (&amp;lt;= 0.001).&lt;br /&gt;
#: In python:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
env.StopSimulation()&lt;br /&gt;
env.StartSimularion(0.001)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
#: In C++:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
EnvironmentBasePtr env = RaveCreateEnvironment;&lt;br /&gt;
env-&amp;gt;StopSimulation();&lt;br /&gt;
env-&amp;gt;StartSimularion(0.001);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
# &amp;#039;&amp;#039;&amp;#039;Is there a parallel/modified ODE plugin?  What about setting contact joints?&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
#* The ode engine from ROS (&amp;#039;&amp;#039;opende&amp;#039;&amp;#039;) employs a few patches, as well as a parallelization patch.  You can rosmake the opende package.  HOWEVER, then you must recompile the odeplugin (OpenRAVE plugin) and force OpenRAVE to use the sources and shared libraries from the modified ODE engine.  Lucky for you, the opende package has an odeconfig tool which spits out the correct flags for you.&lt;br /&gt;
#* There is also a plugin developed by CSIRO ASL.  Among the things they changed is allowing the individual parameter setting of contact joints in the xml. [https://code.launchpad.net/csiro-asl-ros-pkg Here] is the repo.  You need openrave in your &amp;#039;&amp;#039;&amp;#039;ROS_PACKAGE_PATH&amp;#039;&amp;#039;&amp;#039; to use its CMake.  It may be possible to modify the CMake file using openrave-config to get all the flags.&lt;br /&gt;
# &amp;#039;&amp;#039;&amp;#039;My physics is unstable what can I do?&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
#* The first most important thing you should do, is lower the timestep as stated above.&lt;br /&gt;
#* The second most important thing to do, is set your erp and cfm.  The OpenRAVE ODE plugin by default sets them extremely low.  An explanation can be found [http://opende.sourceforge.net/wiki/index.php/Manual_(Concepts)#Soft_constraint_and_constraint_force_mixing_.28CFM.29 here].&lt;br /&gt;
#** Just setting the &amp;lt;erp&amp;gt;0.4&amp;lt;/erp&amp;gt; drastically stabilized my simulations.&lt;br /&gt;
&lt;br /&gt;
== OpenRAVE Planners ==&lt;/div&gt;</summary>
		<author><name>Constantin</name></author>	</entry>

	</feed>