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

mjbogusz's profile - activity

2022-12-23 13:18:54 -0500 received badge  Nice Question (source)
2022-01-08 15:36:50 -0500 received badge  Student (source)
2021-11-23 05:40:45 -0500 commented question Inappropriate ioctl on SPI when using launch, works using run

Also, for anyone coming across this thread: I haven't found the underlying issue - I suspect there's a conflict in acces

2021-11-23 05:39:06 -0500 commented question Inappropriate ioctl on SPI when using launch, works using run

@Nur92 this is totally out of scope of the original question, next time just post one of your own, you'll get better ans

2021-11-22 07:13:10 -0500 received badge  Famous Question (source)
2021-11-22 07:13:10 -0500 received badge  Notable Question (source)
2021-09-29 19:12:35 -0500 received badge  Taxonomist
2021-09-14 20:16:27 -0500 received badge  Popular Question (source)
2021-08-03 16:58:56 -0500 commented question Problem publish and record big data

Can you try using the foxy-future branch of ros2bag? Just clone https://github.com/ros2/rosbag2/tree/foxy-future to your

2021-07-24 10:29:18 -0500 edited question Inappropriate ioctl on SPI when using launch, works using run

Inappropriate ioctl on SPI when using launch, works using run Short version: Calling the SPI transfer IOCTL works as in

2021-07-24 10:29:18 -0500 received badge  Editor (source)
2021-07-24 10:26:58 -0500 asked a question Inappropriate ioctl on SPI when using launch, works using run

Inappropriate ioctl on SPI when using launch, works using run Short version: Calling the SPI transfer IOCTL works as in

2021-03-09 01:55:24 -0500 received badge  Famous Question (source)
2021-02-16 04:00:36 -0500 commented answer [ROS2] Communication across multiple local users

I've chosen this answer as the solution as, IMO, it's the least workaround-ish one we have at this time and because this

2021-02-16 03:52:39 -0500 marked best answer [ROS2] Communication across multiple local users

Is there a way of communicating between 2 ROS2 processes/nodes on the same machine but being run as 2 different users?

My specific use case is one process/node run as root (for interfacing with a piece of hardware) and one as a regular user. However, the two nodes cannot seem to communicate with each other or even 'see' each other, as in: the node nor its topics are not visible via ros2 node list/ros2 topic list.

I've narrowed it down to two nodes running as different users on the same machine - I've spun up a fresh Ubuntu 20.04 Server VM (linux 5.4.0, x86_64), installed ROS2 Foxy, added 2 users and confirmed that ros2 run demo_nodes_cpp talker does not communicate with ros2 run demo_nodes_cpp listener (across different users - running as one user works as expected).

The same test on a Ubuntu 18.04 & ROS2 Eloquent box works as expected, ie the listener receives messages from the talker...

What's peculiar, the /rosout topic on one user shows the logs printed by the node run as the other one (or at least some, I wasn't able to replicate this with the demo/example nodes - perhaps due to log severity being too low).

I've verified that the multicast test (ros2 multicast send/receive) between the users passes successfully.

2021-02-16 03:52:19 -0500 received badge  Enthusiast
2021-02-11 01:01:40 -0500 received badge  Notable Question (source)
2021-02-10 10:55:29 -0500 received badge  Popular Question (source)
2021-02-10 10:00:52 -0500 received badge  Favorite Question (source)
2021-02-08 06:50:16 -0500 asked a question [ROS2] Communication across multiple local users

[ROS2] Communication across multiple local users Is there a way of communicating between 2 ROS2 processes/nodes on the s

2018-02-25 03:04:08 -0500 received badge  Famous Question (source)
2017-11-03 22:17:02 -0500 received badge  Notable Question (source)
2017-10-18 12:16:43 -0500 received badge  Supporter (source)
2017-10-18 12:16:34 -0500 marked best answer ROS2: subscription/service/timer callbacks not being called

TL;DR:

rclcpp::Node-inheriting class registers some subscribers, services and a timer in its constructor; not a single callback is being called (apparently).

Details

I've recently refactored a working (4 nodes, C++) but non-composable code [1] (global function callbacks etc) into rclcpp::Node-inheriting classes, so that they can be run together.

The code structure is just like in demos/examples - nodes pass their names to super constructors, initialize whathever they're responsible for (e.g. sensors) and register subscriptions, services and timers. For running them separately I've created simple entry points just like in the examples - auto node = std::make_shared<NodeClass>(args...) and then rclcpp::spin(node).

Now, while one of the nodes [2] that only publishes data works as intended, the other one [3] that listens for data/requests does not (note that both register a timer!). As you can see in the code, I've added couts in the beggining of every callback function.

The expected behaviour would be some outputs from the node's constructor and at least one output from the timer callback (Loop!), however, the latter does not happen. There's no output from any subscription/service callback either (they're called from a separate control app/node [4]).

I've tried disabling most callbacks to reduce the case to the simplest one, but it didn't solve the issue.

More info

C++ nodes are being run on a BeagleBone Green Wireless, Python node is being run on a x86_64 laptop, both connected to the same WiFi.

In both cases I'm using ROS2 Beta 3 compiled from source.

Entry points

They're located in main.cpp files of their respective packages, right next to the Node class files.

  1. Working node [5] (rclcpp::shutdown() was disabled for testing only)
  2. Not working node [6]

Refs

  1. https://github.com/GroupOfRobots/RysR...
  2. https://github.com/GroupOfRobots/RysR...
  3. https://github.com/GroupOfRobots/RysR...
  4. https://github.com/GroupOfRobots/RysR...
  5. https://github.com/GroupOfRobots/RysR...
  6. https://github.com/GroupOfRobots/RysR...

Edit1: added 'Entry points' section and links

2017-10-18 12:16:34 -0500 received badge  Scholar (source)
2017-10-16 17:26:47 -0500 received badge  Popular Question (source)
2017-10-16 15:48:49 -0500 commented question ROS2: subscription/service/timer callbacks not being called

They're right next to their respective *Node class files - I've updated the question to include links to them.

2017-10-16 15:47:13 -0500 edited question ROS2: subscription/service/timer callbacks not being called

ROS2: subscription/service/timer callbacks not being called TL;DR: rclcpp::Node-inheriting class registers some subscri

2017-10-16 13:46:56 -0500 asked a question ROS2: subscription/service/timer callbacks not being called

ROS2: subscription/service/timer callbacks not being called TL;DR: rclcpp::Node-inheriting class registers some subscri