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

adry's profile - activity

2021-06-14 11:40:58 -0500 received badge  Famous Question (source)
2020-12-06 09:58:15 -0500 received badge  Popular Question (source)
2020-12-06 09:52:33 -0500 asked a question Iterate between different action servers, until accept goal response is received

Iterate between different action servers, until accept goal response is received Hi there, I have a list of robot(Action

2020-11-07 06:30:42 -0500 asked a question Multiple action clients having access at the same action server, at the same time.

Multiple action clients having access at the same action server, at the same time. I'm trying to have different action c

2020-10-26 10:33:37 -0500 received badge  Taxonomist
2020-10-08 09:03:16 -0500 asked a question Issues when trying to install ros2 foxy un ubuntu 20.04

Issues when trying to install ros2 foxy un ubuntu 20.04 Hi there, I'm trying to install ros2 foxy in ubuntu 20.04, by fo

2020-08-21 10:20:39 -0500 received badge  Notable Question (source)
2020-08-20 17:03:34 -0500 received badge  Popular Question (source)
2020-08-20 05:46:03 -0500 asked a question How to call a python node within a program in cpp in Ros2

How to call a python node within a program in cpp in Ros2 Hi there, I've to call an action client from my behaviortree.c

2020-08-03 16:23:46 -0500 received badge  Famous Question (source)
2020-08-03 03:47:00 -0500 received badge  Enthusiast
2020-08-02 17:37:24 -0500 received badge  Notable Question (source)
2020-08-01 22:47:07 -0500 received badge  Notable Question (source)
2020-08-01 09:33:34 -0500 received badge  Popular Question (source)
2020-08-01 05:19:54 -0500 asked a question How to kill a subscription?

How to kill a subscription? I' ve a fleet of robot that are handled by a scheduler. Its services are also to add or remo

2020-07-30 09:54:44 -0500 marked best answer Reading data from different topics, using the same callback

I have to read data from topics having same name but different namespaces. e.g. node0/battery, node1/battery etc. so, my code is:

f  = open("./Nodelist.txt", "r")
nlist = f.read().splitlines()
for self.x in nlist:
     battery_lvl_listener = self.create_subscription(Float64,'' + str(self.x) + '/battery_lvl', self.battery_listener_callback,10)

def battery_listener_callback(self, msg):
        print("data read from: %s", self.x)

The problem is that self.x is always the same.

2020-07-30 09:54:44 -0500 received badge  Scholar (source)
2020-07-30 08:52:51 -0500 received badge  Supporter (source)
2020-07-30 08:42:52 -0500 received badge  Rapid Responder (source)
2020-07-30 04:23:06 -0500 received badge  Popular Question (source)
2020-07-29 16:51:38 -0500 asked a question Reading data from different topics, using the same callback

Reading data from different topics, using the same callback I have to read data from topics having same name but differe