Skip to main content
Share Your Experience: Take the 2024 Developer Survey

Questions tagged [nodehandle]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
1 answer
27 views

How to improve NodeHandle build and execution errors

Raspberry Pi 4, Lubuntu20.04, ROS1-noetic Please help me because I am getting an error with NodeHandle My program is below (Some Japanese is mixed in) The publish node will be as follows https://...
S.Tomo's user avatar
  • 7
0 votes
1 answer
3 views

nh.subscribe works but message_filters::Subscriber not

I'm trying to learn the ROS topic, but I met a problem that really confused me. Here is the origin code. It works well, I can receive the image and pass it to ...
user avatar
0 votes
1 answer
1 view

Starting a node twice, with differend parameters

Hallo , I want to start my node twice, but it shoud have differend parameter for my COM-Path. Here is my code: ...
user avatar
0 votes
1 answer
66 views

What is the difference between ros::NodeHandle nh("") and just ros::NodeHandle nh?

I understand that ros::NodeHandle nh("~") is a private namespace and that ros::NodeHandle nh("/") is the ...
user avatar
0 votes
1 answer
9 views

Using NodeHandle in callback

Hello, I am making an initialization node for AHRS and I'm trying to get the initial bias of gyroscope by averaging the first 1000 readings that I get. I need to advertise the service only after I ...
user avatar
0 votes
1 answer
43 views

nodehandle parameter

I am reading the tutorial on the website http://wiki.ros.org/roscpp/Overview/Parameter%20Server But I am not sure understand the following the Default value version. ...
user avatar
0 votes
1 answer
18 views

Access rosparam from node handle passed by reference

Hi all, I have a ROS node which inits and constructs a NodeHandle object. The node is run from a launch file that loads a YAML file into the parameter server. From ...
user avatar
0 votes
1 answer
117 views

when and why do we use two or more ros::NodeHandle for one Node?

could you please explain when and why two or more ros::NodeHandle object are used in a program? could you please give some experimental example for these cases? Originally posted by MahShah on ROS ...
user avatar
0 votes
1 answer
6 views

NodeHandle::subscribe fail to subscribe topic

Hi, I'm new to ROS and C++ and doing Programming for Robotics (http://www.rsl.ethz.ch/education-students/lectures/ros.html). My problem is "Create a subscriber to the /scan topic" in ...
user avatar
0 votes
1 answer
5 views

NodeHandle namespaces

This is just an question about a very specific corner-case of the NodeHandle API, that is not covered by its documentation. I have no bug for you to solve or ...
user avatar
0 votes
1 answer
5 views

access parameters in service function

Hello, I would like to use some parameters stored in the parameter server within a service function. I tried a lot to pass the nodeHandle as an additional parameter with functions from the boost ...
user avatar
0 votes
1 answer
85 views

no matching function for call to

Hey everybody, I'm working on a node that uses a service to repeat a string a variable amount of times. for this i made the following srv file: ...
user avatar
0 votes
1 answer
9 views

Bug in ros::NodeHandle::searchParam()?

Hi all, according to my understanding of searchParam(), the second if condition in the following code snippet should never be ...
user avatar
0 votes
1 answer
27 views

rospy equivalent to ros::NodeHandle nh("namespace")

I'm very new to ROS and am [slightly] more versed in python than C++, so that's the route I'm currently pursuing in my learning. ...
user avatar
0 votes
1 answer
9 views

What can cause spinOnce to stop processing messages?

I'm trying to debug a very rare instance (that happens randomly) in my node when I will be waiting for a specific message and it never gets received. I've created a very rough code example to help ...
user avatar
0 votes
1 answer
21 views

ros::Node as static member - any better ideas

Situation I'm part of a larger team working with robots and ROS. My current project is to create easy-to-use libraries for navigation and other things from existing code in our repositories. Over time,...
user avatar
0 votes
1 answer
16 views

How to fix ros::NodeHandle error?

This is my code snippet of curser.h ...
user avatar
0 votes
1 answer
4 views

Is it possible to use a certain data value of a topic for executing some code?

Hello, i will try to be as clear as possible. I have a ROS topic in which are published only 0 and 1. In another node i have a subscriber that is subscribed to that topic. Then i had an idea to ...
user avatar
0 votes
1 answer
1 view

Last node handle goes out of scope but callbacks still work. Why?

I thought I need to keep my node handle alive by storing it in my class member, but when I make it a local variable in my constructor and let it go out of scope, my callback still gets called. Is this ...
user avatar
0 votes
1 answer
3 views

NodeHandler in multiple threads

In my case, I'm having multiple threads to subscribe to different topics. I'm not able to receive the data from any. I'm assuming its because I'm using the same node handler for all threads. But I did ...
user avatar
0 votes
2 answers
11 views

Template argument deduction fails

Hi, I have this call for a Subscriber: ros::Subscriber sub = handle.subscribe<std_msgs::Bool>(topic_str.str(), 10, boost::bind(obIcCb, _1, i)); Why do I need ...
user avatar
0 votes
1 answer
7 views

