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

rezenders's profile - activity

2023-07-06 01:34:56 -0500 commented answer ROS 2 pytest publisher "Destroyable" error

Thanks for the reply. I will try to do that as well. I also opened an issue in GitHub about this: https://github.com/ros

2023-07-05 07:11:38 -0500 commented question ROS 2 pytest publisher "Destroyable" error

any updates on this? I am getting the same error when running tests.

2023-07-05 05:30:01 -0500 commented question ROS 2 pytest publisher "Destroyable" error

any updates?

2023-06-06 15:43:30 -0500 received badge  Famous Question (source)
2023-06-06 15:43:30 -0500 received badge  Notable Question (source)
2023-03-14 10:12:26 -0500 received badge  Popular Question (source)
2023-03-14 10:01:29 -0500 marked best answer [Humble] Service call does nothing after second call when calling a goal from the callback

Hello,

I have a node where I want to call an action with send_async_goal from within a service callback. I implemented it as shown below. It works, but only one time. When I call the service /task/request from the cmd line it returns the right result without a problem. But when I call the service a second time it does nothing, the service returns but the callback is not excuted.

I was trying to do something similar earlier but calling a service (async) inside another service, it was also working only one time, but in this situation the service was hanging instead of returning. I had to change the service call to be sync for it to work.

Any ideas?

class TaskBridge(Node):
    ...
    client_cb_group = MutuallyExclusiveCallbackGroup()
    self.mros_action_client = ActionClient(
        self, ControlQos, '/mros/objective',
        callback_group=client_cb_group)

    task_cb_group = MutuallyExclusiveCallbackGroup()
    self.task_request_service = self.create_service(
        Task,
        'task/request',
        self.task_request_cb,
        callback_group=task_cb_group
    )

   def task_request_cb(self, req, res):
       ...
       future = self.mros_action_client.send_goal_async(goal_msg, feedback_callback=self.feedback_callback)
       while rclpy.spin_until_future_complete(self, future, timeout_sec=1.0):
           self.get_logger().info("Waiting for future to complete")
       return future.result().accepted

def main():
    rclpy.init(args=sys.argv)

    task_bridge_node = TaskBridge()

    executor = MultiThreadedExecutor()
    rclpy.spin(task_bridge_node, executor=executor)

    task_bridge_node.destroy_node()
    rclpy.shutdown()
2023-03-14 10:01:24 -0500 answered a question [Humble] Service call does nothing after second call when calling a goal from the callback

Changed: while rclpy.spin_until_future_complete(self, future, timeout_sec=1.0): To: while self.executor.spin_until

2023-02-02 13:50:05 -0500 asked a question [Humble] Service call does nothing after second call when calling a goal from the callback

[Humble] Service call does nothing after second call when calling a goal from the callback Hello, I have a node where I

2023-01-03 05:08:30 -0500 received badge  Famous Question (source)
2023-01-03 05:08:30 -0500 received badge  Popular Question (source)
2023-01-03 05:08:30 -0500 received badge  Notable Question (source)
2022-12-14 11:21:48 -0500 commented question ROS2 Declaring Dictionary Parameter Python

Any updates on this?

2022-11-19 11:17:53 -0500 received badge  Famous Question (source)
2022-10-21 03:39:19 -0500 commented question Complete coverage planner for ROS2

I am also interested in this, did you find anything?

2022-09-04 13:00:09 -0500 received badge  Famous Question (source)
2022-09-04 13:00:09 -0500 received badge  Notable Question (source)
2022-07-20 17:13:49 -0500 received badge  Famous Question (source)
2022-07-04 06:39:06 -0500 received badge  Notable Question (source)
2022-05-20 03:22:49 -0500 marked best answer ament_cmake vs ament_python?

I just started learning ros2 and I want to create a new package, and I noticed that it is possible to create a package with 2 different build types, ament_cmake and ament_python. However, I didn't find any explanation about the difference between both, what are the advantages and disadvantages of each one? Is one meant for c++ and the other for python?

I am following this tutorial: https://index.ros.org/doc/ros2/Tutori...

2022-05-18 13:48:51 -0500 received badge  Notable Question (source)
2022-05-18 10:16:26 -0500 commented answer Unable to build ROS Foxy for armv7

That makes sense. Thanks!

2022-05-18 08:56:35 -0500 commented answer Unable to build ROS Foxy for armv7

Maybe building a smaller image would help? From what I understood, it builds all this packages: https://raw.githubuserco

