Class robot_dart::RobotDARTSimu
ClassList > robot_dart > RobotDARTSimu
Public Types
Public Functions
Type |
Name |
|
RobotDARTSimu (double timestep=0.015)
|
std::shared_ptr< Robot > |
add_checkerboard_floor (double floor_width=10.0, double floor_height=0.1, double size=1., const Eigen::Isometry3d & tf=Eigen::Isometry3d::Identity(), const std::string & floor_name="checkerboard_floor", const Eigen::Vector4d & first_color=dart::Color::White(1.), const Eigen::Vector4d & second_color=dart::Color::Gray(1.))
|
std::shared_ptr< Robot > |
add_floor (double floor_width=10.0, double floor_height=0.1, const Eigen::Isometry3d & tf=Eigen::Isometry3d::Identity(), const std::string & floor_name="floor")
|
void |
add_robot (const robot_t & robot)
|
std::shared_ptr< T > |
add_sensor (Args &&... args)
|
void |
add_sensor (const std::shared_ptr< sensor::Sensor > & sensor)
|
std::shared_ptr< simu::TextData > |
add_text (const std::string & text, const Eigen::Affine2d & tf=Eigen::Affine2d::Identity(), Eigen::Vector4d color=Eigen::Vector4d(1, 1, 1, 1), std::uint8_t alignment=2<< 2, bool draw_bg=false, Eigen::Vector4d bg_color=Eigen::Vector4d(0, 0, 0, 0.75), double font_size=28)
|
void |
add_visual_robot (const robot_t & robot)
|
void |
clear_robots ()
|
void |
clear_sensors ()
|
uint32_t |
collision_category (size_t robot_index, const std::string & body_name)
|
uint32_t |
collision_category (size_t robot_index, size_t body_index)
|
const std::string & |
collision_detector () const
|
uint32_t |
collision_mask (size_t robot_index, const std::string & body_name)
|
uint32_t |
collision_mask (size_t robot_index, size_t body_index)
|
std::pair< uint32_t, uint32_t > |
collision_masks (size_t robot_index, const std::string & body_name)
|
std::pair< uint32_t, uint32_t > |
collision_masks (size_t robot_index, size_t body_index)
|
int |
control_freq () const
|
void |
enable_status_bar (bool enable=true, double font_size=-1)
|
void |
enable_text_panel (bool enable=true, double font_size=-1)
|
std::shared_ptr< gui::Base > |
graphics () const
|
int |
graphics_freq () const
|
Eigen::Vector3d |
gravity () const
|
simu::GUIData * |
gui_data ()
|
bool |
halted_sim () const
|
size_t |
num_robots () const
|
int |
physics_freq () const
|
void |
remove_all_collision_masks ()
|
void |
remove_collision_masks (size_t robot_index)
|
void |
remove_collision_masks (size_t robot_index, const std::string & body_name)
|
void |
remove_collision_masks (size_t robot_index, size_t body_index)
|
void |
remove_robot (const robot_t & robot)
|
void |
remove_robot (size_t index)
|
void |
remove_sensor (const std::shared_ptr< sensor::Sensor > & sensor)
|
void |
remove_sensor (size_t index)
|
void |
remove_sensors (const std::string & type)
|
robot_t |
robot (size_t index) const
|
int |
robot_index (const robot_t & robot) const
|
const std::vector< robot_t > & |
robots () const
|
void |
run (double max_duration=5.0, bool reset_commands=false, bool force_position_bounds=true)
|
bool |
schedule (int freq)
|
Scheduler & |
scheduler ()
|
const Scheduler & |
scheduler () const
|
std::shared_ptr< sensor::Sensor > |
sensor (size_t index) const
|
std::vector< std::shared_ptr< sensor::Sensor > > |
sensors () const
|
void |
set_collision_detector (const std::string & collision_detector)
|
void |
set_collision_masks (size_t robot_index, uint32_t category_mask, uint32_t collision_mask)
|
void |
set_collision_masks (size_t robot_index, const std::string & body_name, uint32_t category_mask, uint32_t collision_mask)
|
void |
set_collision_masks (size_t robot_index, size_t body_index, uint32_t category_mask, uint32_t collision_mask)
|
void |
set_control_freq (int frequency)
|
void |
set_graphics (const std::shared_ptr< gui::Base > & graphics)
|
void |
set_graphics_freq (int frequency)
|
void |
set_gravity (const Eigen::Vector3d & gravity)
|
void |
set_text_panel (const std::string & str)
|
void |
set_timestep (double timestep, bool update_control_freq=true)
|
std::string |
status_bar_text () const
|
bool |
step (bool reset_commands=false, bool force_position_bounds=true)
|
bool |
step_world (bool reset_commands=false, bool force_position_bounds=true)
|
void |
stop_sim (bool disable=true)
|
std::string |
text_panel_text () const
|
double |
timestep () const
|
dart::simulation::WorldPtr |
world ()
|
|
~RobotDARTSimu ()
|
Protected Attributes
Protected Functions
Public Types Documentation
typedef robot_t
using robot_dart::RobotDARTSimu::robot_t = std::shared_ptr<Robot>;
Public Functions Documentation
function RobotDARTSimu
robot_dart::RobotDARTSimu::RobotDARTSimu (
double timestep=0.015
)
function add_checkerboard_floor
std::shared_ptr< Robot > robot_dart::RobotDARTSimu::add_checkerboard_floor (
double floor_width=10.0,
double floor_height=0.1,
double size=1.,
const Eigen::Isometry3d & tf=Eigen::Isometry3d::Identity(),
const std::string & floor_name="checkerboard_floor",
const Eigen::Vector4d & first_color=dart::Color::White(1.),
const Eigen::Vector4d & second_color=dart::Color::Gray(1.)
)
function add_floor
std::shared_ptr< Robot > robot_dart::RobotDARTSimu::add_floor (
double floor_width=10.0,
double floor_height=0.1,
const Eigen::Isometry3d & tf=Eigen::Isometry3d::Identity(),
const std::string & floor_name="floor"
)
function add_robot
void robot_dart::RobotDARTSimu::add_robot (
const robot_t & robot
)
function add_sensor [½]
template<typename T, typename... Args>
inline std::shared_ptr< T > robot_dart::RobotDARTSimu::add_sensor (
Args &&... args
)
function add_sensor [2/2]
void robot_dart::RobotDARTSimu::add_sensor (
const std::shared_ptr< sensor::Sensor > & sensor
)
function add_text
std::shared_ptr< simu::TextData > robot_dart::RobotDARTSimu::add_text (
const std::string & text,
const Eigen::Affine2d & tf=Eigen::Affine2d::Identity(),
Eigen::Vector4d color=Eigen::Vector4d(1, 1, 1, 1),
std::uint8_t alignment=2<< 2,
bool draw_bg=false,
Eigen::Vector4d bg_color=Eigen::Vector4d(0, 0, 0, 0.75),
double font_size=28
)
function add_visual_robot
void robot_dart::RobotDARTSimu::add_visual_robot (
const robot_t & robot
)
function clear_robots
void robot_dart::RobotDARTSimu::clear_robots ()
function clear_sensors
void robot_dart::RobotDARTSimu::clear_sensors ()
function collision_category [½]
uint32_t robot_dart::RobotDARTSimu::collision_category (
size_t robot_index,
const std::string & body_name
)
function collision_category [2/2]
uint32_t robot_dart::RobotDARTSimu::collision_category (
size_t robot_index,
size_t body_index
)
function collision_detector
const std::string & robot_dart::RobotDARTSimu::collision_detector () const
function collision_mask [½]
uint32_t robot_dart::RobotDARTSimu::collision_mask (
size_t robot_index,
const std::string & body_name
)
function collision_mask [2/2]
uint32_t robot_dart::RobotDARTSimu::collision_mask (
size_t robot_index,
size_t body_index
)
function collision_masks [½]
std::pair< uint32_t, uint32_t > robot_dart::RobotDARTSimu::collision_masks (
size_t robot_index,
const std::string & body_name
)
function collision_masks [2/2]
std::pair< uint32_t, uint32_t > robot_dart::RobotDARTSimu::collision_masks (
size_t robot_index,
size_t body_index
)
function control_freq
inline int robot_dart::RobotDARTSimu::control_freq () const
function enable_status_bar
void robot_dart::RobotDARTSimu::enable_status_bar (
bool enable=true,
double font_size=-1
)
function enable_text_panel
void robot_dart::RobotDARTSimu::enable_text_panel (
bool enable=true,
double font_size=-1
)
function graphics
std::shared_ptr< gui::Base > robot_dart::RobotDARTSimu::graphics () const
function graphics_freq
inline int robot_dart::RobotDARTSimu::graphics_freq () const
function gravity
Eigen::Vector3d robot_dart::RobotDARTSimu::gravity () const
function gui_data
simu::GUIData * robot_dart::RobotDARTSimu::gui_data ()
function halted_sim
bool robot_dart::RobotDARTSimu::halted_sim () const
function num_robots
size_t robot_dart::RobotDARTSimu::num_robots () const
function physics_freq
inline int robot_dart::RobotDARTSimu::physics_freq () const
function remove_all_collision_masks
void robot_dart::RobotDARTSimu::remove_all_collision_masks ()
function remove_collision_masks [⅓]
void robot_dart::RobotDARTSimu::remove_collision_masks (
size_t robot_index
)
function remove_collision_masks [⅔]
void robot_dart::RobotDARTSimu::remove_collision_masks (
size_t robot_index,
const std::string & body_name
)
function remove_collision_masks [3/3]
void robot_dart::RobotDARTSimu::remove_collision_masks (
size_t robot_index,
size_t body_index
)
function remove_robot [½]
void robot_dart::RobotDARTSimu::remove_robot (
const robot_t & robot
)
function remove_robot [2/2]
void robot_dart::RobotDARTSimu::remove_robot (
size_t index
)
function remove_sensor [½]
void robot_dart::RobotDARTSimu::remove_sensor (
const std::shared_ptr< sensor::Sensor > & sensor
)
function remove_sensor [2/2]
void robot_dart::RobotDARTSimu::remove_sensor (
size_t index
)
function remove_sensors
void robot_dart::RobotDARTSimu::remove_sensors (
const std::string & type
)
function robot
robot_t robot_dart::RobotDARTSimu::robot (
size_t index
) const
function robot_index
int robot_dart::RobotDARTSimu::robot_index (
const robot_t & robot
) const
function robots
const std::vector< robot_t > & robot_dart::RobotDARTSimu::robots () const
function run
void robot_dart::RobotDARTSimu::run (
double max_duration=5.0,
bool reset_commands=false,
bool force_position_bounds=true
)
function schedule
inline bool robot_dart::RobotDARTSimu::schedule (
int freq
)
function scheduler [½]
inline Scheduler & robot_dart::RobotDARTSimu::scheduler ()
function scheduler [2/2]
inline const Scheduler & robot_dart::RobotDARTSimu::scheduler () const
function sensor
std::shared_ptr< sensor::Sensor > robot_dart::RobotDARTSimu::sensor (
size_t index
) const
function sensors
std::vector< std::shared_ptr< sensor::Sensor > > robot_dart::RobotDARTSimu::sensors () const
function set_collision_detector
void robot_dart::RobotDARTSimu::set_collision_detector (
const std::string & collision_detector
)
function set_collision_masks [⅓]
void robot_dart::RobotDARTSimu::set_collision_masks (
size_t robot_index,
uint32_t category_mask,
uint32_t collision_mask
)
function set_collision_masks [⅔]
void robot_dart::RobotDARTSimu::set_collision_masks (
size_t robot_index,
const std::string & body_name,
uint32_t category_mask,
uint32_t collision_mask
)
function set_collision_masks [3/3]
void robot_dart::RobotDARTSimu::set_collision_masks (
size_t robot_index,
size_t body_index,
uint32_t category_mask,
uint32_t collision_mask
)
function set_control_freq
inline void robot_dart::RobotDARTSimu::set_control_freq (
int frequency
)
function set_graphics
void robot_dart::RobotDARTSimu::set_graphics (
const std::shared_ptr< gui::Base > & graphics
)
function set_graphics_freq
inline void robot_dart::RobotDARTSimu::set_graphics_freq (
int frequency
)
function set_gravity
void robot_dart::RobotDARTSimu::set_gravity (
const Eigen::Vector3d & gravity
)
function set_text_panel
void robot_dart::RobotDARTSimu::set_text_panel (
const std::string & str
)
function set_timestep
void robot_dart::RobotDARTSimu::set_timestep (
double timestep,
bool update_control_freq=true
)
function status_bar_text
std::string robot_dart::RobotDARTSimu::status_bar_text () const
function step
bool robot_dart::RobotDARTSimu::step (
bool reset_commands=false,
bool force_position_bounds=true
)
function step_world
bool robot_dart::RobotDARTSimu::step_world (
bool reset_commands=false,
bool force_position_bounds=true
)
function stop_sim
void robot_dart::RobotDARTSimu::stop_sim (
bool disable=true
)
function text_panel_text
std::string robot_dart::RobotDARTSimu::text_panel_text () const
function timestep
double robot_dart::RobotDARTSimu::timestep () const
function world
dart::simulation::WorldPtr robot_dart::RobotDARTSimu::world ()
function ~RobotDARTSimu
robot_dart::RobotDARTSimu::~RobotDARTSimu ()
Protected Attributes Documentation
variable _break
bool robot_dart::RobotDARTSimu::_break;
variable _control_freq
int robot_dart::RobotDARTSimu::_control_freq;
variable _graphics
std::shared_ptr<gui::Base> robot_dart::RobotDARTSimu::_graphics;
variable _graphics_freq
int robot_dart::RobotDARTSimu::_graphics_freq;
variable _gui_data
std::unique_ptr<simu::GUIData> robot_dart::RobotDARTSimu::_gui_data;
variable _old_index
size_t robot_dart::RobotDARTSimu::_old_index;
variable _physics_freq
int robot_dart::RobotDARTSimu::_physics_freq;
variable _robots
std::vector<robot_t> robot_dart::RobotDARTSimu::_robots;
variable _scheduler
Scheduler robot_dart::RobotDARTSimu::_scheduler;
variable _sensors
std::vector<std::shared_ptr<sensor::Sensor> > robot_dart::RobotDARTSimu::_sensors;
variable _status_bar
std::shared_ptr<simu::TextData> robot_dart::RobotDARTSimu::_status_bar;
variable _text_panel
std::shared_ptr<simu::TextData> robot_dart::RobotDARTSimu::_text_panel;
variable _world
dart::simulation::WorldPtr robot_dart::RobotDARTSimu::_world;
Protected Functions Documentation
function _enable
void robot_dart::RobotDARTSimu::_enable (
std::shared_ptr< simu::TextData > & text,
bool enable,
double font_size
)
The documentation for this class was generated from the following file robot_dart/robot_dart_simu.hpp