ROS Timer: difference between types of NodeHandles?

Dear all, a student approached me a day back with a question that I just couldn't answer: "Should a ROS timer be on a a private NodeHandle, or on a global one?" (or any other, obviously...) ...
Matthias's user avatar
  • 5,815
0 votes
3 answers
21 views

What is the use of multiple nodehandles

I didn't really get the concept of nodehandles from the ROS wiki and couldn't find any concise answer with google. I understood that a ROS node can have multiple nodehandles and they refer to the same ...
user avatar
0 votes
1 answer
2 views

ROS fuerte - check subscriber

Hi, I want to check if a subscriber has subscribe properly to a topic. I read in documentation (http://docs.ros.org/api/roscpp/html/classros_1_1NodeHandle.html#aad44a59900a86f6d24f175b28e20c8a3) that ...
user avatar
0 votes
1 answer
4 views

How to keep a class "alive" (...and passing the same NodeHandle)?

Hi, here the minimal example I could create to explain a problem with my program which is splitted into 2 classes. One class creates an istance of the second one: Let's start with the main file: ...
user avatar
0 votes
1 answer
5 views

question about the nodehandle for subscribing and publishing

Hello everyone, I have created my own package (with catkin) in which I am subscribing and publishing to several topics. So far, for each topic (wheather for subcribing or publishing) I have created a ...
user avatar
0 votes
1 answer
1 view

Subscriber and publisher in the same node not working with costum msg

Hello, I know that this question might be asked before, but I did not find the final solution for it. Here is the question: I want to write a node that subscribe for data from a topic then publish ...
user avatar
0 votes
3 answers
28 views

When is private nodehandle useful

Looking into many codes and programs I see not rarely some nodes which are called toghether with a private name. For istance: ...
user avatar
0 votes
1 answer
1 view

Compiling with dynamic_reconfigure server code leads to deadlock

I have a package into which I want to include dynamic_reconfigure code. EDIT: I am running Fuerte on Ubuntu 12.04 The following .cfg is compiled into PACKAGENAMEParamsConfig.h without a problem. ...
user avatar
0 votes
1 answer
9 views

call nodeHandle->advertiseService

Hi, i try to advertise my service, but i am not able to compile. Here is my msg file: string sourceRobot float64 x float64 y My srv file: ...
user avatar
0 votes
2 answers
10 views

Nodehandle destroyed and shutdown the ros node

Hi all I was wondering what would happen to the previously created subscriptions and publications and services after the nodehandle is destroyed? I have experieced such case: create a nodehandle in ...
user avatar
0 votes
1 answer
1 view

Triclops SDK Function Breaks ros::NodeHandle

Hello everyone, I have a problem incorporating Point Grey Research's Triclops SDK into ROS. I've created a simple test ROS package that illustrates this problem based on the simple C++ publisher shown ...
user avatar
0 votes
1 answer
15 views

Problem with nodehandle before ros::init

Hi I have inserted a shortened version of my files below, but first i'll try to explain my problem. My problem is that I want to define a MoveTo() function within skills.cpp, which uses actionlib ...
user avatar
0 votes
1 answer
34 views

What is NodeHandle?

I make publisher and subscriber. Why do I need to declare NodeHandle? NodeHandele is per topic? Originally posted by Ichiro suzuki on ROS Answers with karma: 1 on 2013-07-22 Post score: 6
user avatar
0 votes
1 answer
9 views

Can I have both a subscriber and a service in a single node?

Hi, I have a node which serves primarily as a service, but I would like it to be able to subscribe to a publisher so that I can import an array before the service is called. I tried adding the ...
user avatar
0 votes
2 answers
4 views

How do I get a valid NodeHandle in a rqt plugin

I need a NodeHandle in order to make my library work properly. I am also using this library in a rqt plugin. Should I just create a new Nodehandle (don't think that this is a good idea) or is there ...
user avatar
0 votes
1 answer
1 view

confusing about simple ros c++ code

Hi, I have a simple question about c++ pointer. This is the main. ...
user avatar
0 votes
2 answers
4 views

Can 1 node subsrcibe MSG from a topic and publish MSG to other topic at the same time?

Hi all, I downloaded the face_recognition demo and pi_tracker demo, and I want to combine the two which means that I want the turtlebot recognized me at first and move as I wish. However, it means ...
user avatar
0 votes
1 answer
7 views

NodeHandle effect on advertise

I'm working on a node with several callback queues, which I'm handling through separate NodeHandles, in order to process time critical callbacks separately from longer running callbacks. I think I ...
user avatar
0 votes
1 answer
1 view

knowing when a parameter is updated

From http://www.ros.org/wiki/ROS/Parameter%20Server%20API or from the NodeHandle API (the getParamCached methods) we see that it is possible to have a parameter cached and updated locally on changes. ...
user avatar