2022-05-18 06:55:03 -0500 commented answer Unable to build ROS Foxy for armv7

Maybe building a smaller image would help? From what I understood, it builds all this packages: https://raw.githubuserco

2022-05-18 06:43:39 -0500 commented answer Unable to build ROS Foxy for armv7

Maybe building a smaller image would help? From what I understood, it builds all this packages: https://raw.githubuserco

2022-05-18 05:25:03 -0500 commented answer Unable to build ROS Foxy for armv7

Maybe building a smaller image would help? From what I understood, it builds all this packages: https://raw.githubuserco

2022-05-18 05:24:20 -0500 commented answer Unable to build ROS Foxy for armv7

Maybe building a smaller image would help? From what I understood, it builds all this packages: https://raw.githubuserco

2022-05-18 05:23:52 -0500 commented answer Unable to build ROS Foxy for armv7

Maybe build a smaller image would help? From what I understood, it is build all this packages: https://raw.githubusercon

2022-05-18 05:23:42 -0500 commented answer Unable to build ROS Foxy for armv7

Maybe build a smaller image would help? From what I understood, it is build all this packages: https://raw.githubusercon

2022-05-18 05:23:33 -0500 commented answer Unable to build ROS Foxy for armv7

Maybe build a smaller image would help? From what I understood, it is build all this packages: https://raw.githubusercon

2022-05-18 05:16:22 -0500 commented answer Unable to build ROS Foxy for armv7

Maybe build a smaller image would help? From what I understood, it is build all this packages: https://raw.githubusercon

2022-05-18 04:59:15 -0500 commented answer Unable to build ROS Foxy for armv7

I have to say that the docker container created from this image seems slower when running in the raspberry pi 3. For exa

2022-05-16 11:56:04 -0500 commented answer Unable to build ROS Foxy for armv7

Thanks for your answer. I tried replicating what you posted, but I am getting an error. It seems that docker is using u

2022-05-12 03:18:23 -0500 received badge  Popular Question (source)
2022-05-11 06:03:52 -0500 edited question [ROS2] time.sleep() in a node

[ROS2] time.sleep() in a node Basically, I want to do the same thing as described in this other question but in ROS2: ht

2022-05-11 05:13:25 -0500 received badge  Popular Question (source)
2022-05-11 04:39:12 -0500 edited question [ROS2] time.sleep() in a node

[ROS2] time.sleep() in a node Basically, I want to do the same thing as described in this other question but in ROS2: ht

2022-05-11 04:38:38 -0500 asked a question [ROS2] time.sleep() in a node

[ROS2] time.sleep() in a node Basically, I want to do the same thing as described in this other question but in ROS2: ht

2022-05-11 02:51:22 -0500 marked best answer [ROS2] Service call keeps waiting for the service to be available

Using ubuntu 20.04 + ROS2 foxy

I am trying to call a service from mavros package with ros2, but it gets stuck in waiting for service to become available... I am pretty the service is available. I can see it with ros2 service list. Is this a bug with ros2? foxy? I saw some issues on github about people complaining about bugs depending on the DDS, can this be related?

service call:

ros2 service call /mavros/cmd/arming mavros_msgs/srv/CommandBool '{value: True}'
waiting for service to become available...

ros2 service list:

ros2 service list -t | grep cmd
/mavros/cmd/arming [mavros_msgs/srv/CommandBool]
/mavros/cmd/command [mavros_msgs/srv/CommandLong]

Issue on github related to this: https://github.com/mavlink/mavros/iss...

2022-05-11 02:49:32 -0500 commented question [ROS2] Service call keeps waiting for the service to be available

I updated and restarted my computer and it worked...

2022-05-10 12:10:38 -0500 asked a question [ROS2] Service call keeps waiting for the service to be available

[ROS2] Service call keeps waiting for the service to be available Using ubuntu 20.04 + ROS2 foxy I am trying to call a

2022-04-21 09:57:43 -0500 received badge  Notable Question (source)
2022-04-21 09:57:43 -0500 received badge  Famous Question (source)
2022-04-12 10:30:51 -0500 received badge  Famous Question (source)
2022-04-12 10:30:51 -0500 received badge  Popular Question (source)
2022-04-12 10:30:51 -0500 received badge  Notable Question (source)
2022-03-17 22:02:48 -0500 received badge  Good Question (source)
2022-01-12 08:16:57 -0500 received badge  Nice Question (source)
2021-12-22 14:18:06 -0500 received badge  Famous Question (source)