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

Darby Lim's profile - activity

2023-01-24 06:02:00 -0500 marked best answer [ROS2] what is different between DeclareLaunchArgument and LaunchConfiguration

I had tested ros2 launch with arguments. The arguments are successfully implemented using only set LaunchConfiguration exclude DeclareLaunchArgument. For example, attached launch files worked excluding DeclareLaunchArgument

import os

from ament_index_python.packages import get_package_share_directory
from launch import LaunchDescription
from launch.substitutions import LaunchConfiguration, EnvironmentVariable
from launch.actions import DeclareLaunchArgument
from launch_ros.actions import Node

TURTLEBOT3_MODEL = os.environ['TURTLEBOT3_MODEL']

def generate_launch_description():
    use_sim_time = LaunchConfiguration('use_sim_time', default='false')
    urdf_file_name = 'turtlebot3_' + TURTLEBOT3_MODEL + '.urdf'
    print("urdf_file_name : {}".format(urdf_file_name))

    urdf = os.path.join(get_package_share_directory('turtlebot3_description'), 'urdf', urdf_file_name)

    return LaunchDescription([
        #DeclareLaunchArgument(
        #    'use_sim_time',
        #    default_value='false',
        #    description='Use simulation (Gazebo) clock if true'),

        Node(
            package='robot_state_publisher',
            node_executable='robot_state_publisher',
            node_name='robot_state_publisher',
            output='screen',
            parameters=[{' use_sim_time': use_sim_time}],
            arguments=[urdf]),
    ])

However, most examples of ros2 launch are included DeclareLaunchArgument when user want to use arguments. So, my main questions is What is different btw LaunchConfiguration and DeclareLaunchArgument?

2022-05-01 20:23:05 -0500 answered a question Merge Output of Ultrasonic Sensor with Turtlebot3's Lidar Output for Navigation on Local Cost Map

Hi, Kaveh :) You can make a new node whose laserscan publisher combined data and it subscribes laserscan and ultrasonic

2022-02-18 10:32:25 -0500 received badge  Great Question (source)
2021-09-22 04:10:28 -0500 received badge  Good Question (source)
2021-06-29 23:05:12 -0500 received badge  Nice Question (source)
2021-01-27 03:10:19 -0500 received badge  Famous Question (source)
2020-09-16 17:32:18 -0500 received badge  Good Answer (source)
2020-07-08 18:46:03 -0500 received badge  Notable Question (source)
2020-06-10 07:19:32 -0500 received badge  Popular Question (source)
2020-04-09 01:37:26 -0500 received badge  Famous Question (source)
2020-02-25 00:29:18 -0500 edited question How to use extra_arguments that is included on composableNode()

How to use extra_arguments included composableNode() in launch_ros I have tried to use extra_arguments in order to pass

2020-02-25 00:28:23 -0500 asked a question How to use extra_arguments that is included on composableNode()

How to use extra_arguments included composableNode() in launch_ros I have tried to use extra_arguments in order to pass

2019-12-09 17:18:58 -0500 received badge  Famous Question (source)
2019-12-03 14:15:22 -0500 received badge  Famous Question (source)
2019-11-30 18:51:27 -0500 received badge  Notable Question (source)
2019-11-05 20:03:48 -0500 received badge  Critic (source)
2019-11-03 19:21:37 -0500 commented question [ROS2 Dashing] Can't run rqt

I have solved to colcon build seperetely (NOT add build argument symlink-install) rqt_gui and rqt_gui_py

2019-10-25 03:14:34 -0500 received badge  Student (source)
2019-10-25 03:14:27 -0500 received badge  Popular Question (source)
2019-10-22 20:13:01 -0500 edited question [ROS2 Dashing] Can't run rqt

[ROS2 Dashing] Can't run rqt I've successfully installed Dashing patch 4 from source. But I can't implement rqt anymore.

2019-10-22 20:10:40 -0500 asked a question [ROS2 Dashing] Can't run rqt

