CARLA ROS bridge
client.py
carla_ros_bridge instance
initialized with client and params (from PythonClient API)
carla_ros_bridge.run()
transforms.py
- ros_transform_to_pose: convert Transform() message to Pose() message. doesn't change position and orientation
- carla_transform_to_ros_pose:
- carla_transform_to_ros_transform:
bridge.py
CarlaRosBridge()
constructor: client, params
- setup_carla_client()
self.client = client
param_sensors = all the sensors parameters
carla_settings = all the carla parameters- tf_to_publish: array
- msgs_to_publish: array
- publishers: dictionary
- cur_time: rospy.Time
- carla_game_stamp
- carla_platform_stamp
- player_handler
- non_players_handler
- sensors: dictionary
- key: name (from setting.yaml file)
- value: sensor handler
- process_msg: get all self.publishers dictionary
- key: topic
- value: rospy.publisher
- and add msg to either tf_to_publish (msg) or msgs_to_publish (publisher and msg)
- send_msgs()
publish all the msgs in msgs_to_publish and tf_to_pudblish
- run()
- self.client.read_data() into measurements and sensor_data
- compute self.cur_time
- publish to clock
- let player and nonplayer handlers to process msgs
- let sensor handlers to process sensor msgs
- send all the msgs
- self.client.send_control(input_conbtroller.cur_control)
markers.py
AgentObjectHandler() general class
constructor()
- name
- world_link
- process_msg_fun
- lookup_table_marker_id
- get_marker_id
- process_msg
PlayerAgentHandler()
- process_msg(data, cur_time)
- process_msg_fun(self.name, marker(a marker in given pose))
- process_msg_fun('tf', TransformStamped())
NonPlayerAgentHandler()
- process_msg(data, cur_time)
control.py
InputController()
- cur_control()
- set_control_cmd_callback()
CARLA Python Client
tranform.py
define Transform() class.
- self.matrix is a tranformation matrix
- set() pass in Translation, Rotation or Scale type and set transformation matrix.
- inverse() get inverse transformation matrix
- transform_points() transform points by the self.matrix
- also defined __mul__, and __str__
TRI funding 100K