Questions tagged [roscpp]

The tag has no usage guidance.

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

How to query Quality of Service (QoS) Parameters of a ROS 2 Service from Command line

I know how to list ROS 2 services using the following command: ros2 service list I also know that we can display the QoS properties of a ROS 2 topic using the ...
NINAD PREMDAS RATHOD's user avatar
0 votes
1 answer
44 views

catkin cmake can't find ros packages

when building my ros1 (noetic ubuntu 20.04) package, catkin cmake can't find Catkin packages automatically. (setting the apth for all works, but it is not the right way: ...
Bilal's user avatar
  • 144
0 votes
1 answer
43 views

ROS2 controller needs motor encoder values

I am wanting to link to this encoder code with another ROS2 C++ program, in the ROS2_Controller group. I believe I can include the header file from this encoder code in compilation and use a public ...
Russ76's user avatar
  • 44
0 votes
3 answers
405 views

ros2 spinning problem[SOLVED]

i'm trying to transform ego-planner-swarm founded in: https://github.com/ZJU-FAST-Lab/ego-planner-swarm to ros2... the problem was in one of the subscription's callbacks there was a function in which ...
arash mokhtari sherkat's user avatar
1 vote
1 answer
45 views

ROS1 Custom messages generates strange memory graph pattern when using multiple string types

In ROS1 Noetic, I have the following custom message named Test.msg: int32 did string a string b And I have another custom message TestList.mgs: Test[] testList In ...
Enikő's user avatar
  • 11
0 votes
1 answer
34 views

ROS1 Noetic Custom messages - Command line publish char[]/uint8[] support

I have a custom ROS1 Test.msg message which I use in roscpp Noetic: uint8[] a uint8[] b I use uint8[] to represent strings, because I can't use simple string type ...
Enikő's user avatar
  • 11
0 votes
0 answers
11 views

Procedural update of enum for a list in dynamic reconfigure

How to add/update to the drop down list created using ParameterGenerator's enum() method. In the .cfg file we can use a default list for populating the rqt_reconfigure drop down. I am looking forward ...
Shouvik Das's user avatar
0 votes
1 answer
295 views

Performance Comparison Between Python and C++ in ROS2 for Real-Time Applications

Is there a disadvantage in terms of real-time performance when using Python as opposed to C++ in ROS2? If so, how significant is this disadvantage? Thank you.
XIAO LIU's user avatar
0 votes
1 answer
30 views

Timer Callback not getting called

Here Is My timer callback code ...
user avatar
0 votes
1 answer
25 views

Should I unregister from Publishers/Subscribers when I terminate a ROS node by exiting the script?

Hi everyone. So my question is pretty much what the title is. Is it good practice or even necessary to unregister from ROS publishers or subscribers I used inside my ROS node before terminating the ...
user avatar
0 votes
1 answer
6 views

noetic createTimer always segfault

Hi, After introducing ROS to my program with success, i wanted to use it more and added timer. I am using the same code on both Ubuntu20/noetic and Ubuntu18/melodic without any issue. But with timer i ...
user avatar
0 votes
1 answer
41 views

No DEBUG messages on stdout/stderr

When printing/logging messages with ROS_DEBUG there is no output on stdout/stderr, despite launching a node with ...
user avatar
0 votes
1 answer
2 views

roscpp: Node doesn't stop totally

Hello everyone, I am trying to exit my C++ node correctly but the process doesn't exit totally, here's the log I get : ...
user avatar
0 votes
1 answer
2 views

Automatic node shutdown if topic is no longer receiving messages

Hi, I have a node that receives camera messages. I want the node to shutdown when the rosbag is done playing. I know I can do this with roslaunch. But I wanted to know if I could do this with code. I ...
user avatar
0 votes
1 answer
5 views

ros::package::getPath throws bad_alloc

I have quite a large ros repo and everything was working fine for a very long time. For some reason running it after Christmas I started seeing the following: ...
user avatar
0 votes
1 answer
11 views

Node can't find roscpp libs

Trying to port a node from catkin_make to catkin tools but it won't build - it seems that it can't find any of the roscpp libs and gives a very long stream of errors like this. I have been tearing my ...
user avatar
0 votes
1 answer
1 view