[ROS2 Dashing] Can't run rqt I've installed Dashing patch 4 successfully. But I can't implement rqt anymore. Do I miss s

2019-09-16 05:53:55 -0500 commented answer [ROS2] collision avoidance(without map) using dwb_controller in navigation2

If I haven't provided a complete base_link->map tf, I wouldn't use navigation2? I just wanna turtlebot3 explore spac

2019-09-15 19:57:39 -0500 received badge  Notable Question (source)
2019-09-05 19:27:12 -0500 commented question Failed connection with Devices

Did you check usb port connected with opencr?

2019-09-04 14:07:02 -0500 received badge  Popular Question (source)
2019-09-02 19:48:14 -0500 edited question [ROS2] collision avoidance(without map) using dwb_controller in navigation2

[ROS2] collision avoidance(without map) using dwb_controller in navigation2 I have tried to collision avoidance(without

2019-09-02 19:47:25 -0500 asked a question [ROS2] collision avoidance(without map) using dwb_controller in navigation2

[ROS2] collision avoidance(without map) using dwb_controller in navigation2 I have tried to collision avoidance(without

2019-07-25 00:29:29 -0500 commented answer Turtlebot support in ROS2 Dashing

Hello again! We are preparing Dashing release but there are some problems. If you want to get lastest update about it. P

2019-07-15 11:56:38 -0500 received badge  Famous Question (source)
2019-06-21 01:51:38 -0500 answered a question Turtlebot support in ROS2 Dashing

We have been prepared TurtleBot3 for Dashing. It'll be released next month.

2019-06-21 01:51:38 -0500 received badge  Rapid Responder (source)
2019-05-30 02:59:13 -0500 received badge  Notable Question (source)
2019-05-22 03:04:26 -0500 commented answer [ROS2] what is different between DeclareLaunchArgument and LaunchConfiguration

Thank you for updates. I could check launch arguments using -s and I clearly understand what is a different of them. Tha

2019-05-13 11:59:29 -0500 received badge  Popular Question (source)
2019-05-10 03:28:51 -0500 commented answer [ROS2] what is different between DeclareLaunchArgument and LaunchConfiguration

Thank you for comments :) However, if I set LaunchConfiguration excluding DeclareLaunchArgument, I would access launch a

2019-05-09 20:13:00 -0500 edited question [ROS2] what is different between DeclareLaunchArgument and LaunchConfiguration

[ROS2] what is different between DeclareLaunchArgument and LaunchConfiguration I had tested ros2 launch with arguments.

2019-05-09 20:10:35 -0500 asked a question [ROS2] what is different between DeclareLaunchArgument and LaunchConfiguration

[ROS2] what is different between DeclareLaunchArgument and LaunchConfiguration I had tested ros2 launch with arguments.

2019-04-26 20:13:30 -0500 received badge  Notable Question (source)
2019-04-09 12:31:41 -0500 marked best answer Build failed at rosidl_generator_c package

Hello :)

I have tried to install ROS2 in my macbook(High Sierra). But I got an error message that rosidl_generator_c package in rosidl(master branch) is failed to build. In this error was not occured in ubuntu.

How to handle this problem?

--- stderr: rosidl_generator_c                                                                                  
'Token' object has no attribute 'children' 
/Users/darby/ros2_ws/build/rosidl_generator_c/rosidl_adapter/rosidl_generator_c/msg/BoundedArrayPrimitives.idl
Error processing idl file: 
/Users/darby/ros2_ws/build/rosidl_generator_c/rosidl_adapter/rosidl_generator_c/msg/BoundedArrayPrimitives.idl
Traceback (most recent call last):
  File "/Users/darby/ros2_ws/src/ros2/rosidl/rosidl_generator_c/bin/rosidl_generator_c", line 40, in <module>
