cajun::sim_world_t Class Reference

#include <sim_world.H>

List of all members.

Public Member Functions

 sim_world_t (char const *obj_file, char const *rndf_file, bool no_sleep, proj_t *proj, char const *lane_dir_, bool pub_pt_, bool pub_obj_)
 ~sim_world_t ()
void start_world ()

Private Member Functions

void read_object_file (char const *filename)
 Load object file into simulator.
bool read_object_file_v1 (char const *filename)
 Load object file version 1 into simulator.
bool read_object_file_v2 (char const *filename)
 Load object file version 2 into simulator.
void add_object (object_info_t *obj_info)
double get_avg_step_time ()
void check_collisions ()
void remove_collision_joints ()

Static Private Member Functions

static void collision_callback (void *data, dGeomID o1, dGeomID o2)

Private Attributes

sim_world_object_tm_sim_object
std::vector< sim_world_object_t * > m_objects
char const * m_object_file
double m_step_increment
double m_step_hist [STEP_HIST_SIZE]
unsigned m_step_hist_counter
double m_current_time
unsigned m_sleep_time
double m_prev_time
double m_play_value
bool m_no_sleep
sim_time_data_t m_sim_time
std::vector< obstacle_data_t > * obstacle_data_list
std::vector
< obstacle_points_data_t > * 
obstacle_point_list
access_data_t * m_access_data
playback_control_data_t m_playback_control_data
dGeomID m_ground
dSpaceID m_world_space
rndf_tool_t * m_rndf_tool
rndf_t * m_rndf
char const * m_lane_dir
bool m_publish_points
bool m_publish_objects

Static Private Attributes

static dJointGroupID m_contact_group
static dWorldID m_world_body

Constructor & Destructor Documentation

sim_world_t::sim_world_t ( char const *  obj_file,
char const *  rndf_file,
bool  no_sleep,
proj_t *  proj,
char const *  lane_dir_,
bool  pub_pt_,
bool  pub_obj_ 
)
sim_world_t::~sim_world_t (  ) 

References m_sim_object.


Member Function Documentation

void sim_world_t::add_object ( object_info_t obj_info  )  [private]
void sim_world_t::check_collisions (  )  [private]

References collision_callback(), and m_world_space.

Referenced by start_world().

void sim_world_t::collision_callback ( void *  data,
dGeomID  o1,
dGeomID  o2 
) [static, private]
double sim_world_t::get_avg_step_time (  )  [private]

References m_step_hist, and STEP_HIST_SIZE.

Referenced by start_world().

void sim_world_t::read_object_file ( char const *  filename  )  [private]

Load object file into simulator.

Will test for xml object file format and attempt to load it, otherwise it will attempt to load older version of object file.

Parameters:
filename Object file provided, either old *.obj or newer *xml

References progname, read_object_file_v1(), and read_object_file_v2().

Referenced by sim_world_t().

bool sim_world_t::read_object_file_v1 ( char const *  filename  )  [private]

Load object file version 1 into simulator.

Will load original object file format into simulator.

Parameters:
filename Object file provided, in simulator's .obj format.
Returns:
True if load was successful.

References add_object(), cajun::goal_t::angle, cajun::goal_t::distance, cajun::DYN_SIM, cajun::mesh_object_info_t::indices_file_is_full_path, cajun::waypoint_data_t::initial_pause, cajun::rndf_goal_t::lane, cajun::object_info_t::m_controller, cajun::object_info_t::m_dyn_sim_data, cajun::object_info_t::m_lane_id, cajun::object_info_t::m_mesh_object, cajun::object_info_t::m_num_objects, cajun::object_info_t::m_num_sensors, cajun::object_info_t::m_object, cajun::object_info_t::m_object_id, cajun::object_info_t::m_orient_x, cajun::object_info_t::m_orient_y, cajun::object_info_t::m_orient_z, cajun::object_info_t::m_pos_x, cajun::object_info_t::m_pos_y, cajun::object_info_t::m_pos_z, cajun::object_info_t::m_script_data, cajun::object_info_t::m_segment_id, cajun::object_info_t::m_sensor, cajun::object_info_t::m_shape, cajun::object_info_t::m_size_x, cajun::object_info_t::m_size_y, cajun::object_info_t::m_size_z, cajun::object_info_t::m_waypoint_data, cajun::object_info_t::m_wp_id, cajun::MESH, cajun::rndf_goal_t::pause, cajun::goal_t::pause, progname, cajun::SCRIPT, cajun::rndf_goal_t::segment, cajun::sensor_object_t::sensor, cajun::sensor_object_t::sensor_filename, cajun::rndf_goal_t::sog, cajun::goal_t::sog, cajun::STATIC, cajun::mesh_object_info_t::vertices_file_is_full_path, cajun::rndf_goal_t::waypoint, and cajun::WAYPOINT.

