Questions tagged [multi-thread]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
0 answers
13 views

MicroROS and Multithreading - freeRTOS vs Zephyr

I would like to get to know MicroROS. Therefore I worked with one of the recommended boards (Olimex STM32-E407) for the last weeks. And I have a few questions. I really want to know if MicroROS is ...
Johannes's user avatar
0 votes
0 answers
24 views

Multiple publishers and a timer to publish tf in the same node is leading to crash

Description I have a node that publishes 2 topics and a timer to publish TF using ros-noetic. However this setup throws an exception: ...
ignacio's user avatar
  • 125
0 votes
0 answers
20 views

Executor multithread doesnt work

Im having problems to execute tasks from 2 nodes using the multithreadExecutors and the call_back groups. I'm running 1 node with 2 classes: ...
Juan Miguel Sequeira Da Silva's user avatar
0 votes
1 answer
11 views

I'm confused with callback_groups and threads

Hi, I want to get a value from a topic and after perform some operations on the value retrieved (can't be in the callback function). I imagine a subscriber and this simple loop (python) ...
SebL's user avatar
  • 31
0 votes
1 answer
10 views

ros::ok() and ros::isShutingDown() and thread

I used ros::ok and ros::isShuttingDown inside a thread to find out if the user closed roscore in the terminal by pressing Cnrl+C. However, when I do that, the values of those to function do not change,...
user avatar
0 votes
1 answer
45 views

Do Timers run in different threads? [roscpp]

I'm wondering if I'm setting up different timers, do they run in different threads using roscpp? The background is that one Timer callback is taking a longer time to be executed and, therefore, I want ...
user avatar
0 votes
1 answer
292 views

ROS2 Best practices: multiple nodes in the same process

Hi, I was wondering if there are any best practices for implementing multiple ROS2 nodes in the same process. So far I see the following options: std::thread / pthread SingleThreadedExecutor ...
user avatar
0 votes
1 answer
1 view

roscpp service calls - multithreading

I have a service created in C++ that only handles one request at a time. Normally this would not be a problem, but my service is computing a Descartes trajectory, which takes somewhere between 3-8 ...
user avatar
0 votes
1 answer
5 views

Increase thread count of Asyncspinner? (Multi-threading)

Hey guys, I have a world_node which offers a service to register_new_robot. Once called, the service creates a new C++ object ...
user avatar
0 votes
1 answer
13 views

how to write a thread in ROS

I would like to know how to write a async thread in ROS. An example would be greatly appreciated. Edwin Originally posted by elthef on ROS Answers with karma: 26 on 2015-09-21 Post score: 1
user avatar
0 votes
1 answer
18 views

How implement a multi-threaded ROS node with callbacks not being subscribers?

I would like to implement a node which listens to a TCP socket which receives asynchronous data, converts it into messages and publishes the latest of these messages at a fix rate in a topic. The best ...
user avatar
0 votes
1 answer
3 views

How to run ros::spin in the background

Hi, I have a qt application and which has many Callbacks. As I dont have and infinite loop, I can't write ros::spin(). I would like to have ros::spin() or spinonce() in the background. How can i ...
user avatar
0 votes
1 answer
3 views

ROS multi thread c++

I developed two separate program and tested them. One program is for socket communication with external network the other one is for internal ros work. But then I add the first program as thread into ...
user avatar
0 votes
1 answer
1 view

multi-threading -> cholesky factorization error, rospy

Hello All, I have two callbacks within a class that share the same data in python. Is it possible that these callbacks are altering the data at the same time? I am getting an error while trying to ...
user avatar
0 votes
1 answer
7 views

Multithreaded RViz?

When running Movit on my desktop, RViz cannot show smoothly arm trajectories. Well, it looks cool at the beginning, but after 2 or 3 extra plannings/executions, CPU load reaches 100% and arm ...
user avatar
0 votes
1 answer
7 views

ROS MultiThreading example

Hello, I'm currently working on a node that provides a service to other nodes but I noticed that being a server blocks the execution of the node until a Request. As my node needs to handle some ...
user avatar
0 votes
1 answer
10 views

How to make a class with publisher and subscriber which is a member of another class

Let's assume I have class cA, which has a node that subscribe from topic and publisher with a "constant" frequency. Class cA is a mamber of class cB. Where I should put "while(ros::ok())...
user avatar
0 votes
2 answers
7 views

Ros threading to have multiple processes?

So basically, what I want to have is this: Have ROS collect data, and process this data into a vector. (This is done) Once the data has been recorded, write the vector to a text file (Not done) The ...
user avatar
0 votes
1 answer
3 views

Should I use a lock on resources in a listener node with multiple callbacks?

If I have a node which listens to multiple topics & has a callback for each topic, should I need locks/mutexes on the resources that are changed by more than one callback? My question stems from ...
user avatar
0 votes
1 answer
1 view

Calling ros::spin from a new Thread

Hi there, i have a strange problem with ROS. I am trying to subscribe to a ros topic in my application. Since the spin-method blocks the application i just started a new thread and tried to subscribe ...
user avatar
0 votes
1 answer
6 views

Multiple nodelets?

I need to create an application that subscribes to messages from topic A and publishes to topic B based on the message received from A. While waiting for messages from A, it should publish default ...
user avatar
0 votes
1 answer
1 view

multi-threaded rospy.get_param() crashes: CannotSendRequest and ResponseNotReady

Hi all, I work with the sushi repository from the ICRA Mobile Manipulation Challenge. When instantiating the ArmMover I get "CannotSendRequest" and "ResponseNotReady" exceptions. ...
user avatar
0 votes
2 answers
2 views

ROS Answers SE migration: ROS Real Time

Hi everybody. I just controlled two motors using ROS, however it is not a real time process. I am just wondering what is the best easy way to make a pthread that runs in real time, which control the ...
user avatar
0 votes
1 answer
1 view

pthread-related crashes

Hi all, I'm running ROS electric on a 24-core machine and having some issues with pthread under specific conditions. I use a class named ObjectTracker to handle ROS callbacks and sometimes use pthread ...
user avatar
0 votes
1 answer
8 views

Execute loops in multiple nodes at the same time?

Hello, I have a system that has two ROS nodes, each with a while loop that waits for a certain amount of time to pass. However, when the first node enters its loop, the rest of the system freezes ...
user avatar
0 votes
1 answer
10 views

Nodelet multi-threading example

Hi all, I am finding a way to separate some heavy load process into some standalone threads so that I could get other callbacks in time using nodelet. I looked at the nodelet wiki page but it has few ...
user avatar
0 votes
2 answers
10 views

Multi-threading

Hi all, I'm running Ubuntu on a 12-core machine. I was wondering whether there's any sort of automatic multi-threading support built into ROS. For instance, if I'm running two packages at the same ...
user avatar