Skip to content
Branch: master
Find file History
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

Car Junction

The goal of this practice is to implement the logic of a navigation algorithm for an automated vehicle. The vehicle must Stop at the T joint, where there is a stop sign, wait until there are no cars and pass once the road is clear.

How to execute?

To launch the example, follow the steps below:

  1. Source the gazebo setups:
$ source /opt/jderobot/share/jderobot/gazebo/
$ source /opt/jderobot/share/jderobot/gazebo/
  1. Run Gazebo simulator:
$ roslaunch /opt/jderobot/share/jderobot/gazebo/launch/car_1_junction.launch
  1. Running the practice and the user interface:
$ python2 ./ stop_conf.yml

To simplify the closure of the environment, just close the Stop Component window(s). Ctrl + C will give problems.

How to do the practice

To carry out the practice, you must edit the file and insert the control logic into it.

Where to insert the code?

def execute(self):
    # Add your code here
    print "Running"
    # Getting the images
    input_image = self.cameraC.getImage().data      


  • self.cameraC.getImage().data - to get image from center camera

  • self.cameraL.getImage().data - to get image from left camera

  • self.cameraR.getImage().data - to get image from right camera

  • self.pose3d.getPose3d().x - to obtain the position of the robot

  • self.pose3d.getPose3d().y - to obtain the position of the robot

  • self.pose3d.getPose3d().yaw - to obtain the position of the robot

  • self.motors.sendW() - to set the angular velocity

  • self.motors.sendV() - to set the linear velocity

Demonstrative video

Car Junction Video Demo

You can’t perform that action at this time.