sys.exit(main())
  File "/Users/darby/ros2_ws/src/ros2/rosidl/rosidl_generator_c/bin/rosidl_generator_c", line 35, in main
    args.generator_arguments_file,
   File "/Users/darby/ros2_ws/src/ros2/rosidl/rosidl_generator_c/rosidl_generator_c/__init__.py", line 35, in generate_c
    generate_files(generator_arguments_file, mapping)
  File "/Users/darby/ros2_ws/install/rosidl_cmake/lib/python3.7/site-packages/rosidl_cmake/__init__.py", line 121, in 
generate_files
    raise(e)
  File "/Users/darby/ros2_ws/install/rosidl_cmake/lib/python3.7/site-packages/rosidl_cmake/__init__.py", line 101, in 
generate_files
    idl_file = parse_idl_file(locator)
  File "/Users/darby/ros2_ws/install/rosidl_parser/lib/python3.7/site-packages/rosidl_parser/parser.py", line 60, in 
parse_idl_file
    content = parse_idl_string(string, png_file=png_file)
  File "/Users/darby/ros2_ws/install/rosidl_parser/lib/python3.7/site-packages/rosidl_parser/parser.py", line 69, in 
parse_idl_string
    content = extract_content_from_ast(tree)
  File "/Users/darby/ros2_ws/install/rosidl_parser/lib/python3.7/site-packages/rosidl_parser/parser.py", line 139, in 
extract_content_from_ast
    add_message_members(msg, struct_defs[0])
  File "/Users/darby/ros2_ws/install/rosidl_parser/lib/python3.7/site-packages/rosidl_parser/parser.py", line 366, in 
add_message_members
    abstract_type = get_abstract_type_from_type_spec(type_spec)
  File "/Users/darby/ros2_ws/install/rosidl_parser/lib/python3.7/site-packages/rosidl_parser/parser.py", line 407, in 
get_abstract_type_from_type_spec
    return get_abstract_type(child)
  File "/Users/darby/ros2_ws/install/rosidl_parser/lib/python3.7/site-packages/rosidl_parser/parser.py", line 440, in 
get_abstract_type
    basetype = get_abstract_type_from_type_spec(type_spec)
  File "/Users/darby/ros2_ws/install/rosidl_parser/lib/python3.7/site-packages/rosidl_parser/parser.py", line 407, in 
get_abstract_type_from_type_spec
    return get_abstract_type(child)
  File "/Users/darby/ros2_ws/install/rosidl_parser/lib/python3.7/site-packages/rosidl_parser/parser.py", line 416, in 
get_abstract_type
    while len(child.children) == 1:
AttributeError: 'Token' object has no attribute 'children'
make[2]: *** [rosidl_generator_c/rosidl_generator_c/msg/bool.h] Error 1
make[2]: *** Deleting file `rosidl_generator_c/rosidl_generator_c/msg/bool.h'
make[1]: *** [CMakeFiles/rosidl_generator_c_interfaces__rosidl_generator_c.dir/all] Error 2
make: *** [all] Error 2
---
Failed   <<< rosidl_generator_c [ Exited with code 2 ]
2019-04-08 06:45:33 -0500 commented answer Build failed at rosidl_generator_c package

Thank you very much!

2019-04-08 06:37:19 -0500 received badge  Popular Question (source)
2019-04-06 09:17:39 -0500 asked a question Build failed at rosidl_generator_c package

Build failed at rosidl_generator_c package Hello :) I have tried to install ROS2 in my macbook(High Sierra). But I got

2019-02-06 19:00:26 -0500 commented question [solved] Creation of publisher failed: nav_msgs - turtlebot3

I assume that you could somthing wrong to add publisher on your code. Can you attach your code?

2019-02-06 18:54:50 -0500 answered a question Dynamixel X with OpenCM 9.04C and ROS possible or OpenCR/U2D2 need?

Thank you for your inquiry about Dynamixels. To control Dynamixels on your PC, you are supposed to need U2D2 (http://em

2019-02-06 18:41:29 -0500 answered a question Advantages of Dynamixel X -T / -R TTL vs RS-485

Thank you for your inquiry about Dynamixels. Simply, the advantage of using RS-485 is more robustness when you need to

2019-01-16 20:01:33 -0500 received badge  Nice Answer (source)