This node definition has both:
rviz_node = Node(
package='rviz2',
executable='rviz2',
output='screen',
name='rviz_node',
parameters=[{'use_sim_time': True}],
arguments=['-d', rviz_config_dir])
use_sim_time
is a parameter that every node has and is automatically generated.
-d
is the argument for the directory to the rviz2 config file. This is provided on the command line.
launch
requires a launch file (Python, XML, or YAML) which is usually under/launch
directory
ros2 launch <pkg_name> <launch_file_name> arg1=:some_value1 arg2=:some_value2
or
ros2 launch <path_to_launch_file> arg1=:some_value1 arg2=:some_value2
run
requires an executable which is usually under a/lib
directory
ros2 run <pkg_name> <executable_name> --ros-args arg1=:some_value1 arg2=:some_value2
Robot closeup | Robot LIDAR |
---|---|
![]() |
![]() |