Questions tagged [thread]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1 vote
0 answers
32 views

Read topic message from subscription without executing callback

"Reading data from subscription without executing callback" is considered to be one of the common use cases of ROS 2. However, I wonder why there is less description about this use case in ...
takamine's user avatar
0 votes
0 answers
17 views

Data on real-time threads

I'd like to see a tutorial or baseline document covering optimization in Node. I learned that priority tasks or background tasks are performed depending on importance. Can you tell me where I can find ...
ertretff's user avatar
0 votes
0 answers
14 views

How to control a loop rate inside a node with RCLPY Rate object

I'm quite new to ros2 and I'm trying to understand how to control the rate of a loop inside the main method of an action server. There are many issues related to this topic but I think that none of ...
Antonio Bono's user avatar
0 votes
0 answers
32 views

Rospy subscriber calling only one thread

I am using python for programming the scripts in my ROS package, for a project. As part of the project, I need to implement a service client, which also subscribes to a topic. Specifically, the node ...
noobcoder's user avatar
0 votes
3 answers
433 views

Whats the common way to setup a websocket client in ROS2 robot?

Design Concept Questions As stated in the title, I am working on a robot that required to send out it state information (safety and monitoring purpose) to a remote backend server. Meanwhile, maintain ...
tcluk624's user avatar
0 votes
1 answer
19 views

arv_camera_new() doesn't open the camera when called within a nodelet

Platform Details: Ubuntu 14.04 LTS Linux Kernel 4.4.0-112-generic ROS Version: Indigo ROS Package: camera_aravis from here - https://github.com/linknum23/...
user avatar
0 votes
1 answer
1 view

Is different subscriber working like different thread?

For example, I want to subscribe to 2 topics ("/scan" and "/odometry") the "/scan" frequency is 10Hz, while the "/odometry" frequency is 50Hz. But in my program,...
user avatar
0 votes
1 answer
5 views

Subcriber callback's rate is lower then publisher's publish rate

Hi, I've been working on the implementation of a EKF and have been running into a strange issue. As some may be familiar the Kalman filter algorithm can be viewed as running two process. The Update ...
user avatar
0 votes
1 answer
4 views

rqt not updating text

Hello, we wrote our own rqt plugin which extends the rosbag functionality to our needs. We are using an *.ui design in rqt to give the user the ability to easily interact with the rosbag functionality....
user avatar
0 votes
1 answer
1 view

Redeclare loop_rate depending on boolean

Given this example, in which I want to decide via if which loop_rate to use when spinning ...
user avatar
0 votes
1 answer
5 views

Thread safe spinning with Mutex and boost::threads

I have several threads accessing the same function. To guarantee safe spinning, which means none of the threads calls ros::spinOnce() at the same time I used ...
user avatar
0 votes
1 answer
2 views

Does a callback complete before being called again?

Hi! Suppose I have a subscriber with a callback C. C manipulates a number of global variables and then calls a second method M, that builds a message from those global variables and publishes the ...
user avatar
0 votes
1 answer
18 views

killing a rosrun process using python script

Hi, I am writing a GUI interface to run nodes in ROS. The following code execute a rosrun process when pressing Button1. I looked for a code in order to kill that process when pressing Button 2. I did ...
user avatar
0 votes
1 answer
1 view

Boost::Thread and ROS Fuerte CMake help

Ok, so I am trying to utilize boost threads in a ROS application and I have been trying to figure out how to link boost to the the final exe. I keep finding conflicting ways on how to do this and not ...
user avatar
0 votes
1 answer
2 views

Sleeping thread after publishing a message into a topic

Hi, I've been using rosbridge and jroslib as an API to it. Testing the jroslib with the turtlesim, to publish messages I'm finding some errors. I have to use Thread.sleep(500) to the thread sleep so ...
user avatar
0 votes
1 answer
8 views

How to run a ROS service call in another thread with boost

Hi, my node as a class which calls a service. During that service call it needs to get notified by a topic. The callback is set up respectively. The problem is that during the service call no messages ...
user avatar
0 votes
1 answer
2 views

tf cannot find boost thread library

I am trying to build ros hydro from source on ubuntu 12.04 it requires boost 1.46.1 but the version of boost installed on my machine is 1.48 so I downloaded boost 1.46.1 and installed it in a local ...
user avatar
0 votes
1 answer
10 views

how to receive non-const shared_ptr without copies when publishing between nodelets?

I have several nodelets sharing a C++ class adapted to ROS message_traits. I'm publishing a non-const shared_ptr to other nodelets. The nodelets expecting a ConstPtr on the callback receive the same ...
user avatar
0 votes
1 answer
1 view

why to define ros::spin() in another thread?

Hey all, There is an example in actionlib tutorial: wiki.ros.org/actionlib_tutorials/Tutorials/SimpleActionClient(Threaded). In this example the ros::spin() command is used in another thread. Why ...
user avatar
0 votes
1 answer
1 view

Force rosmake to use parameters?

Hi! I'm trying to to use threading in RosAria.cpp, but I need to compile the cpp file using: "g++ thread.cpp -pthread -std=c++11 -Wl,--no-as-needed". How can I force rosmake to include the ...
user avatar
0 votes
2 answers
2 views

why is my code slower online than offline?

This is a rather intricate problem. I've spent quite some time on it already. First I'll describe the setup, then some observations, and some possible explanations. There is no precise question here, ...
user avatar
0 votes
1 answer
42 views

rospy and Tkinter - spin() and mainloop()

I want to write a rospy node that uses Python's GUI toolkit Tkinter, problem is that rospy.spin() and top.mainloop() are both blocking calls. I thought of starting one and setting an interrupt to ...
user avatar
0 votes
2 answers
2 views

ROS Qt Interrupted System Call On Plugin Startup

I've recently been working on a python widget for rqt that creates a separate thread to read joystick data in from a pipe. I've tested it as a standalone python ...
user avatar
0 votes
1 answer
1 view

Common callback function

Hi. I've a c++ thread that is checking every x seconds if some robots are active. For that, every robot publishes a topic (/robot1/status). So if the robot is publishing, I know that it is alive. For ...
user avatar
0 votes
1 answer
2 views

Assertion Failed when trying to publish on a ROS topic

Hello there, I'm building a generic bridge from YARP to ROS and I'm facing a little issue when dealing with the ROS->YARP side of the bridge. I basically launch two std::thread, and each thread ...
user avatar
0 votes
1 answer
14 views

ROS callbacks, threads and spinning

Hello, I have read some tutorials (such as http://www.ros.org/wiki/roscpp/Overview/Callbacks%20and%20Spinning) but I still have some doubts about ROS and callbacks: Let's say that: in my program I ...
user avatar
0 votes
1 answer
11 views

Issue with usb_cam, can't open camera

I wanna to test whether this usb_cam works. But get the error below. Anyone can help? THX!! ...
user avatar
0 votes
2 answers
4 views

Beginner tutorial - cannot run roscore

So I'm incredibly new to ROS (and I'm no Ubuntu master, either) and I've been following the beginner tutorial to the letter. When I try to run roscore (at the appropriate point) I get this print-out: <...
user avatar