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

__Jeremy__'s profile - activity

2023-07-14 10:24:17 -0500 received badge  Famous Question (source)
2023-05-09 03:58:51 -0500 received badge  Good Question (source)
2023-03-17 03:45:27 -0500 received badge  Nice Question (source)
2022-06-27 04:08:48 -0500 received badge  Nice Question (source)
2022-05-09 07:12:03 -0500 received badge  Notable Question (source)
2022-05-05 01:40:51 -0500 received badge  Popular Question (source)
2022-05-03 10:01:09 -0500 asked a question ROS2 Foxy: Nodes can't find each other if a new device is added to network after starting node

ROS2 Foxy: Nodes can't find each other if a new device is added to network after starting node Hello everyone, we have

2022-02-19 02:44:57 -0500 received badge  Famous Question (source)
2022-02-16 12:27:14 -0500 received badge  Notable Question (source)
2022-02-15 23:08:32 -0500 received badge  Popular Question (source)
2022-02-15 11:02:32 -0500 asked a question Running ROS2 foxy in a docker container

Running ROS2 foxy in a docker container Hello everyone, I try to run the the ROS2 wrapper from stereolabs https://githu

2021-10-22 08:10:45 -0500 received badge  Famous Question (source)
2021-09-10 11:40:45 -0500 commented answer Debugging ROS 2 cpp node with vs code starting the node with a launch file

Okay I found a solution by myself. Maybe I should put more effort in finding a solution before asking questions :-D: htt

2021-09-10 11:21:51 -0500 commented answer Debugging ROS 2 cpp node with vs code starting the node with a launch file

The only thing which still grinds my gears is that I wasn't able to start everything with a single launch command. So wh

2021-09-10 11:14:26 -0500 commented answer Debugging ROS 2 cpp node with vs code starting the node with a launch file