Error when including .h from another package in the same workspace?

Hello I have created a package GA_palnner for a custom global planner based on Genetic Algorithm. Under src of GA_palnner: CrossPoint.cpp , GA_global_planner_ros.cpp , GenericPathPlanner.cpp , Map....
user avatar
0 votes
1 answer
2 views

subscribers in noetic seem to fail at a faster rate than in previous versions when there are a large number of subscribers

My organization has a large ROS-based system with on the order of almost 300 topics being transmitted at various rates. I was recently tasked with updating from Kinetic on Ubuntu 16.04 to Noetic on 20....
user avatar
0 votes
1 answer
2 views

how to build dependant packages across multiple machines

I have a package running a service (package A) and another running a client for that service (package B) both implemented in c++. Package B has build/exec dependency on package A for that service. ...
user avatar
0 votes
1 answer
17 views

roscpp: set / get vector containing infinity from parameter server

Hello everyone, I would to read a vector containing some infinity components from the ROS parameter server. I have included the following line in the roslaunch: ...
user avatar
0 votes
1 answer
9 views

Should I link ${catkin_LIBRARIES} to my library, or to executables?

Here's an excerpt from my CMakeLists.txt: ...
user avatar
0 votes
1 answer
8 views

How to get a bool from the param server in a C++ class?

I'm trying to retrieve a bool from the ROS param server, inside a class with the private node handle as a member variable. However every method I've tried fails. Why? Below is my code, and I've set ...
user avatar
0 votes
1 answer
5 views

Newbie question on working with pcl_ros

I'm used to ROS/python, but due to performance requirements I'm writing a node in C++ for filtering pointcloud data. Specifically, I'm inputting a ...
user avatar
0 votes
1 answer
19 views

How to use ros::service::call()