Referenced by read_object_file().

bool sim_world_t::read_object_file_v2 ( char const *  filename  )  [private]

Load object file version 2 into simulator.

Will load XML-based object file format into simulator.

Parameters:
filename Object file provided, in the newer XML-based format.
Returns:
True if load was successful.

References add_object(), cajun::DYN_NO_SIM, cajun::DYN_SIM, cajun::mesh_object_info_t::indices_file, cajun::mesh_object_info_t::indices_file_is_full_path, cajun::waypoint_data_t::initial_pause, cajun::rndf_goal_t::lane, cajun::dyn_sim_object_t::lever_rate, cajun::object_info_t::m_controller, cajun::object_info_t::m_dyn_sim_data, cajun::object_info_t::m_lane_id, cajun::object_info_t::m_mesh_object, cajun::object_info_t::m_num_sensors, cajun::object_info_t::m_object, cajun::object_info_t::m_object_id, cajun::object_info_t::m_orient_x, cajun::object_info_t::m_orient_y, cajun::object_info_t::m_orient_z, cajun::object_info_t::m_pos_x, cajun::object_info_t::m_pos_y, cajun::object_info_t::m_pos_z, m_rndf, cajun::object_info_t::m_segment_id, cajun::object_info_t::m_sensor, cajun::object_info_t::m_shape, cajun::object_info_t::m_size_x, cajun::object_info_t::m_size_y, cajun::object_info_t::m_size_z, cajun::object_info_t::m_waypoint_data, cajun::object_info_t::m_wp_id, cajun::MESH, cajun::waypoint_data_t::num_goals, cajun::rndf_goal_t::pause, progname, cajun::rndf_goal_t::segment, cajun::sensor_object_t::sensor, cajun::SENSOR, cajun::sensor_object_t::sensor_filename, cajun::rndf_goal_t::sog, cajun::STATIC, cajun::dyn_sim_object_t::throttle_rate, cajun::mesh_object_info_t::vertices_file, cajun::mesh_object_info_t::vertices_file_is_full_path, cajun::rndf_goal_t::waypoint, cajun::WAYPOINT, cajun::waypoint_data_t::waypoint_goals, cajun::dyn_sim_object_t::wheel, cajun::dyn_sim_object_t::wheel_height, and cajun::dyn_sim_object_t::wheel_width.

Referenced by read_object_file().

void sim_world_t::remove_collision_joints (  )  [private]

References m_contact_group.

Referenced by start_world().

void sim_world_t::start_world (  ) 

Member Data Documentation

access_data_t* cajun::sim_world_t::m_access_data [private]
dJointGroupID sim_world_t::m_contact_group [static, private]

Referenced by sim_world_t(), and start_world().

dGeomID cajun::sim_world_t::m_ground [private]

Referenced by add_object(), and sim_world_t().

char const* cajun::sim_world_t::m_lane_dir [private]

Referenced by add_object(), and sim_world_t().

Referenced by sim_world_t(), and start_world().

char const* cajun::sim_world_t::m_object_file [private]

Referenced by sim_world_t().

Referenced by add_object(), and start_world().

Referenced by sim_world_t(), and start_world().

playback_control_data_t cajun::sim_world_t::m_playback_control_data [private]

Referenced by start_world().

Referenced by sim_world_t(), and start_world().

Referenced by sim_world_t(), and start_world().

Referenced by sim_world_t(), and start_world().

rndf_t* cajun::sim_world_t::m_rndf [private]
rndf_tool_t* cajun::sim_world_t::m_rndf_tool [private]

Referenced by add_object(), and sim_world_t().

sim_time_data_t cajun::sim_world_t::m_sim_time [private]

Referenced by sim_world_t(), and start_world().

Referenced by sim_world_t(), and start_world().

double cajun::sim_world_t::m_step_hist[STEP_HIST_SIZE] [private]

Referenced by sim_world_t(), and start_world().

Referenced by sim_world_t().

dWorldID sim_world_t::m_world_body [static, private]
std::vector<obstacle_data_t>* cajun::sim_world_t::obstacle_data_list [private]

Referenced by start_world().

std::vector<obstacle_points_data_t>* cajun::sim_world_t::obstacle_point_list [private]

Referenced by start_world().


The documentation for this class was generated from the following files:

Generated on Fri Apr 9 10:45:14 2010 for simulator by  doxygen 1.6.1