#include "tutsim.hpp"
#include <jspace/test/sai_brep_parser.hpp>
#include <jspace/test/sai_brep.hpp>
#include <tao/dynamics/taoNode.h>
#include <tao/dynamics/taoJoint.h>
#include <tao/dynamics/taoDynamics.h>
#include <tao/dynamics/taoVar.h>
#include <tao/matrix/TaoDeMath.h>
#include <tao/matrix/TaoDeQuaternion.h>
#include <tao/matrix/TaoDeFrame.h>
#include <boost/shared_ptr.hpp>
#include <FL/Fl.H>
#include <FL/Fl_Double_Window.H>
#include <FL/Fl_Button.H>
#include <FL/fl_draw.H>
#include <err.h>
#include <sys/time.h>
Go to the source code of this file.
Functions | |
static char const * | robot_filename (TUTROB_XML_PATH_STR) |
static double | gfx_rate_hz (20.0) |
static double | servo_rate_hz (400.0) |
static double | sim_rate_hz (1600.0) |
static int | win_width (300) |
static int | win_height (200) |
static char const * | win_title ("Stanford WBC Tutorial") |
static int | id1 (-1) |
static int | id2 (-1) |
static int | id3 (-1) |
static int | id4 (-1) |
static size_t | toggle_count (0) |
static bool | paused (false) |
static void | write_state_to_tree (jspace::Vector const *jpos, jspace::Vector const *jvel, jspace::tao_tree_info_s &tree) |
static void | write_state_to_tree (jspace::tao_tree_info_s &tree) |
static void | read_state_from_tree (jspace::tao_tree_info_s const &tree, jspace::Vector *jpos, jspace::Vector *jvel, jspace::Vector *jfrc) |
static void | read_state_from_tree (jspace::tao_tree_info_s const &tree) |
static taoDNode * | find_node (jspace::tao_tree_info_s &tree, std::string const &name) |
static void | raw_draw_tree (jspace::tao_tree_info_s &tree, double x0, double y0, double scale) |
static void | raw_draw_com (jspace::tao_tree_info_s &tree, double x0, double y0, double scale) |
Variables | |
static boost::shared_ptr < jspace::tao_tree_info_s > | sim_tree |
static boost::shared_ptr < jspace::tao_tree_info_s > | scratch_tree |
static jspace::State | state |
static size_t | ndof |
static double | servo_dt_ms |
static bool(* | servo_cb )(size_t toggle_count, double wall_time_ms, double sim_time_ms, jspace::State &state, jspace::Vector &command) |
static void(* | draw_cb )(double x0, double y0, double scale)=0 |
static taoDNode* @54::find_node | ( | jspace::tao_tree_info_s & | tree, | |
std::string const & | name | |||
) | [static] |
Definition at line 175 of file tutsim.cpp.
References jspace::tao_tree_info_s::info, and ndof.
Referenced by tutsim::draw_delta_jpos(), raw_draw_com(), and raw_draw_tree().
static double gfx_rate_hz | ( | 20. | 0 | ) | [static] |
Referenced by tutsim::run(), and tutsim::set_rates().
static int id1 | ( | - | 1 | ) | [static] |
Referenced by tutsim::draw_delta_jpos(), raw_draw_com(), and raw_draw_tree().
static int id2 | ( | - | 1 | ) | [static] |
Referenced by tutsim::draw_delta_jpos(), raw_draw_com(), and raw_draw_tree().
static int id3 | ( | - | 1 | ) | [static] |
Referenced by tutsim::draw_delta_jpos(), raw_draw_com(), and raw_draw_tree().
static int id4 | ( | - | 1 | ) | [static] |
Referenced by tutsim::draw_delta_jpos(), raw_draw_com(), and raw_draw_tree().
static bool paused | ( | false | ) | [static] |
static void @54::raw_draw_com | ( | jspace::tao_tree_info_s & | tree, | |
double | x0, | |||
double | y0, | |||
double | scale | |||
) | [static] |
Definition at line 218 of file tutsim.cpp.
References find_node(), id1(), id2(), id3(), id4(), jspace::tao_tree_info_s::info, and sim_tree.
static void @54::raw_draw_tree | ( | jspace::tao_tree_info_s & | tree, | |
double | x0, | |||
double | y0, | |||
double | scale | |||
) | [static] |
Definition at line 186 of file tutsim.cpp.
References find_node(), id1(), id2(), id3(), id4(), jspace::tao_tree_info_s::info, and sim_tree.
Referenced by tutsim::draw_robot().
static void @54::read_state_from_tree | ( | jspace::tao_tree_info_s const & | tree | ) | [static] |
Definition at line 154 of file tutsim.cpp.
References jspace::State::force_, jspace::State::position_, read_state_from_tree(), and jspace::State::velocity_.
static void @54::read_state_from_tree | ( | jspace::tao_tree_info_s const & | tree, | |
jspace::Vector * | jpos, | |||
jspace::Vector * | jvel, | |||
jspace::Vector * | jfrc | |||
) | [static] |
Definition at line 133 of file tutsim.cpp.
References jspace::tao_tree_info_s::info, and ndof.
Referenced by tutsim::draw_delta_jpos(), and read_state_from_tree().
static char const* robot_filename | ( | TUTROB_XML_PATH_STR | ) | [static] |
Referenced by tutsim::run(), and tutsim::set_robot_filename().
static double servo_rate_hz | ( | 400. | 0 | ) | [static] |
Referenced by tutsim::run(), and tutsim::set_rates().
static double sim_rate_hz | ( | 1600. | 0 | ) | [static] |
Referenced by tutsim::set_rates().
static size_t toggle_count | ( | 0 | ) | [static] |
static int win_height | ( | 200 | ) | [static] |
Referenced by tutsim::run(), and tutsim::set_window_params().
static char const* win_title | ( | "Stanford WBC Tutorial" | ) | [static] |
Referenced by tutsim::run(), and tutsim::set_window_params().
static int win_width | ( | 300 | ) | [static] |
Referenced by tutsim::run(), and tutsim::set_window_params().
static void @54::write_state_to_tree | ( | jspace::tao_tree_info_s & | tree | ) | [static] |
Definition at line 127 of file tutsim.cpp.
References jspace::State::position_, jspace::State::velocity_, and write_state_to_tree().
static void @54::write_state_to_tree | ( | jspace::Vector const * | jpos, | |
jspace::Vector const * | jvel, | |||
jspace::tao_tree_info_s & | tree | |||
) | [static] |
Definition at line 107 of file tutsim.cpp.
References jspace::tao_tree_info_s::info, ndof, and jspace::tao_tree_info_s::root.
Referenced by tutsim::draw_delta_jpos(), tutsim::draw_robot(), tutsim::run(), and write_state_to_tree().
void(* draw_cb)(double x0, double y0, double scale)=0 [static] |
Referenced by main(), and tutsim::set_draw_cb().
size_t ndof [static] |
Definition at line 60 of file tutsim.cpp.
Referenced by opspace::ClassicTaskPostureController::computeCommand(), jspace::JointGoalController::computeCommand(), find_node(), get_puma(), opspace::JointLimitTask::init(), opspace::SelectedJointPostureTask::init(), jspace::GoalControllerBase::init(), jspace::mass_inertia_explicit_form(), read_state_from_tree(), opspace::JointLimitTask::updateState(), and write_state_to_tree().
Fl_Button* pause |
Definition at line 98 of file tutsim.cpp.
Fl_Button* quit |
Definition at line 99 of file tutsim.cpp.
boost::shared_ptr<jspace::tao_tree_info_s> scratch_tree [static] |
Definition at line 54 of file tutsim.cpp.
Referenced by tutsim::draw_delta_jpos(), tutsim::draw_robot(), and tutsim::run().
bool(* servo_cb)(size_t toggle_count, double wall_time_ms, double sim_time_ms, jspace::State &state, jspace::Vector &command) [static] |
Referenced by main(), and tutsim::run().
double servo_dt_ms [static] |
Definition at line 62 of file tutsim.cpp.
boost::shared_ptr<jspace::tao_tree_info_s> sim_tree [static] |
Definition at line 53 of file tutsim.cpp.
Referenced by tutsim::draw_delta_jpos(), raw_draw_com(), raw_draw_tree(), and tutsim::run().
Simulator* simulator |
Definition at line 96 of file tutsim.cpp.
jspace::State state [static] |
Definition at line 59 of file tutsim.cpp.
Referenced by jspace::JointGoalController::computeCommand(), and get_puma().
Fl_Button* toggle |
Definition at line 97 of file tutsim.cpp.