pluginlib | A framework for creating and importing plugins in Python
kandi X-RAY | pluginlib Summary
kandi X-RAY | pluginlib Summary
A framework for creating and importing plugins in Python
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Return all available plugins
- Load modules
- Raise a friendly exception
- Import a module
- Check all abstract methods
- Check if a class method contains a required class
- Check type annotations
- Compare two arguments
- Returns a filtered version of the OrderedDict
- Process blacklist
- Return a sorted list of keys
- Filters the plugins according to the given blacklist
- Iterate over items
- Prints all spelling errors in a directory
- Print spelling errors
- Print the spelling errors in a file
- Get the version number from a file
- Removes spelling directory
- Read the content of a file
pluginlib Key Features
pluginlib Examples and Code Snippets
Community Discussions
Trending Discussions on pluginlib
QUESTION
I'm dealing with ros-navigation and its integrated layered costmaps. I have a static map in which obstacles from an occupancy grid need to be inserted. Since Obstacle Layer only can handle specific data (pointclouds from laser scanners etc.) and is apparently not able to handle a occupancy grid as input, I decided to write a custom layer which takes an occupancy grid and using the marking and clearing function from the occupancy grid to add obstacles and/or free space to the master grid. While running, there are no exceptions thrown. I figured out that the subscriber successfully receives the occupancy grid and enters the callback which at least runs through to the end. However, the updateCost-function (which apparently is responsible to add the modifications to the master grid) is never called (the ROS_INFO never throws its message). Therefore, no local map is generated, which causes RVIZ to throw a "No map received"-warning.
Any ideas of what is wrong with my layer?
The source-code of the custom layer:
...ANSWER
Answered 2020-Jul-07 at 06:20The Problem was in the local_costmap_params.yaml where I renamed my static layer in the plugin-description as static_layer (see on top of the yaml) but declared the map_topic in a therefore non-existing static_layer_path_detection namespace. Therefore, the static layer coundn't find a map_topic.
If you run into a similar issue, make sure all of your plugins in the costmap.yaml are configured properly! All plugins have to receive their input-data for the layered_costmap-file to call the update_costs-function!
A similar issue can be found here.
QUESTION
I'm working on a workaround for the problem of this thread.
Since none of the existing costmap2d-layers appears to allow the usage of the full range of values (0-255) I used the ros-tutorial to create a custom layer. Therefore, I just used the source-code of the static_layer plugin and modified the interpretValue - function in order to map the value (which is due to the used occupancy grid between -1 and 100) to the full range of the layer (which should be 0-255). I integrated my custom plugin into the global_costmap_params.yaml and the system appears to properly load the plugin (at least there are no further errors or warnings that it couldn't be loaded).
The problem is: In RVIZ the global costmap - section throws a warning which says "No map received" (The Topic is '/move_base/global_costmap/costmap' which works fine when static_layer is set as plugin). As a result of that, I can only see the coordinate system, but no map.
I'm using ROS Melodic.
Plugin source code (occgrid_to_costmap_layer.cpp):
...ANSWER
Answered 2020-Jun-06 at 18:52The cause of the problem is the same as in the other thread:
The custom layer somehow isn't able to read the param "map_topic" properly from the global_costmap_params.yaml. (Any ideas how to fix that?)
Changing the default parameter in
nh.param("map_topic", map_topic, std::string("map"));
to
nh.param("map_topic", map_topic, std::string("insert_required_map_topic_here"));
fixed the issue.
Edit:
This could very well be due to a namespace issue. Specifying the namespace for the map_topic-param (see the other thread linked above) should also solve the problem.
QUESTION
I'm trying to make a plugin for Unity, but not even the simplest class works.
In Android Studio I created a library module, and in it, the following class:
...ANSWER
Answered 2020-Feb-28 at 06:22I assume you are running in the editor because you stated "when clicking on run"..
Java plugins will not work in the editor. You would need to deploy to an Android device to test the functionality.
QUESTION
I created a ROS2 rviz plugin in C++ which I need to compile into a shared library (.so
) using cmake. I already have a working CMakeLists.txt (see below) which creates a static library (.a
); I need it to be shared, though.
However, when I add the SHARED
keyword to the add_library
macro (commented out in the code below), it throws this strange error:
ANSWER
Answered 2019-Feb-05 at 10:45Normally that error pops up if you are giving some library names as arguments to the target_link_libraries
function.
Either,
- The names are not correct or,
- The path is not or,
- The libraries are not installed.
I'd look at target_link_libraries(delegator_lib rviz_common::rviz_common)
and link_directories(${ament_cmake_LIBRARY_DIRS})
as suspects.
In CMake you can use MESSAGE
command to do debugging of sorts where you can display the values of the CMake variables to check if they make sense with what is on the system.
Also you can try installing the XAW library like this sudo apt-get install libxaw7-dev
. Could be that one of the libraries that you link to has a dependency on the XAW library.
QUESTION
I am missing something as I struggle to get the tutorial rviz plugin to show up within rviz. I have the source for the visualization_tutorials. Within that git repo, there is the rviz_plugin_tutorials. I can successfully build this within a ROS workspace, with the output showing up in rviz_workspace/devel/lib as librviz_plugin_tutorials.so.
I have read that rviz uses pluginlib to load plugins that have the appropriate plugin_description.xml and use the PLUGINLIB_EXPORT_CLASS macro appropriately.
I don't understand how this mechanism is supposed to work. After building the plugin, all you have are the library (.so file) and the package and plugin .xml files. How is running 'rosrun rviz rviz' supposed to allow rviz to find this new library and plugin description file? That's my fundamental misunderstanding. I don't see the tutorial plugin when I run rviz and running rospack doesn't show the tutorial plugin:
...ANSWER
Answered 2017-Apr-24 at 19:48Rookie mistakes being made here by me. I did two things to solve my problem, then realized only one was needed.
1) Installed rviz source and built it. After doing this and performing 'rosrun rviz rviz' the problem still remained. No new plugin.
2) Realized I had not sourced devel/setup.bash for this workspace. Doing this and then running rviz produced the desired results.
I went back and removed rviz from src and removed the devel folder and it all still worked, so it seems it's not necessary to work with rviz built from source.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install pluginlib
You can use pluginlib like any standard Python library. You will need to make sure that you have a development environment consisting of a Python distribution including header files, a compiler, pip, and git installed. Make sure that your pip, setuptools, and wheel are up to date. When using pip it is generally recommended to install packages in a virtual environment to avoid changes to the system.
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page