Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • Your wpt_fcn within the Simulink program will likely require some tuning, e.g., changing the gains or adding some additional logic to make the robot behave the way you would like.
  • To develop/debug the system requires using a variety of tools.
    • Rviz provides a good way to see what the robot thinks it is doing.  The default configuration has the "Fixed Frame" for viewing the robot as the base_footprint which results in the center of the viewing window moving with the robot.  If you change the Fixed Frame to odom then the frame of reference will be the odometry navigation frame.  There is a dropdown in the GUI to select this.
    • To drill down into the system, using rostopic echo or rqt_topic allow you to see what the odometry and cmd_vel values are in real time.
  • When you stop the Simulink program the robot continues moving based on the last cmd_vel it received.  Since the gamepad is still active, you can enable the teleoperation to stop the robot.
  • You will likely want to start each iteration of the development with the robot in the X,Y,Theta position of 0,0,0 (at the origin).  A simple way to reset the odometry is to restart the nodes on the TurtleBot
    • Return to the terminal window where you are logged on to the TurtleBot via SSH - where you previously issued the roslaunch turtlebot3_bringup turtlebot3_robot.launch command
    • Stop the ROS nodes with Ctrl-C
    • Restart the nodes by reissuing roslaunch turtlebot3_bringup turtlebot3_robot.launch

Stopping the Turtlebot

When you stop the Simulink program the robot continues moving based on the last cmd_vel it received.  There are a few ways you might manually send a Twist message to the turtlebot to stop it.

  • If the the gamepad is still active, you can enable the teleoperation to stop the robot.
  • From a terminal (either on the Laptop or the Turtlebot) publish a twist command with all zeros

    Code Block
    rostopic pub -1 /cmd_vel geometry_msgs/Twist -- '[0.0, 0.0, 0.0]' '[0.0, 0.0, 0.0]'
     

Summary

Upon completing the assignment your mrc_hw4 repository should look something like this...

...