Skip to content

Path Planning and Control module with CARLA and ROS BRIDGE

Notifications You must be signed in to change notification settings

vvrs/pythonapi-test

Repository files navigation

pythonapi-test

This repository is created to learn to use Carla's PythonAPI

Scripts

GlobalPathCarla2ROS

This is a ROS node that publishes global path on request.

Topics

Publisher: /<name_space>/global_path

  • Message Type : Path (nav_msgs/path)

Subscriber: /<name_space>/get_global_path

  • Message Type : String (publish empty string on this topic to get global path)
Use
def main(argv):

	client = carla.Client('localhost',2000)
	client.set_timeout(2.0)

	world = client.get_world()

	
	# namespace - 'carla'
	node = globalPathServer(world,'carla')

	while not rospy.is_shutdown():
		rospy.spin()
Test

Run roscore

Goto carla source folder and run carla server

./CarlaUE4.sh -windowed -ResX=320 -ResY=240 -benchmark -fps=10 

Run carla client, this should spawn an actor

python main_carla.py 

Launch carla_ros_bridge

roslaunch carla_ros_bridge client.launch

About

Path Planning and Control module with CARLA and ROS BRIDGE

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages