ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
2020-09-18 13:33:19 -0500 | received badge | ● Teacher (source) |
2020-09-18 13:33:19 -0500 | received badge | ● Self-Learner (source) |
2019-01-28 03:45:23 -0500 | received badge | ● Famous Question (source) |
2019-01-01 06:47:37 -0500 | received badge | ● Notable Question (source) |
2018-08-12 14:01:43 -0500 | received badge | ● Popular Question (source) |
2018-08-12 12:42:52 -0500 | marked best answer | ROS2 C++ Re-Created Subscriber Not Listening I'd like to be able to disable a subscription temporarily, but as far as I know, the Subscription<t> type does not support that. Rather than use I've been seeing a lot of cases of dropped communications, where I need to restart my C++ application to get it to start listening again, which kind of defeats the purpose of trying to do this. I've put together a minimal test case, included below. The node subscribes to channel A and publishes every second on channel B. You can run two instances built with different topic names or run a python script to work in tandem with it, the result will be the same, as far as I can tell (I've tried both). If any command line arguments are given, then after publishing, the node has a 20% chance of resetting its subscriber and creating a new one. Running this, against another node to publish and listen, this is what I find:
I would expect that destroying and re-creating the subscription would reconnect and continue listening as it does in the case where it's never destroyed. So, is this an incorrect use of ROS, or is it a bug? If I am using subscriptions incorrectly, what is the correct way to achieve the effect I want? One of the things my application does is allow users to change the topics at runtime, so if they change to topic from A to B, and then back to A, isn't that going to yield the same behavior I am seeing here? System Details:
|
2018-08-12 12:42:42 -0500 | commented answer | ROS2 C++ Re-Created Subscriber Not Listening Done https://github.com/eProsima/Fast-RTPS/issues/246 |
2018-08-11 22:52:39 -0500 | answered a question | ROS2 C++ Re-Created Subscriber Not Listening I noticed that this didn't appear to be an issue on the Windows side of my machine. Sure enough, specifying OpenSplice f |
2018-08-11 15:29:01 -0500 | asked a question | ROS2 C++ Re-Created Subscriber Not Listening ROS2 C++ Re-Created Subscriber Not Listening I'd like to be able to disable a subscription temporarily, but as far as I |
2018-08-01 04:20:19 -0500 | received badge | ● Famous Question (source) |
2018-06-18 05:07:42 -0500 | received badge | ● Famous Question (source) |
2018-04-20 07:19:37 -0500 | received badge | ● Taxonomist |
2018-03-29 01:55:11 -0500 | received badge | ● Notable Question (source) |
2018-03-27 14:00:22 -0500 | received badge | ● Notable Question (source) |
2018-02-05 02:14:31 -0500 | received badge | ● Popular Question (source) |
2018-01-17 22:45:44 -0500 | received badge | ● Popular Question (source) |
2018-01-17 22:38:01 -0500 | commented answer | [ros2] ros2 run [package] [executable] cannot find executable Right now i'm just trying to get the migration to work on Ubuntu; step two will be to try it all on Windows. Was there s |
2018-01-17 22:37:41 -0500 | marked best answer | [ros2] ros2 run [package] [executable] cannot find executable I have a C++ project which consists of a number of packages that I'm migrating from ROS1 to ROS2; under ROS1 with catkin, I could build the project with I have installed ROS2 as per the binary install instructions https://github.com/ros2/ros2/wiki/Lin... I have a workspace with my project cloned into it, and I believe I've finished migrating all of the package.xml and CMakeLists.txt files. The project can be built fully and the executable and libraries get put into the install directory as expected. Unfortunately, after sourcing ./install/local_setup.bash (/opt/ros/ardent/setup.bash was sourced before building), the call If I source the argcomplete setup in /opt/ros/ardent, I can try to tabcomplete after typing I don't know what I have set up incorrectly. Package.xml CMakeLists.txt (more) |
2018-01-17 22:37:39 -0500 | commented answer | [ros2] ros2 run [package] [executable] cannot find executable Right now i'm just trying to get the migration to work on Ubuntu; step two will be to try it all on Windows. |
2018-01-17 19:12:56 -0500 | asked a question | [ros2] ros2 run [package] [executable] cannot find executable [ros2] ros2 run [package] [executable] cannot find executable I have a C++ project which consists of a number of package |
2018-01-17 19:00:04 -0500 | marked best answer | [ros2/rclcpp] Threadsafety of Node::create_publisher<> I can't find any documentation of whether or not creating and working with nodes is threadsafe in rclcpp. My specific use case is that I would like to create node A <- In thread 1 rclcpp::spin(A) <- in thread 2 Add/remove publishers/subscribers <- In thread 1 A link to the documentation on this topic or a direct answer would be appreciated. |
2018-01-17 19:00:04 -0500 | received badge | ● Scholar (source) |
2018-01-17 17:46:17 -0500 | received badge | ● Student (source) |
2018-01-17 13:42:17 -0500 | asked a question | [ros2/rclcpp] Threadsafety of Node::create_publisher<> [ros2/rclcpp] Is threadsafety of Node::create_publisher<> I can't find any documentation of whether or not creatin |