Carma-platform v4.2.0
CARMA Platform is built on robot operating system (ROS) and utilizes open source software (OSS) that enables Cooperative Driving Automation (CDA) features to allow Automated Driving Systems to interact and cooperate with infrastructure and other vehicles through communication.
transforms Namespace Reference

Functions

def generate_launch_description ()
 

Function Documentation

◆ generate_launch_description()

def transforms.generate_launch_description ( )
Launch robot_state_publisher to read in URDF file

Definition at line 24 of file transforms.launch.py.

25 """
26 Launch robot_state_publisher to read in URDF file
27 """
28 use_sim_time = LaunchConfiguration('use_sim_time')
29 declare_use_sim_time_arg = DeclareLaunchArgument(
30 name = 'use_sim_time',
31 default_value = "False",
32 description = "True if simulation mode is on"
33 )
34
35 # Since the file needs to be actually read a substition does not work here
36 # For now the path must be hardcoded so it can be read into a string and passed as a parameter
37 with open('/opt/carma/vehicle/calibration/urdf/carma.urdf', 'r') as in_file:
38 robot_description = in_file.read()
39
40 start_robot_state_publisher_cmd = Node(
41 package='robot_state_publisher',
42 executable='robot_state_publisher',
43 name='robot_state_publisher',
44 namespace=GetCurrentNamespace(),
45 parameters=[
46 {'robot_description': robot_description},
47 {"use_sim_time" : use_sim_time}
48 ]
49 )
50
51 return LaunchDescription([
52 start_robot_state_publisher_cmd,
53 declare_use_sim_time_arg
54 ])
def generate_launch_description()