Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
R
robotpkg-wip
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Gepetto
robotpkg-wip
Commits
f5d21f2d
Commit
f5d21f2d
authored
8 years ago
by
Rohan Budhiraja
Browse files
Options
Downloads
Patches
Plain Diff
[wip/sot-dynamic-pinocchio-v3][patch] managing pinocchio version 1.2.1r2. Update python bindings
parent
3864f861
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
sot-dynamic-pinocchio-v3/Makefile
+1
-1
1 addition, 1 deletion
sot-dynamic-pinocchio-v3/Makefile
sot-dynamic-pinocchio-v3/distinfo
+1
-0
1 addition, 0 deletions
sot-dynamic-pinocchio-v3/distinfo
sot-dynamic-pinocchio-v3/patches/patch-ac
+116
-0
116 additions, 0 deletions
sot-dynamic-pinocchio-v3/patches/patch-ac
with
118 additions
and
1 deletion
sot-dynamic-pinocchio-v3/Makefile
+
1
−
1
View file @
f5d21f2d
...
...
@@ -3,7 +3,7 @@
#
VERSION
=
3.1.1
PKGREVISION
=
1
PKGREVISION
=
2
DISTNAME
=
sot-dynamic-pinocchio-v3-
${
VERSION
}
MASTER_SITES
=
${
MASTER_SITE_OPENROBOTS:
=
sot-dynamic-pinocchio-v3/
}
MASTER_REPOSITORY
=
${
MASTER_REPOSITORY_GITHUB
}
proyan/sot-dynamic/
...
...
This diff is collapsed.
Click to expand it.
sot-dynamic-pinocchio-v3/distinfo
+
1
−
0
View file @
f5d21f2d
...
...
@@ -3,3 +3,4 @@ RMD160 (sot-dynamic-pinocchio-v3-3.1.1.tar.gz) = beddcd9fae060cbf371b80075978e20
Size (sot-dynamic-pinocchio-v3-3.1.1.tar.gz) = 922041 bytes
SHA1 (patch-aa) = c57a914a6fc1140f348dec8c1cd2627c79a4de7d
SHA1 (patch-ab) = 70878ef8071dfce1eddb895b35e3cdb4942a848f
SHA1 (patch-ac) = deb468df72d57de00d079edfbec8725f292fd8b5
This diff is collapsed.
Click to expand it.
sot-dynamic-pinocchio-v3/patches/patch-ac
0 → 100644
+
116
−
0
View file @
f5d21f2d
--- src/python-module-py.cpp 2016-11-08 11:38:20.163431833 +0100
+++ src/python-module-py.cpp 2016-11-08 11:14:03.243064192 +0100
@@ -26,54 +26,11 @@
namespace dynamicgraph{
namespace sot{
- /* PyObject* getPinocchioModel(PyObject* // self
- ,PyObject* args) {
- PyObject* object = NULL;
- void* pointer = NULL;
-
- if (!PyArg_ParseTuple(args, "O", &object))
- return NULL;
-
- if (!PyCObject_Check(object)) {
- PyErr_SetString(PyExc_TypeError,
- "function takes a PyCObject as argument");
- return NULL;
- }
-
- pointer = PyCObject_AsVoidPtr(object);
- Dynamic* dyn_entity = (Dynamic*) pointer;
-
- se3::Model* model_ptr = NULL;
-
- try {
- model_ptr = dyn_entity->m_model;
- se3::python::ModelHandler& _model(& (dyn_entity->m_model));
- }
- catch (const std::exception& exc) {
- PyErr_SetString(dgpyError, exc.what());
- return NULL;
- }
- catch (const char* s) {
- PyErr_SetString(dgpyError, s);
- return NULL;
- }
- catch (...) {
- PyErr_SetString(dgpyError, "Unknown exception");
- return NULL;
- }
- //CATCH_ALL_EXCEPTIONS();
-
- // Return the pointer to the signal without destructor since the signal
- // is not owned by the calling object but by the Entity.
- //return boost::python::incref();
- return PyCObject_FromVoidPtr((void*)model_ptr, NULL);
- }
- */
-
PyObject* setPinocchioModel(PyObject* /* self */,PyObject* args) {
PyObject* object = NULL;
PyObject* pyPinocchioObject;
void* pointer1 = NULL;
+ se3::Model* pointer2 = NULL;
if (!PyArg_ParseTuple(args, "OO", &object, &pyPinocchioObject))
return NULL;
@@ -87,10 +44,9 @@
Dynamic* dyn_entity = (Dynamic*) pointer1;
try {
- se3::python::Handler<se3::Model> cppModelHandle =
- boost::python::extract< se3::python::Handler<se3::Model> >(pyPinocchioObject);
- dyn_entity->setModel(cppModelHandle.ptr());
- //dyn_entity->m_model = cppModelHandle.ptr();
+ boost::python::extract<se3::Model&> cppHandle(pyPinocchioObject);
+ pointer2 = (se3::Model*) &cppHandle();
+ dyn_entity->setModel(pointer2);
}
catch (const std::exception& exc) {
//PyErr_SetString(dgpyError, exc.what());
@@ -104,9 +60,7 @@
//PyErr_SetString(dgpyError, "Unknown exception");
return NULL;
}
- // Return the pointer to the signal without destructor since the signal
- // is not owned by the calling object but by the Entity.
- //return boost::python::incref();
+
return Py_BuildValue("");
}
@@ -114,6 +68,7 @@
PyObject* object = NULL;
PyObject* pyPinocchioObject;
void* pointer1 = NULL;
+ se3::Data* pointer2 = NULL;
if (!PyArg_ParseTuple(args, "OO", &object, &pyPinocchioObject))
return NULL;
@@ -127,10 +82,9 @@
Dynamic* dyn_entity = (Dynamic*) pointer1;
try {
- se3::python::Handler<se3::Data> cppDataHandle =
- boost::python::extract< se3::python::Handler<se3::Data> >(pyPinocchioObject);
- dyn_entity->setData(cppDataHandle.ptr());
- //dyn_entity->m_data = cppDataHandle.ptr();
+ boost::python::extract<se3::Data&> cppHandle(pyPinocchioObject);
+ pointer2 = (se3::Data*) &cppHandle();
+ dyn_entity->setData(pointer2);
}
catch (const std::exception& exc) {
// PyErr_SetString(dgpyError, exc.what());
@@ -144,9 +98,7 @@
// PyErr_SetString(dgpyError, "Unknown exception");
return NULL;
}
- // Return the pointer to the signal without destructor since the signal
- // is not owned by the calling object but by the Entity.
- //return boost::python::incref();
+
return Py_BuildValue("");
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment