2021-04-14 16:32:54 -0500 | received badge | ● Nice Question
(source)
|
2021-03-25 16:39:54 -0500 | received badge | ● Good Question
(source)
|
2019-05-20 02:26:43 -0500 | marked best answer | Unload a plugin with pluginlib Hi everyone, i'm trying to manage a project with the adaptation of plugins and I created a node with the launch of multiple plugins with different parameters and I can't found in the API code a function to unload a plugin dynamically. I'd like not to use any nodelet because there are some specifications that I don't understand (The bond connection between every nodelets and all). So is there a simple way to manage the plugin dynamically ? Thx Edit 1: I tried to use the unloadLibraryForClass. It does not delete the object, it just tries to unload the library which is not what I want. What I'm trying to do for example is to instantiate a plugin, delete it and instantiate it again with a different parameter. The destructor of the base class is virtual so I create a destructor for each of my plugin but it cannot be used because the plugin is of the base type. Same problem with the delete function. |
2019-03-20 11:47:40 -0500 | received badge | ● Nice Question
(source)
|
2019-02-02 15:10:20 -0500 | received badge | ● Famous Question
(source)
|
2018-10-01 21:36:21 -0500 | received badge | ● Notable Question
(source)
|
2018-10-01 21:36:21 -0500 | received badge | ● Popular Question
(source)
|
2018-04-26 03:39:41 -0500 | received badge | ● Notable Question
(source)
|
2018-04-05 15:14:52 -0500 | received badge | ● Famous Question
(source)
|
2017-10-03 08:16:07 -0500 | received badge | ● Famous Question
(source)
|
2017-08-24 06:23:07 -0500 | received badge | ● Popular Question
(source)
|
2017-08-22 06:33:12 -0500 | edited question | Unload a plugin with pluginlib Unload a plugin with pluginlib
Hi everyone,
i'm trying to manage a project with the adaptation of plugins and I created |
2017-08-22 02:26:12 -0500 | asked a question | Unload a plugin with pluginlib Unload a plugin with pluginlib
Hi everyone,
i'm trying to manage a project with the adaptation of plugins and I created |
2017-07-18 07:51:15 -0500 | received badge | ● Notable Question
(source)
|
2017-07-18 07:51:15 -0500 | received badge | ● Popular Question
(source)
|
2017-03-28 11:17:45 -0500 | asked a question | Can launch but not run my Nodelet Hi everyone, Since few days I try to understand and use Nodelet to dynamically load process from a cpp Node. I read lots of questions and answer from this forum and I have a problem. (Btw thanks to the community with clear answers on many questions) I just copied the code from nodelet_tutorial_math and modified it to republish with custom messages and I can launch my Node using this launch file: <launch>
<node pkg="nodelet" type="nodelet" name="nodelet_manager" args="manager" />
<node pkg="nodelet" type="nodelet" name="test_nodelet"
args="load test_nodelet/Add nodelet_manager">
</node>
</launch>
But when I try to use the following commands: rosrun nodelet nodelet manager __name:=nodelet_manager
rosrun nodelet nodelet load test_nodelet/Add nodelet_manager __name:=test_nodelet
I can't run my nodelet because the manager does not find it in the nodelet package: [ERROR] [1490717511.798024359]: Failed to load nodelet [/nodelet_test] of type [test_nodelet/Add] even after refreshing the cache: According to the loaded plugin descriptions the class test_nodelet/Add with base class type nodelet::Nodelet does not exist. Declared types are depth_image_proc/convert_metric depth_image_proc/crop_foremost depth_image_proc/disparity depth_image_proc/point_cloud_xyz depth_image_proc/point_cloud_xyz_radial depth_image_proc/point_cloud_xyzi depth_image_proc/point_cloud_xyzi_radial depth_image_proc/point_cloud_xyzrgb depth_image_proc/register image_proc/crop_decimate image_proc/crop_nonZero image_proc/debayer image_proc/rectify image_rotate/image_rotate image_view/disparity image_view/image nodelet_tutorial_math/Plus pcl/BAGReader pcl/BoundaryEstimation pcl/ConvexHull2D pcl/CropBox pcl/EuclideanClusterExtraction pcl/ExtractIndices pcl/ExtractPolygonalPrismData pcl/FPFHEstimation pcl/FPFHEstimationOMP pcl/MomentInvariantsEstimation pcl/MovingLeastSquares pcl/NodeletDEMUX pcl/NodeletMUX pcl/NormalEstimation pcl/NormalEstimationOMP pcl/NormalEstimationTBB pcl/PCDReader pcl/PCDWriter pcl/PFHEstimation pcl/PassThrough pcl/PointCloudConcatenateDataSynchronizer pcl/PointCloudConcatenateFieldsSynchronizer pcl/PrincipalCurvaturesEstimation pcl/ProjectInliers pcl/RadiusOutlierRemoval pcl/SACSegmentation pcl/SACSegmentationFromNormals pcl/SHOTEstimation pcl/SHOTEstimationOMP pcl/SegmentDifferences pcl/StatisticalOutlierRemoval pcl/VFHEstimation pcl/VoxelGrid stereo_image_proc/disparity stereo_image_proc/point_cloud2
[ERROR] [1490717511.798075777]: The error before refreshing the cache was: According to the loaded plugin descriptions the class test_nodelet/Add with base class type nodelet::Nodelet does not exist. Declared types are depth_image_proc/convert_metric depth_image_proc/crop_foremost depth_image_proc/disparity depth_image_proc/point_cloud_xyz depth_image_proc/point_cloud_xyz_radial depth_image_proc/point_cloud_xyzi depth_image_proc/point_cloud_xyzi_radial depth_image_proc/point_cloud_xyzrgb depth_image_proc/register image_proc/crop_decimate image_proc/crop_nonZero image_proc/debayer image_proc/rectify image_rotate/image_rotate image_view/disparity image_view/image nodelet_tutorial_math/Plus pcl/BAGReader pcl/BoundaryEstimation pcl/ConvexHull2D pcl/CropBox pcl/EuclideanClusterExtraction pcl/ExtractIndices pcl/ExtractPolygonalPrismData pcl/FPFHEstimation pcl/FPFHEstimationOMP pcl/MomentInvariantsEstimation pcl/MovingLeastSquares pcl/NodeletDEMUX pcl/NodeletMUX pcl/NormalEstimation pcl/NormalEstimationOMP pcl/NormalEstimationTBB pcl/PCDReader pcl/PCDWriter pcl/PFHEstimation pcl/PassThrough pcl/PointCloudConcatenateDataSynchronizer pcl/PointCloudConcatenateFieldsSynchronizer pcl/PrincipalCurvaturesEstimation pcl/ProjectInliers pcl/RadiusOutlierRemoval pcl/SACSegmentation pcl/SACSegmentationFromNormals pcl/SHOTEstimation pcl/SHOTEstimationOMP pcl/SegmentDifferences pcl/StatisticalOutlierRemoval pcl/VFHEstimation pcl/VoxelGrid stereo_image_proc/disparity stereo_image_proc/point_cloud2
My CMakeList is the following one: cmake_minimum_required(VERSION 2.8.3)
project(test_nodelet)
add_definitions(-std=c++11)
find_package(catkin REQUIRED COMPONENTS nodelet roscpp std_msgs)
include_directories(${catkin_INCLUDE_DIRS})
catkin_package(
LIBRARIES nodelet_test
CATKIN_DEPENDS nodelet roscpp std_msgs
)
add_library(nodelet_test src/test_nodelet.cpp)
target_link_libraries(nodelet_test ${catkin_LIBRARIES})
if(catkin_EXPORTED_LIBRARIES)
add_dependencies(nodelet_test ${catkin_EXPORTED_LIBRARIES})
endif()
install(TARGETS nodelet_test
ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION})
install(FILES nodelet_test.xml
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION})
and here is my nodelet_test.xml: <library path="lib/libnodelet_test">
<class name="test_nodelet/Add"
type="test_nodelet::Add"
base_class_type="nodelet::Nodelet ... (more) |
2016-08-09 05:16:57 -0500 | asked a question | rosmaster crash with duplicated service Hi, I'm working on a simple service which has to be duplicated. I've developped a fault tolerance mecanism (Primary Back-Up Replication) using checkpointing to save the answer/state of a the first server and restore it to the second one. The rosmaster is launched on the first one's ECU (Raspberry Pi like). My problem is in case my first ECU crash, the rosmaster crash and so i can't run my nodes on my second ECU without reloading them. So my question is : - Do I need to start the rosmaster on a third unit ?
- Is there a way to "save" the graph of communication and nodes and reload it into the new rosmaster ?
Thank you in advance for your answer |
2016-06-14 10:44:36 -0500 | received badge | ● Notable Question
(source)
|
2015-11-14 03:48:54 -0500 | received badge | ● Famous Question
(source)
|
2015-09-23 16:38:39 -0500 | received badge | ● Popular Question
(source)
|
2015-08-25 04:21:32 -0500 | commented answer | Thread Callback Server Yes, I have looked at this page multiple time but I don't understand in case of multi-threaded spinner how you associate a spinner to a queue. In my case I need the subscriber to look at a msg while my service still running. |
2015-08-25 03:54:37 -0500 | marked best answer | Embedding python in C++ Hi, I'm trying to embedded a python function in a c++ node. I've read the documentation on docpython for Python 3.4 and I've tried a little example from the doc : #include "ros/ros.h"
#include "std_msgs/String.h"
#include <python3.4/Python.h>
int main(int argc, char *argv[])
{
ros::init(argc, argv, "fault_detector");
Py_Initialize();
PyRun_SimpleString("from time import time,ctime\n"
"print('Today is', ctime(time()))\n");
Py_Finalize();
return 0;
}
and i get this error : CMakeFiles/ft_node.dir/src/fault_detector.cpp.o: In function `main':
fault_detector.cpp:(.text+0x63): undefined reference to `Py_Initialize'
fault_detector.cpp:(.text+0x72): undefined reference to `PyRun_SimpleStringFlags'
fault_detector.cpp:(.text+0x77): undefined reference to `Py_Finalize'
collect2: error: ld returned 1 exit status
make[2]: *** [/home/mamy/exo_ws/devel/lib/test/ft_node] Error 1
make[1]: *** [test/CMakeFiles/ft_node.dir/all] Error 2
I've done some research to find my problems but I can't find anything pertinent. It could be a problem of version as I read and i don't know how to change that. If anyone has an answer. Thank you in advance for your answer |
2015-08-25 03:52:04 -0500 | asked a question | Thread Callback Server Hi, This time i try, in a single node, to have a server, a subscriber and a publisher. I receive a request from a client and publish it to other nodes and need the answer to send it back to the client. So I have to "pause" my server callback and wait for the answer from the subscriber callback. I assume that I need to multithread my Node because the server may not be put in a wait mode without a while (flag!=true) and I know how to do the multithreading with posix but here it is more a problem of queuing and spinner. My code is simple, when i receive the answer it copy the request into a msg and wait with a while. I have a callback for my subscriber. I've tried to introduce boost::thread and callbackqueue but coudn't find a way to make it work. Do you have tips in order to do that ? Tanks |
2015-08-25 03:43:55 -0500 | received badge | ● Scholar
(source)
|
2015-08-25 03:43:11 -0500 | received badge | ● Notable Question
(source)
|
2015-08-20 10:58:05 -0500 | received badge | ● Famous Question
(source)
|
2015-07-29 14:11:37 -0500 | received badge | ● Popular Question
(source)
|
2015-07-29 07:46:02 -0500 | commented answer | Problem with serialization.h Damn ! Yes that the problem...i feel stupid right now thanks a lot |
2015-07-29 04:16:46 -0500 | received badge | ● Famous Question
(source)
|
2015-07-29 04:16:26 -0500 | received badge | ● Editor
(source)
|
2015-07-28 07:22:55 -0500 | asked a question | Problem with serialization.h Hi, I've tried to code a simple service between a client node and a proxy node and i have this error : In file included from /opt/ros/indigo/include/ros/publisher.h:34:0,
from /opt/ros/indigo/include/ros/node_handle.h:32,
from /opt/ros/indigo/include/ros/ros.h:45,
from /home/mamy/ftm_ws/src/pbr/src/proxy/proxy.cpp:1:
/opt/ros/indigo/include/ros/serialization.h: In instantiation of ‘static void ros::serialization::Serializer<t>::read(Stream&, typename boost::call_traits<t>::reference) [with Stream = ros::serialization::IStream; T = const client::SrvCltRequest_<std::allocator<void> >; typename boost::call_traits<t>::reference = const client::SrvCltRequest_<std::allocator<void> >&]’:
/opt/ros/indigo/include/ros/serialization.h:163:32: required from ‘void ros::serialization::deserialize(Stream&, T&) [with T = const client::SrvCltRequest_<std::allocator<void> >; Stream = ros::serialization::IStream]’
/opt/ros/indigo/include/ros/serialization.h:900:25: required from ‘void ros::serialization::deserializeMessage(const ros::SerializedMessage&, M&) [with M = const client::SrvCltRequest_<std::allocator<void> >]’
/opt/ros/indigo/include/ros/service_callback_helper.h:176:49: required from ‘bool ros::ServiceCallbackHelperT<spec>::call(ros::ServiceCallbackHelperCallParams&) [with Spec = ros::ServiceSpec<const client::srvcltrequest_<std::allocator<void=""> >, client::SrvCltResponse_<std::allocator<void> > >]’
/home/mamy/ftm_ws/src/pbr/src/proxy/proxy.cpp:44:2: required from here
/opt/ros/indigo/include/ros/serialization.h:136:5: error: ‘const struct client::SrvCltRequest_<std::allocator<void> >’ has no member named ‘deserialize’
t.deserialize(stream.getData()); here is my code and I don't understand this problem : #include "ros/ros.h"
#include <iostream>
#include <stdio.h>
#include "std_msgs/String.h"
#include "std_msgs/Header.h"
#include "proxy.h"
#include "communication/MsgPxyPro.h"
#include "communication/MsgProPxy.h"
#include "client/SrvClt.h"
Proxy::Proxy(){
// Initialisation of Publisher on topic "Proxy - Protocol"
//pub_pxy_pro = nh.advertise<communication::MsgPxyPro>("/pxy2pro", 10);
// Initialisation of Subscriber on topic "Client - Proxy"
//sub_pro_pxy = nh.subscribe("/pro2pxy", 10, &Proxy::receiveAnswer,this);
// Init of the Server on service "Client - Proxy"
ser_clt = nh.advertiseService("clt2pxy", &Proxy::addId,this);
};
bool Proxy::addId(const client::SrvClt::Request &req, client::SrvClt::Response &res)
{
/*//msg_pxy_pro.request = req.request;
//msg_pxy_pro.id = req.header.seq; // A retravailler...
pub_pxy_pro.publish(msg_pxy_pro);
while (flag!=true)
{
usleep(100);
}
//for(int i = 0;sizeof(answer);i++){
// res.answer[i] = *(answer+i);
//}
flag = false; */
};
void Proxy::receiveAnswer(const communication::MsgProPxy msg_pro_pxy)
{
/*for(int i = 0;sizeof(msg_pro_pxy.answer);i++){
*(answer+i) = msg_pro_pxy.answer[i];
}
flag = true;*/
};
When I delete the line where I initiate my ser_clt, it compile without any problem, do you have a solution ? Thx Ps : Yes I've looked at my .h and everything should be alright Edit : For my organization I have 4 packages :
- client
- communication
- pbr
- tr
- server I dissociated the client and the server because they're should be independent at the end. I have, in my communication pkg, my proxy, my protocol and every msg and srv that not belong to the client and the server because they should be the same in my pbr pkg and tr pkg and I want to switch ... (more) |
2015-06-03 03:02:04 -0500 | received badge | ● Enthusiast
|
2015-06-02 08:08:41 -0500 | received badge | ● Notable Question
(source)
|
2015-06-02 02:40:39 -0500 | commented answer | Embedding python in C++ Ok sorry, I wanted to answer in a comment but my answer was too long so I did not think to edit my original post. Yes I've install python3.4-dev package and python3-dev but not a change |
2015-06-01 12:16:39 -0500 | received badge | ● Popular Question
(source)
|
2015-06-01 09:15:49 -0500 | received badge | ● Student
(source)
|
2015-06-01 07:40:37 -0500 | received badge | ● Supporter
(source)
|