Comments (5)
Ok, I see. I have verified it on a u20.04 system with the latest packages from the ROS build farm for Noetic.
Two different things here:
-
python3 not finding the library. That's "easy" to hack away, as you probably have already done, either creating symlinks under
/opt/ros/noetic/lib/python3/dist-packages
(not recommended) or by temporarily adding:export PYTHONPATH=$PYTHONPATH:/opt/ros/noetic/lib/python3.8/site-packages/
-
With MRPT 2.9.0, there has been a massive change in the Python bindings: it formerly was hand-written and only exported part of the API. It's now automated via pybind11 and most parts of MRPT are now available via
pymrpt
. The names and such changed a bit, though.
Please, see:- Examples like se3-poses-example.py or hwdriver-tao-imu-usb.py for a possible way to import the module (first few lines), and
- The only (ugly) pydoc reference docs of all existing classes, modules and methods. If you use the interactive python3 interpreter,
tab
will help you to autocomplete, but I wasn't able to make Visual Studio Code to autocomplete pymrpt classes, and couldn't find the reason...
Any help with testing, improving, adding/correcting Python examples, etc. would be more than welcome, since we normally develop with the C++ libs and the python part is far less tested...
I'm leaving this ticket open to remember trying to fix the installation path of pymrpt in noetic.
from mrpt.
PS: I realized the logic to determine the install directory for pymrpt is inverted! python3
is used for ROS2, python3.X
for ROS1, while it should be the other way around.
I'll fix it asap.
from mrpt.
The latest release v2.9.2 should fix these issues in ROS 1 and ROS 2, as well as in the PPA python3-pymrpt
package.
Note there are now also a few examples online to help with code migration with former versions, hope it helps!
from mrpt.
Thanks for fixing this. I am still struggling to find everything I need in the new API. Specifically, I need to go back and forth between ROS1 messages and MRPT types. In the old API I would use something like this:
p1mrpt = CPose3DPDFGaussian()
p1mrpt.from_ROS_PoseWithCovariance_msg(p1)
where p1
is PoseWithCovariance
type from geometry_msgs.msg
In the new API, I understand I should use ros1bridge
that is documented here:
https://docs.mrpt.org/reference/latest/group_mrpt_ros1bridge_grp.html
and call toROS
and fromROS
to do the conversion. Assuming that Python bindings follow the hierarchy that C++ follows, I would expect to find ros1bridge
under pymrpt.mrpt
, but I don't see it:
>>> from mrpt import pymrpt
>>> dir(pymrpt.mrpt)
['Clock', 'DEG2RAD', 'RAD2DEG', 'Stringifyable', 'TCallStackBackTrace', 'TCallStackEntry', 'WorkerThreadsPool', '__doc__', '__loader__', '__name__', '__package__', '__spec__', 'aligned_calloc', 'aligned_free', 'aligned_malloc', 'apps', 'bayes', 'callStackBackTrace', 'comms', 'config', 'containers', 'cpu', 'd2f', 'expr', 'f2u8', 'global_settings', 'graphs', 'gui', 'hwdrivers', 'hypot_fast', 'ignored_copy_ptr_mrpt_maps_COctoMapBase_octomap_ColorOcTree_octomap_ColorOcTreeNode_t', 'ignored_copy_ptr_mrpt_maps_COctoMapBase_octomap_OcTree_octomap_OcTreeNode_t', 'img', 'int_select_by_bytecount_1_t', 'int_select_by_bytecount_2_t', 'int_select_by_bytecount_3_t', 'int_select_by_bytecount_4_t', 'int_select_by_bytecount_8_t', 'io', 'keep_max', 'keep_min', 'kinematics', 'maps', 'math', 'nav', 'non_copiable_ptr_basic_void_t', 'obs', 'opengl', 'poses', 'ptr_cast_mrpt_serialization_CSerializable_t', 'random', 'round', 'rtti', 'safe_ptr_basic_mrpt_opengl_Scene_t', 'safe_ptr_basic_mrpt_rtti_TRuntimeClassId_t', 'safe_ptr_mrpt_opengl_Scene_t', 'safe_ptr_mrpt_rtti_TRuntimeClassId_t', 'serialization', 'sign', 'signWithZero', 'slam', 'square', 'system', 'tfest', 'toNativeEndianness', 'to_string', 'topography', 'typemeta', 'u8tof', 'uint_select_by_bytecount_1_t', 'uint_select_by_bytecount_2_t', 'uint_select_by_bytecount_3_t', 'uint_select_by_bytecount_4_t', 'uint_select_by_bytecount_8_t', 'vision']
I do see other modules that I recognize from docs (e.g. poses
, slam
, etc..), but no ros1bridge
. Am I missing something or has this binding been omitted?
from mrpt.
Oh my! You are right, it was totally left out (!).
Following up in #1276.
from mrpt.
Related Issues (20)
- Package 'libwxgtk3.0-dev' has no installation candidate HOT 1
- Is there anyway to use this with PlatformIO for Teensy? HOT 1
- Incorrect license and copyright for CSparse HOT 1
- [Help, please] Problems building source code on Windows HOT 3
- There might be a little mistake in CICP::ICP_Method_LM HOT 1
- Provide example of 2D lidar reprojection (Malaga Urban dataset) HOT 1
- New variance field for the Range message HOT 8
- How to build it with visual studio 2022 on windows11 HOT 1
- Source packages release do not contain submodules HOT 2
- Provide python wrapper for ros1bridge & ros2bridge HOT 2
- FTBFS on Ubuntu Focal HOT 1
- CPose3DPDFGaussian composition broken in Python HOT 1
- ros-noetic-mrpt2 dependencies HOT 1
- Does not build with an opencv where patch level > 15 HOT 1
- Test cases OpenGL.CFBORender_camera_intrinsics/fov failed on riscv64 HOT 3
- gimbal lock condition computing jacobian from quaternion to rpy HOT 1
- error: ‘cvEndFindContours’ was not declared in this scope HOT 1
- mrpt fails to build on 32bit architectures with 64bit time_t type HOT 4
- Consider adding zstd as default compression method
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mrpt.