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

dannee's profile - activity

2024-03-21 23:41:19 -0500 received badge  Famous Question (source)
2024-03-21 23:41:19 -0500 received badge  Notable Question (source)
2023-12-18 11:26:44 -0500 received badge  Famous Question (source)
2023-08-27 10:11:34 -0500 received badge  Popular Question (source)
2023-08-11 08:30:45 -0500 asked a question Is it possible to add emulate_tty option in a yaml launch file?

Is it possible to add emulate_tty option in a yaml launch file? I know this option can be added when writing a launch fi

2023-06-14 01:22:07 -0500 received badge  Famous Question (source)
2023-06-14 01:21:48 -0500 received badge  Notable Question (source)
2023-06-14 01:21:48 -0500 received badge  Popular Question (source)
2023-03-23 10:09:24 -0500 received badge  Notable Question (source)
2023-03-13 03:51:11 -0500 asked a question Colcon test fails with "collection failure"

Colcon test fails with "collection failure" When I try and run the 'colcon test' command it fails with: Starting >&g

2022-11-21 06:54:06 -0500 received badge  Good Answer (source)
2022-11-18 11:08:38 -0500 commented answer ROS2 action goal canceling problem

I don't see why it isn't already supported. Can you explain more?

2022-09-27 22:53:34 -0500 received badge  Popular Question (source)
2022-09-19 01:52:37 -0500 commented answer Retrieve error message from timer callback when using MultiThreadedExecutor

Thank you!

2022-09-19 01:51:38 -0500 marked best answer Retrieve error message from timer callback when using MultiThreadedExecutor

Hi,

I'm not getting proper error messages when I use a timer in combination with a MultiThreadedExecutor. Instead of crashing and displaying which line the error occurred I'm just getting The following exception was not retrieved... Here is a minimal example:

import rclpy
from rclpy.node import Node
from rclpy.executors import MultiThreadedExecutor

class TimerNode(Node):

    def __init__(self):
        super().__init__('timer_test_node')
        self.timer = self.create_timer(
            0.1, 
            self.timer_callback,
        )

    def timer_callback(self):
        print("Timer callback called")
        variable

def main(*args, **kwargs):
    rclpy.init(*args, **kwargs)
    node = TimerNode(*args, **kwargs)

    executor = MultiThreadedExecutor(num_threads=4)
    executor.add_node(node)
    executor.spin()

if __name__ == '__main__':
    main()

Instead of crashing the following lines are repeated:

Timer callback called

The following exception was never retrieved: name 'variable' is not defined

Does anyone know how retrieve the exception and display the proper error message? It crashes as it should when using the default executor. It also crashes as it should when the error is not a timer callback function, i.e when called in a normal function.

2022-09-19 01:51:38 -0500 received badge  Scholar (source)
2022-09-19 01:36:51 -0500 commented answer [ros 2] How to create a non-node logger?

If anyone is looking for the python answer, it can be called with: rclpy.logging.get_logger(name)

2022-09-18 09:08:45 -0500 commented question Retrieve error message from timer callback when using MultiThreadedExecutor

I think we misunderstand each other. My problem is not what is causing the errors. It's about how errors are displayed i

2022-09-18 09:08:24 -0500 commented question Retrieve error message from timer callback when using MultiThreadedExecutor

I think we misunderstand each other. My problem is not what is causing the errors. It's about how errors are displayed i

2022-09-18 09:08:05 -0500 commented question Retrieve error message from timer callback when using MultiThreadedExecutor

I think we misunderstand each other. My problem is not what is causing the errors. It's about how errors are displayed i

2022-09-18 07:47:50 -0500 commented question Retrieve error message from timer callback when using MultiThreadedExecutor

@ravijoshi Thanks for your comment. However I know that my variable is not defined. It's not defined in order to crash t

2022-09-18 07:45:46 -0500 commented question Retrieve error message from timer callback when using MultiThreadedExecutor

@ravijoshi Thanks for your comment. However I know that my variable is not defined. It's not defined in order to crash t

2022-09-18 02:42:55 -0500 received badge  Enthusiast
2022-09-16 07:18:56 -0500 asked a question Retrieve error message from timer callback when using MultiThreadedExecutor

Retrieve error message from timer callback when using MultiThreadedExecutor Hi, I'm not getting proper error messages w

2022-09-14 01:20:45 -0500 commented question model loaded in gazebo is opaque grey

I had the same problem when using ubuntu in vmware. It can be solved with setting the following env variable: export SVG

2022-08-25 06:27:48 -0500 received badge  Notable Question (source)
2022-06-10 04:39:01 -0500 received badge  Nice Answer (source)
2022-06-03 04:33:45 -0500 received badge  Necromancer (source)
2022-06-03 04:33:45 -0500 received badge  Teacher (source)
2022-06-03 03:54:46 -0500 commented question ROS2 action goal canceling problem

@printf42 yes! see my answer to this question

2022-06-03 03:53:56 -0500 answered a question ROS2 action goal canceling problem

You can use the following structure for an action server/client. https://github.com/ros2/rclpy/blob/galactic/rclpy/rclp

2022-06-02 09:04:41 -0500 received badge  Popular Question (source)
2022-03-16 08:57:33 -0500 commented answer ROS2 action goal canceling problem

Is there any examples in python?

2022-03-16 08:55:34 -0500 commented question ROS2 action goal canceling problem

I would also like to know this. Did you find an answer? It seems straightforward in C++ but not in python

2022-03-16 08:55:07 -0500 commented question ROS2 action goal canceling problem

I would also like to know this. Did you find an answer?

2022-03-04 11:14:32 -0500 asked a question Wait for timer to stop in action callback

Wait for timer to end in action callback Hey, I want to send control inputs to a robot from an action callback at 15 ms

2022-03-04 11:14:32 -0500 answered a question Writing to GPIO pins on Raspberry Pi from ROS2 node

By using sudo you are using a different set of environmental variables. So you have to source the ros environment for th

2022-03-04 03:29:55 -0500 received badge  Supporter (source)
2022-03-04 03:28:49 -0500 received badge  Rapid Responder (source)