Thanks Per for your answer. It worked. I used this in my launch file: Node( package="test_package", exe

2021-09-10 11:13:58 -0500 commented answer Debugging ROS 2 cpp node with vs code starting the node with a launch file

Thanks Per for your answer. It worked. I used this in my launch file: enter code here Node( package="vehi

2021-09-10 11:12:39 -0500 commented answer Debugging ROS 2 cpp node with vs code starting the node with a launch file

Thanks Per for your answer. It worked. I used this in my launch file: return LaunchDescription([ Node( pack

2021-09-10 11:12:25 -0500 commented answer Debugging ROS 2 cpp node with vs code starting the node with a launch file

Thanks Per for your answer. It worked. I used this in my launch file: return LaunchDescription([ Node( pack

2021-09-10 11:11:17 -0500 commented answer Debugging ROS 2 cpp node with vs code starting the node with a launch file

Thanks Per for your answer. It worked. I used this in my launch file: return LaunchDescription([ Node( pack

2021-09-04 00:29:44 -0500 received badge  Notable Question (source)
2021-08-30 11:24:03 -0500 received badge  Popular Question (source)
2021-08-27 11:59:18 -0500 marked best answer ROS2 respawn

Hello ROS2 community,

I'm currently playing around with the best way to respawn a node (ROS2 foxy). My current solution exists of two files (see below). The first file ("test_package_launch.py") defines the generate_launch_description() method. This file is invoked with "ros2 launch test_package test_package_launch.py". Within the launch file the ExecuteProcess invokes the second file ("test_package_respawn.py").

So far everything works fine and also it's working as expected. I just don't like the fact to have two files. Is there a way to do this in a single file?

Thanks Jeremy

test_package_launch.py:

import sys
import os

from launch import LaunchDescription
import launch
from launch.actions.execute_process import ExecuteProcess
from launch_ros.actions import Node
from launch import LaunchService
from ament_index_python.packages import get_package_share_directory

def callback_respawn(event, context):
    print("---------------------------------- on exit callback -------------------------------")

respawn_delay = 3
def generate_launch_description():
    return LaunchDescription([
        ExecuteProcess(
        cmd=[sys.executable, "test_package_respawn.py"],
        respawn=True, respawn_delay=respawn_delay, on_exit=callback_respawn,
        emulate_tty=True,
        output="screen"
        )
    ])

test_package_respawn.py:

#!/usr/bin/env python3

import os
import sys

from launch import LaunchDescription
from launch.actions.execute_process import ExecuteProcess
from launch.actions.shutdown_action import Shutdown
from launch.actions.timer_action import TimerAction
from launch_ros.actions import Node
from ament_index_python.packages import get_package_share_directory
from launch import LaunchService

config = os.path.join(
    get_package_share_directory('test_package'),
    'config',
    'config.yaml'
)

def launch_node():
    return LaunchDescription(
        [Node(
              package="test_package",
              executable="test_package_node",
              name="test_package",
              output="screen",
              emulate_tty=True,
              parameters=[config]
          )
      ]
    )

def main():
  print("------------------------- started node in respawn process -----------------------------")
  desc = launch_node()
  service = LaunchService()
  service.include_launch_description(desc)
  service.run()

if __name__ == '__main__':
  main()
2021-08-27 11:58:22 -0500 marked best answer run ROS2 in two vs code remote containers

Hello everyone,

I tried to run to ROS2 two nodes in different containers as described here: https://docs.ros.org/en/foxy/Guides/R... (I used foxy instead of eloquent). Everything works just fine.

Then I started two instances of vs code and opened the workspace in a remote container (based on the same image as above). In the first remote container I start the talker, in the second remote container I start the listener. Unfortunately they don't find each other. Does anyone have an idea what might be the solution?

Thanks a lot Jeremy

2021-08-27 11:58:22 -0500 received badge  Scholar (source)
2021-08-27 11:57:37 -0500 received badge  Famous Question (source)
2021-08-27 11:57:15 -0500 edited question Debugging ROS 2 cpp node with vs code starting the node with a launch file

Debugging ROS 2 cpp node with vs code starting the node with a launch file Hello everyone, I'm using vs code and ROS 2

2021-08-27 11:55:15 -0500 asked a question Debugging ROS 2 cpp node with vs code starting the node with a launch file

Debugging ROS 2 cpp node with vs code starting the node with a launch file Hello everyone, I'm using vs code and ROS 2

2021-08-25 07:55:19 -0500 received badge  Famous Question (source)
2021-07-14 14:27:58 -0500 received badge  Notable Question (source)
2021-07-09 11:14:12 -0500 received badge  Popular Question (source)
2021-07-09 09:12:02 -0500 received badge  Student (source)
2021-07-09 07:45:26 -0500 commented answer ROS2 respawn

Thanks that worked. Just wondering why I didn't work, when I tried this some days ago :-D.

2021-07-09 07:45:01 -0500 received badge  Rapid Responder (source)
2021-07-09 07:45:01 -0500 answered a question ROS2 respawn

Thanks that worked. Just wondering why I didn't work, when I tried this some days ago :-D.

2021-07-08 09:34:33 -0500 edited question ROS2 respawn

ROS2 respawn Hello ROS2 community, I'm currently playing around with the best way to respawn a node (ROS2 foxy). My cur

2021-07-08 09:34:33 -0500 received badge  Editor (source)
2021-07-08 09:33:28 -0500 edited question ROS2 respawn

ROS2 respawn Hello ROS2 community, I'm currently playing around with the best way to respawn a node (ROS2 foxy). My cur

2021-07-08 09:31:21 -0500 asked a question ROS2 respawn

ROS2 respawn Hello ROS2 community, I'm currently playing around with the best way to respawn a node. My current solutio

2021-06-25 04:37:36 -0500 received badge  Enthusiast
2021-06-19 03:43:36 -0500 received badge  Notable Question (source)
2021-06-18 01:42:21 -0500 answered a question run ROS2 in two vs code remote containers

I found the solution of the problem. The issue is that Fast-DDS comes with SharedMemory transport by default which doesn

2021-06-18 01:42:21 -0500 received badge  Rapid Responder (source)
2021-06-18 01:09:38 -0500 received badge  Supporter (source)
2021-06-17 20:58:15 -0500 received badge  Popular Question (source)
2021-06-17 09:56:30 -0500 asked a question run ROS2 in two vs code remote containers

run ROS2 in two vs code remote containers Hello everyone, I tried to run to ROS2 two nodes in different containers as d