-
Notifications
You must be signed in to change notification settings - Fork 140
2. Using the Software
This page describes how to use Quad-SDK, which primarily involves using the launch files which accompany the software. We also illustrate the node and topic structure during deployment. For advances users looking to modify or extend the software, we refer to the README files located in each main package as well as the API.
Quad-SDK contains several high-level launch files which allow convenient access to nodes across several packages. All launch files are located in quad_utils
such that each can be called with roslaunch quad_utils <launch-file>.launch
.
-
quad_gazebo.launch: Launches the simulation engine and initializes the control stack. Can support multiple robots.
-
robot_type
The type of robot platform. Default:spirit
. -
multiple_robots
Specifies whether more than one robot. Default:false
. -
gui
Specifies whether to load the Gazebo GUI. Default:false
. -
paused
Specifies whether to pause the simulation on startup. Default:false
. -
controller
The controller to execute on the robot. Default:inverse_dynamics
. -
world
The world file to load (ifinput_type:=mesh
) . Default:flat
(see World Files section for other options). -
live_plot
Specifies whether to launch PlotJuggler for live plotting of data. Default:false
. -
dash
Specifies whether or not to launch the rqt dashboard. Default:false
. -
logging
Specifies if bagfiles should begin recording. Default:false
.
-
-
quad_plan.launch: Launches the planning stack. Can support multiple robots.
-
reference
The source of the reference plan. Default:gbpl
(Global Body Planner for Legged Robots) -
multiple_robots
Specifies whether more than one robot. Default:false
. -
logging
Specifies if bagfiles should begin recording. Default:false
. -
twist_input
The source of the twist input ifreference:=twist
. Default:none
(other options arekeyboard
orjoy
which respectively launchteleop_twist_keyboard
orteleop_twist_joy
). -
leaping
Specifies if leaping should be enabled ifreference:=gbpl
. Default:true
. -
ac
Specifies if adaptive complexity MPC should be enabled (not yet supported). Default:false
. -
robot_type
The type of robot platform. Default:spirit
.
-
-
quad_visualization.launch: Launches visualization plugins for each robot as well as the requested GUIs. Can support multiple robots.
-
robot_type
The type of robot platform. Default:spirit
. -
live_plot
Specifies whether to launch PlotJuggler for live plotting of data. Default:false
. -
dash
Specifies whether or not to launch the rqt dashboard. Default:false
.
-
-
remote_driver.launch: Calls the visualization and mapping scripts and starts the remote heartbeat. Useful for remotely operating robot hardware.
-
map_input_type
The type of input used for generating terrain data. Default:mesh
. -
world
The world file to load (ifinput_type:=mesh
) . Default:flat
(see quad_simulator for other options). -
live_plot
Specifies whether to launch PlotJuggler for live plotting of data. Default:false
. -
dash
Specifies whether or not to launch the rqt dashboard. Default:false
. -
logging
Specifies if bagfiles should begin recording. Default:false
.
-
Quad-SDK also contains several component launch files which launch pieces of the stack independently.
-
quad_spawn.launch: Spawns a single robot and initializes its stack. Called by
quad_gazebo.launch
.-
robot_type
The type of robot platform. Default:spirit
. -
controller
The controller to execute on the robot. Default:inverse_dynamics
. -
namespace
The namespace of the robot. Default: 'robot_1'. -
init_pose
The starting pose of the robot. Default:-x 0.0 -y 0.0 -z 0.5
.
-
-
robot_driver.launch: Launches node robot_driver to initialize the control and estimation loops. Also launches mocap and logging if requested.
-
is_hardware
Specifies if the stack is being executed on hardware rather than sim. Default:true
. -
controller
The controller to execute on the robot. Default:inverse_dynamics
. -
logging
Specifies if bagfiles should begin recording. Default:false
. -
mocap
Specifies if the motion capture node should be launched. Default:true
.
-
-
planning.launch: Launches the planning and control stack.
-
reference
The source of the reference plan. Default:twist
(other option isgbpl
to launch the Global Body Planner for Legged Robots). -
twist_input
The source of the twist input ifreference:=twist
. Default:none
(other options arekeyboard
orjoy
which respectively launchteleop_twist_keyboard
orteleop_twist_joy
). -
namespace
The namespace of the nodes for multi-robot operation. Default:robot_1
. -
robot_type
The type of robot platform. Default:spirit
. -
logging
Specifies if bagfiles should begin recording. Default:false
. -
leaping
Specifies if leaping should be enabled ifreference:=gbpl
. Default:true
. -
ac
Specifies if adaptive complexity MPC should be enabled (not yet supported). Default:false
.
-
-
mapping.launch: Launches nodes terrain_map_publisher and grid_map_visualization to expose terrain data.
-
robot_type
The type of robot platform. Default:spirit
. -
input_type
The type of input used for generating terrain data. Default:grid
.
If
input_type:=mesh
, the following arguments can be used to customize the environment:-
world
The world file to load. Default:step_20cm
(see quad_simulator for other options). -
grid_map_resolution
Specifies the resolution of the mesh (in m). Default:0.05
.
-
-
visualization_plugins.launch: Launches the visualization plugins to map data topics into RViz-readable topics.
-
namespace
The namespace of the robot for proper remapping. Default:robot_1
. -
robot_type
The type of robot platform. Default:spirit
.
-
-
mocap.launch: Launches the mocap node to receive motion capture data.
-
logging.launch: Begins recording selected topics into bags. Records two copies - one with a timestamp located in
quad_logger/bags/archive
and one sans timestamp inquad_logger/bags
.-
namespace
The namespace of the robot to indicate which topics to record. Default:robot_1
. -
bag_name
The name of the recorded bag. Default:quad_log
.
-
Launch the simulator with RViz visualization, stand the robot up, then execute a plan while logging:
roslaunch quad_utils quad_gazebo.launch
rostopic pub /robot_1/control/mode std_msgs/UInt8 "data: 1"
roslaunch quad_utils quad_plan.launch reference:=twist logging:=true
(for twist control input) rosrun teleop_twist_keyboard teleop_twist_keyboard.py cmd_vel:=/robot_1/cmd_vel
If your computer is not that powerful, you can slow down the simulation and relax the MPC solving time constraint by:
- change real_time_update_rate in the .world file (eg. flat.world)
- change "max_wall_time" and "max_cpu_time" of nmpc_controller.cpp make it match the actual time step you have.
All the launch files listed above default to the flat world file, but there are a number of other options, some of which are shown below. See quad_simulator for a full list of included world files, and this tutorial to learn how to create your own.
This graphic shows a high-level summary of the Quad-SDK architecture:
The actual implementation of this architecture for two simulated robots looks like this: