ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

volume_8091's profile - activity

2021-03-16 08:06:13 -0500 marked best answer how to execute service while getting subscriber messages

I want to build a service to move to a particular point on a line. The problem is when I receive my service call, the thread is stuck in this callback and so global spinner in another thread does not process callback queue. I have read some handy advice in a related question, however I see no way to use multithreaded or async spinner elegantly in my case.

Omitting some irrelevant details, I have two nodes that give me odometry and expect twist respectively, thus managing an engine. As a backbone of my node I have a software PID regulator, that tells me what speed I should set in twist for a good speed profile based on current goal and current odometry. I used three std::thread's: to run the service's callback, to publish twist on odometry callback and to run spinOnce() with some loop rate. As soon as I stop in service callback (locked by a mutex set in PID regulator until I reach destination), odometry callback is never triggered.

I could implement my own child class from ros::Spinner that could process my service calls asynchronously and all other messages synchronously, but that sounds like overengineering for such a primitive system. What am I missing?

2021-03-16 08:02:46 -0500 answered a question ros2 topic empty with fastdds discovery server

I do not know exact mechanics of daemon caching data, but I sometimes see incomplete or even empty ros2 topic list, ros2

2020-12-10 07:50:54 -0500 received badge  Student (source)
2020-12-08 07:45:45 -0500 received badge  Famous Question (source)
2020-04-26 05:52:56 -0500 received badge  Famous Question (source)
2020-02-15 05:16:47 -0500 received badge  Notable Question (source)
2019-08-09 09:55:31 -0500 received badge  Famous Question (source)
2019-08-09 09:55:31 -0500 received badge  Notable Question (source)
2019-08-09 09:55:31 -0500 received badge  Popular Question (source)
2019-04-04 03:47:43 -0500 received badge  Popular Question (source)
2019-04-02 04:28:29 -0500 commented answer undefined reference to actionlib::GoalIDGenerator::GoalIDGenerator()

You saved my day

2019-04-01 08:00:13 -0500 asked a question how to execute service while getting subscriber messages

how to execute service while getting subscriber messages I want to build a service to move to a particular point on a li

2019-03-22 06:39:43 -0500 commented answer Workflow for CLion and ROS

Thank you for the link on CMake/package.xml differences. I agree that working with distributed metadata is hardly seen i

2019-03-22 06:05:41 -0500 commented answer Workflow for CLion and ROS

My bad, find_package is a standard CMake part indeed. Things like add_action_files and catkin_add_gtest can be considere

2019-03-22 05:15:54 -0500 answered a question Workflow for CLion and ROS

As far as I understand, you are not missing anything. The core problem with ROS workflow is that ROS is still very imma

2019-03-20 09:49:37 -0500 received badge  Enthusiast
2019-03-01 07:26:27 -0500 asked a question Service with thread-safe request queue

Service with thread-safe request queue I am using smach for developing logic of my system and my automata work in event-

2019-02-13 05:44:53 -0500 commented answer pycharm setup

Surprisingly, PyCharm run from the terminal works fine, while patching .desktop with -i -c options does not enable PyCha

2019-02-13 01:00:52 -0500 received badge  Notable Question (source)
2019-02-11 02:52:59 -0500 commented answer How can I update/remove cmake without partially deleting my ROS distribution?

thanks, worked like a charm for me on Ubuntu 16.04.05

2019-01-28 11:22:54 -0500 received badge  Famous Question (source)
2019-01-28 02:58:30 -0500 marked best answer precise timing with rosbag or an alternative

The beginner's tutorial reads, that rosbag may be not precise when it comes to the timing. Some tasks I face are not Lyapunov stable, so precise data playback is necessary.

1) Could rosbag be precise with the usage of advanced technical hacks? E.g. RAM-disk as a bag file destination and dedicated CPU core for recording/playing. Are there any ROS directives/modes for precise timing?

2) Are there alternative means of recording and playing messages and requests/responses with precise timing (95% <1ms)? Unfortunately, some non-trivial data like camera output might be involved.

For simplicity let's assume we work with a single machine to avoid network latency issues.

ROS Kinetic, Ubuntu 16.04.05 x64.

2019-01-28 02:57:43 -0500 received badge  Popular Question (source)
2019-01-24 05:53:19 -0500 commented answer cpp publisher/subscriber tutorial loosing some messages

@Alberto E. As a final note, could you share a piece of advice on how to look up the names of subscribers? This could en

2019-01-24 05:29:00 -0500 commented answer cpp publisher/subscriber tutorial loosing some messages

@Alberto E. As a final note, could you share a piece of advice on how to look up the names of subscribers? This could en

2019-01-24 05:25:20 -0500 received badge  Supporter (source)
2019-01-24 05:24:40 -0500 commented answer cpp publisher/subscriber tutorial loosing some messages

Not only did your solution work, but it is also much more reliable and avoids ugly guess-waiting-time question.

2019-01-24 05:23:38 -0500 marked best answer cpp publisher/subscriber tutorial loosing some messages

I was following the tutorial) and faced the following problem: some messages (usually 3) are lost when doing the sequence:

  1. start talker
  2. start listener
  3. stop talker
  4. start talker

For example, an output like this is produced in the talker window:

$ rosrun beginner_tutorials talker 
[ INFO] [1548238652.003693516]: hello world 0
[ INFO] [1548238652.103993652]: hello world 1
[ INFO] [1548238652.203964623]: hello world 2
[ INFO] [1548238652.304064752]: hello world 3
[ INFO] [1548238652.404034941]: hello world 4
...

While in the listener window only latter are shown:

[ INFO] [1548238652.304599291]: I heard: [hello world 3]
[ INFO] [1548238652.404490112]: I heard: [hello world 4]
[ INFO] [1548238652.504314152]: I heard: [hello world 5]
...

There is no such problem with the Python publisher/subscriber, not even a single message was lost.

ROS Kinetic, Ubuntu 16.04.05 x64 (run under VirtualBox with Win7 x64 as a host). No original files were changed, just copy and paste from the tutorials.

2019-01-24 05:23:38 -0500 received badge  Scholar (source)
2019-01-24 05:21:47 -0500 asked a question precise timing with rosbag or an alternative

precise timing with rosbag or an alternative The beginner's tutorial reads, that rosbag may be not precise when it comes

2019-01-24 04:56:08 -0500 received badge  Notable Question (source)
2019-01-24 02:00:56 -0500 commented question cpp publisher/subscriber tutorial loosing some messages

@curi_ROS increasing queue size from 1000 to 10,000 did not give any difference. As only 3 messages were lost, buffer si

2019-01-24 01:57:46 -0500 answered a question cpp publisher/subscriber tutorial loosing some messages

As @mali suggested, the problem was in time to initialize the publisher (actually, it took up to 30 milliseconds). Addin

2019-01-23 10:01:39 -0500 received badge  Popular Question (source)
2019-01-23 05:07:54 -0500 asked a question cpp publisher/subscriber tutorial loosing some messages

cpp publisher/subscriber tutorial loosing some messages I was following the tutorial and faced the following problem: so