You have to have
robot.launch file launched, before using any of these programs.
To run these examples in simulation, consult to GAZEBO
Moves robot to point x,y using odometry. Robot calculates trajectory to point x,y without using goal controller. Arguments are:
To run the program, with default
tolerances, execute the following commands:
roscd rosrider_examples/nodes ./move_tf.py _x:=1.0 _y:=0.0
And the robot will go to point (1,0)
Reads a file, consisting of waypoints, and follows the trajectory of these waypoints in infinite loop. Arguments are:
file consists of a file path that has x, y coordinates of points, terminated by new line. Example file:
0 0.5 -1 0.5 -1 -0.5 0 -0.5 0 0
To run the program, execute the following commands:
roscd rosrider_examples/nodes ./loop_tf.py _file:=../data/e0.txt
Will make the robot follow an ellipse trajectory, as given by
Paces the robot between two points, using goal controller. The goal controller has to be on for this program to work, which usually happens when you launch
aw denote orientation of robot at
bw denote orientation of robot at
To run the program, using default parameters execute the following commands:
roscd rosrider_examples/nodes ./pace.py
With default parameters, the pace.py progrma will make the robot go between
This example uses
odometry only. If you are using
EKF please adjust goal controller to use
pace.py makes the robot go between two points,
loop_goal.py reads a list of goals from a file, and executes the goals in a loop.
rosrider_examples/data/goals.txt is an example goal list. The following line defines a goal:
0.12 0 0.707 0.707
The first two numbers are x, y coordinates. The last two numbers are orientation as a quaternion. Only z, w of quaternion is used, since we are operating on a 2D plane.
Follows a yellow line on background. When there is no more yellow line, the robot executes a 180 degree turn, using goal controller.
Notice: In order to launch the
robot_cam.launchyou need a camera attached and configured to your robot.
[TODO: launch file. line_detector.py]
[TODO: reconf window]
To see a video of robot in operation, click the image below:
To see the ROS Console, while the robot is in operation, click the image below:
Click here for screencast.
This example consists of two nodes,
line_detector which detects the line by using image processing and
line_follower which drives the robot getting
/line_data from the
To launch line_follower:
roscd rosrider_examples/launch roslaunch line_follower.launch
To tune parameters of
rosrun rqt_reconfigure rqt_reconfigure
You can configure kP, kI, kD for the line following PID algorithm, as well as cruise_speed, terminal speed.
line_followernode listens to
/cmd_inputfor joystick. If command is send from joystick, it will override the line following algorithm, allowing control with joystick. As soon as joystick is released, the line following algorithm will continue.