Second assignment for ME 495: Embedded Systems in Robotics, Northwestern University, Fall 2020.
This package contains nodes that accomplish two tasks:
-
Cause a TurtleBot to follow a configurable figure 8 trajectory. One has the option to run this code in real-life or in a Gazebo simulation. Either way it is accompanied by an RViz visualization.
-
Visualize a 2R arm that follows a trajectory where its y-position remains constant.
- turtlebot3
TurtleBot RVIz: https://youtu.be/BLI5nBEQBdw
TurtleBot IRL: https://youtu.be/CagvXUCvS04
Arm RViz: https://youtu.be/47MknIazwUA
- Create a new workspace and clone this repositiory.
# Create a new workspace
mkdir -p ws/src
# clone the demonstration code
cd ws/src
git clone https://github.com/ME495-EmbeddedSystems/homework02-ctsaitsao turtlebot3_figure_eight
# return to ws root
cd ../
- Build the workspace and activate it.
catkin_make install
. devel/setup.bash
-
To run the TurtleBot code in real life, create these three terminals:
- In the first one, create a ROS Master.
roscore
- In the second one, SSH into a TurtleBot machine and run the startup launch file.
ssh [email protected] roslaunch turtlebot3_bringup turtlebot3_robot.launch
- In the third, export the TurtleBot model (if this hasn't been done before) and run the main launch file.
export TURTLEBOT3_MODEL=burger roslaunch turtlebot3_figure_eight figure_eight.launch
-
The 2R arm code runs two main nodes,
arm_traj
(which commands the arm trajectory) andarm_marker
(which draws markers at the end-effector of the arm). To run the 2R arm code, run:
roslaunch turtlebot3_figure_eight arm_traj.launch
-
TurtleBot configuration options:
- Add the
launch_gazebo:=True
option to run the TurtleBot code in the Gazebo simulation. - Add the
launch_rqt_plot:=True
option to graph the x and y positions of the robot over time. - Add the
launch_rviz=False
option to not run RViz.
- Add the
-
2R arm configuration options:
- Add the
display_markers:=False
option to not display the markers at the end-effector frame of the arm. - The 2R arm can be manually controlled (without a trajectory) by running:
This launch file is included in
roslaunch turtlebot3_figure_eight view_arm.launch launch_gui:=True
arm_traj.launch
and runs therviz
,joint_state_publisher_gui
, androbot_state_publisher
nodes.
- Add the
Handwritten calculations for the TurtleBot control velocity inputs v and w as well as the TurtleBot's trajectory parametric equations can be found in the doc
folder.