I want to call a service in code. The command line form is "rosservice call /move_base_node/clear_costmaps". It has type std_srvs/Empty There is function ros::service::call(const std::string ...
user avatar
0 votes
1 answer
7 views

Convert Float32 to C++ float variable

Hi, I'm trying to convert a Float32 type std_msg into a float variable. Following is the code I have at the moment. ...
user avatar
0 votes
1 answer
5 views

Do getParamCached() and dynamic_reconfigure have the same functions?

I want to reflect the changes in the parameters, in my node during run-time. In such a situation, which would be better to implement: getParamCached() or the dynamic_reconfigure package? I know that ...
user avatar
0 votes
1 answer
34 views

Converting cv::Mat rotation matrix to quaternion

Is there a way to convert a cv::Mat rotation matrix to a quaternion? Originally posted by EDU4RDO-SH on ROS Answers with karma: 52 on 2020-07-28 Post score: 1 Original comments Comment by ...
user avatar
0 votes
1 answer
3 views

Boost thread blocking ros::spin

I have a class that has a member variable which is an object of another class ...
user avatar
0 votes
1 answer
16 views

roslaunch dies with exit code -11 after it stops receiving topic from bag file

The node behaves as expected while it receives a topic but as soon as the topic playback terminates, an error is thrown and the launch file (node) stops. I also can't find the log file in the ...
user avatar
0 votes
1 answer
4 views

How to correctly deserialize a message with variable length array?

I'm receiving some data from serial port and want to deserialize the byte stream I received to a ROS message. The serial port data contains variable number of elements (elements with same type). So I ...
user avatar
0 votes
1 answer
9 views

Problems with boost::bind in a class with message_filter

Hello, I am attempting to use a class to synchronize subscription to a detection message [vision_msgs/Detection2DArray] and a camera_info message. I am getting compile errors when binding the ...
user avatar
0 votes
1 answer
2 views

How to load values in bash file to a cpp file?

I have mentioned ROBOT_INITIAL_POSE in bashrc file using export command...I want to use those values in one of my cpp files...How can i dircetly access those values?? Originally posted by harrynick ...
user avatar
0 votes
1 answer
2 views

roscpp error listener.cpp and talker.cpp

The same talker and listener works perfectly with a python file and why it fails to work with a cpp file. rosrun ros_basic_tutorials talker.cpp Error /home/ishan/...
user avatar
0 votes
2 answers
5 views

Using ROS namespaces programmaticaly

It seems like the simple question, but is it possible to control robots with different ROS namespaces in one launch file programmaticaly? For example, i want to move robot1 one meter forward, and ...
user avatar
0 votes
1 answer
6 views

Adapting C++ Types in ROS Melodic

I'm trying to adapt a lot of code that already has data structures defined to ROS, so I decided to try using roscpp message adaptation since it seems like it could help make the transition easier. But ...
user avatar
0 votes
1 answer
17 views

Hi, I want to use the message filter in this example , I tried to register callback from a class member function as in the following code:

...
user avatar
0 votes
1 answer
11 views

get all the active namespaces rospy | roscpp

In my project, multiple robots may be spawned both at launch and at runtime, each under a certain namespace. Generally, that is 'robot_ID' where ID == a robot-...
user avatar
0 votes
1 answer
5 views

Question related to PoseArray and it's implementation

Hello, I need to implement Dijkstra's algorithm on a Map I have. Coding part of my problem is done, however I am having trouble saving the path in a geometry_msgs/PoseArray. Let's say I have an array(...
user avatar
0 votes
1 answer
2 views

minimum libraries required to run ROS

Hi everyone, I'm preparing to enable ROS on my own embedded developing ARM board. The board runs a customized version of Linux (not Ubuntu or other distros), with limited number of thirdparty ...
user avatar
0 votes
1 answer
7 views

error getMD5Sum in customized message type

Hi everyone, I am a newbie trying to create a customized message type but it always ends up with this error. I will appreciate greatly if someone can help out. I spent hours on this and don't know ...
user avatar
0 votes
1 answer
7 views

Packages roscpp and std_msgs

In tutorials of wikiros, roscpp, rospy and std_msgs become dependencies of our newly-created package. What I am wondering is what they provide for us. For example, I am writing a node, and in this ...
user avatar
0 votes
1 answer
2 views

python node bad interpreter

the c++ version is working but python shows the following : rosrun hello_world talker.py /opt/ros/lunar/bin/rosrun: /home/kamal/catkin_ws/src/hello_world/script/talker.py: usr/bin/env: bad ...
user avatar
0 votes
1 answer
5 views

Is it possible to use Boost 1.71 on Ros Melodic?

Platform: ROS Melodic on Debian Stretch. Hello, I am trying to create a package which uses a library that requires Boost 1.71 is it possible for me to install newer version of Boost and use it in a ...
user avatar
0 votes
1 answer
4 views

roscpp dependency error

Platform: ROS Melodic on Debian Stretch IDE: QtCreator Hello, I strictly followed installation guide and package creating tutorial on a fresh install of Debian Stretch for Ros Melodic to install my ...
user avatar
0 votes
1 answer
2 views

Where I can find a list of dependencies?

I don't know where find or what dependencies to use when I will create a package dependencies. It's possible create a depends? For example, in the Tutorial I see rospy, roscpp and std_msgs. Where I ...
user avatar
0 votes
1 answer
4 views

How to obtain time stamps for messages with no header

Hi all, I have a simple question. My problem is the following. I am listening to the move_base/cancel topic because I want to know the exact time at which a certain goal has been canceled. The message ...
user avatar
0 votes
1 answer
22 views

dumping parameters from c++ node

Hi all, I have a simple question but I can't seem to find a nice solution. My problem is the following: I have a YAML file that stores some parameters. These parameters are loaded into the parameter ...
user avatar
0 votes
1 answer
5 views

ros::Time::isValid doesn't do what we think it does?

From the documentation (http://docs.ros.org/melodic/api/rostime/html/classros_1_1Time.html#a84cd12a499c70fb3eefce89cda2b6113), ros::Time::isValid returns "whether or not the current time is valid....
user avatar
0 votes
1 answer
4 views

Is it possible to run a timer inside an action server?

Hi all, my question is rather theoretical and it's about best practice, I hope what I'm thinking about it's not completely useless. Let me introduce you the problem. Basically, I have a node which is ...
user avatar
0 votes
1 answer
9 views

if condition for approximate time subscriber

In my current code I subscribe to two topics using the Approximate time policy and suppose the callback is called callbackTwoTopics. Now there's this third that ...
user avatar

1
2 3 4 5
8