rmf_simulation¶
Simulation plugins for use with OpenRMF.
rmf_simulation API¶
Class Hierarchy¶
-
- Namespace crowd_simulator
- Class AgentPose3d
- Class CrowdSimInterface
- Struct CrowdSimInterface::Object
- Class MengeHandle
- Class ModelTypeDatabase
- Struct ModelTypeDatabase::Record
- Namespace rmf_building_sim_common
- Struct MotionParams
- Class DoorCommon
- Struct DoorCommon::DoorElement
- Struct DoorCommon::DoorUpdateRequest
- Struct DoorCommon::DoorUpdateResult
- Class LiftCommon
- Struct LiftCommon::LiftUpdateResult
- Namespace rmf_dispenser_common
- Class TeleportDispenserCommon
- Namespace rmf_ingestor_common
- Class TeleportIngestorCommon
- Namespace rmf_plugins_utils
- Struct SimEntity
- Enum Simulator
- Struct MotionParams
- Namespace rmf_readonly_common
- Class ReadonlyCommon
- Namespace rmf_robot_sim_common
- Enum SteeringType
- Struct AckermannTrajectory
- Struct TrajectoryPoint
- Class SlotcarCommon
- Struct SlotcarCommon::ChargerWaypoint
- Struct SlotcarCommon::PowerParams
- Struct SlotcarCommon::UpdateResult
- Namespace crowd_simulator
File Hierarchy¶
-
- File crowd_simulator_common.hpp
- File dispenser_common.hpp
- File door_common.hpp
- File ingestor_common.hpp
- File lift_common.hpp
- File readonly_common.hpp
- File slotcar_common.hpp
- File utils.hpp
- File utils.hpp
Full API¶
Namespaces¶
Namespace rmf_building_sim_common¶
Classes¶
Functions¶
Function rmf_building_sim_common::compute_desired_rate_of_change
Template Function rmf_building_sim_common::get_element_required
Template Function rmf_building_sim_common::get_sdf_attribute_required
Template Function rmf_building_sim_common::get_sdf_param_if_available
Template Function rmf_building_sim_common::get_sdf_param_required
Typedefs¶
Namespace rmf_plugins_utils¶
Classes¶
Enums¶
Functions¶
Classes and Structs¶
Struct CrowdSimInterface::Object¶
Defined in File crowd_simulator_common.hpp
Nested Relationships¶
This struct is a nested type of Class CrowdSimInterface.
Struct Documentation¶
-
struct
crowd_simulator::CrowdSimInterface
::
Object
Public Functions
-
AnimState
get_next_state
(bool condition)
-
AnimState
Struct ModelTypeDatabase::Record¶
Defined in File crowd_simulator_common.hpp
Nested Relationships¶
This struct is a nested type of Class ModelTypeDatabase.
Struct Documentation¶
-
struct
crowd_simulator::ModelTypeDatabase
::
Record
Public Members
-
std::string
type_name
-
std::string
file_name
-
AgentPose3d
pose
-
std::string
animation
-
std::string
idle_animation
-
double
animation_speed
-
std::string
Struct DoorCommon::DoorElement¶
Defined in File door_common.hpp
Nested Relationships¶
This struct is a nested type of Class DoorCommon.
Struct Documentation¶
-
struct
rmf_building_sim_common::DoorCommon
::
DoorElement
¶
Struct DoorCommon::DoorUpdateRequest¶
Defined in File door_common.hpp
Nested Relationships¶
This struct is a nested type of Class DoorCommon.
Struct Documentation¶
-
struct
rmf_building_sim_common::DoorCommon
::
DoorUpdateRequest
Public Members
-
std::string
joint_name
-
double
position
-
double
velocity
-
std::string
Struct DoorCommon::DoorUpdateResult¶
Defined in File door_common.hpp
Nested Relationships¶
This struct is a nested type of Class DoorCommon.
Struct Documentation¶
-
struct
rmf_building_sim_common::DoorCommon
::
DoorUpdateResult
Public Members
-
std::string
joint_name
-
double
velocity
-
double
fmax
-
std::string
Struct LiftCommon::LiftUpdateResult¶
Defined in File lift_common.hpp
Nested Relationships¶
This struct is a nested type of Class LiftCommon.
Struct Documentation¶
-
struct
rmf_building_sim_common::LiftCommon
::
LiftUpdateResult
Public Members
-
double
velocity
-
double
fmax
-
double
Struct MotionParams¶
Defined in File utils.hpp
Struct Documentation¶
-
struct
rmf_building_sim_common
::
MotionParams
¶
Struct MotionParams¶
Defined in File utils.hpp
Struct Documentation¶
-
struct
rmf_plugins_utils
::
MotionParams
¶
Struct SimEntity¶
Defined in File utils.hpp
Struct Documentation¶
Struct AckermannTrajectory¶
Defined in File slotcar_common.hpp
Struct Documentation¶
Struct SlotcarCommon::ChargerWaypoint¶
Defined in File slotcar_common.hpp
Nested Relationships¶
This struct is a nested type of Class SlotcarCommon.
Struct Documentation¶
-
struct
rmf_robot_sim_common::SlotcarCommon
::
ChargerWaypoint
¶ Public Functions
-
inline
ChargerWaypoint
(double x, double y)¶
-
inline
Struct SlotcarCommon::PowerParams¶
Defined in File slotcar_common.hpp
Nested Relationships¶
This struct is a nested type of Class SlotcarCommon.
Struct Documentation¶
-
struct
rmf_robot_sim_common::SlotcarCommon
::
PowerParams
¶
Struct SlotcarCommon::UpdateResult¶
Defined in File slotcar_common.hpp
Nested Relationships¶
This struct is a nested type of Class SlotcarCommon.
Struct Documentation¶
-
struct
rmf_robot_sim_common::SlotcarCommon
::
UpdateResult
Public Members
-
double
v
= 0.0
-
double
w
= 0.0
-
double
speed
= 0.0
-
double
Struct TrajectoryPoint¶
Defined in File slotcar_common.hpp
Struct Documentation¶
Class AgentPose3d¶
Defined in File crowd_simulator_common.hpp
Class Documentation¶
-
class
crowd_simulator
::
AgentPose3d
¶ Public Functions
-
inline
AgentPose3d
()¶
-
inline
AgentPose3d
(double x, double y, double z, double roll, double pitch, double yaw)¶
-
inline double
x
() const¶
-
inline double
y
() const¶
-
inline double
z
() const¶
-
inline double
roll
() const¶
-
inline double
pitch
() const¶
-
inline double
yaw
() const¶
-
inline void
x
(double x)¶
-
inline void
y
(double y)¶
-
inline void
z
(double z)¶
-
inline void
roll
(double roll)¶
-
inline void
pitch
(double pitch)¶
-
inline void
yaw
(double yaw)¶
-
template<typename
IgnMathPose3d
>
inline IgnMathPose3dconvert_to_ign_math_pose_3d
()¶
-
inline
Class CrowdSimInterface¶
Defined in File crowd_simulator_common.hpp
Nested Relationships¶
Class Documentation¶
-
class
crowd_simulator
::
CrowdSimInterface
¶ Public Types
Public Functions
-
inline
CrowdSimInterface
()¶
-
rclcpp::Logger
logger
() const¶
-
bool
init_crowd_sim
()¶
-
double
get_sim_time_step
() const¶
-
size_t
get_num_objects
() const¶
-
void
one_step_sim
(double time_step) const¶
-
double
get_switch_anim_distance_th
() const¶
-
std::vector<std::string>
get_switch_anim_name
() const¶
-
bool
enabled
() const¶
-
template<typename
IgnMathPose3d
>
voidupdate_external_agent
(size_t id, const IgnMathPose3d &model_pose)¶
-
template<typename
IgnMathPose3d
>
voidupdate_external_agent
(const AgentPtr agent_ptr, const IgnMathPose3d &model_pose)¶
-
template<typename
IgnMathPose3d
>
IgnMathPose3dget_agent_pose
(size_t id, double delta_sim_time)¶
-
template<typename
IgnMathPose3d
>
IgnMathPose3dget_agent_pose
(const AgentPtr agent_ptr, double delta_sim_time)¶
Public Members
-
std::shared_ptr<ModelTypeDatabase>
_model_type_db_ptr
¶
-
struct
Object
¶
-
inline
Class MengeHandle¶
Defined in File crowd_simulator_common.hpp
Inheritance Relationships¶
public std::enable_shared_from_this< MengeHandle >
Class Documentation¶
-
class
crowd_simulator
::
MengeHandle
: public std::enable_shared_from_this<MengeHandle>¶ Public Functions
-
inline
MengeHandle
(const std::string &resource_path, const std::string &behavior_file, const std::string &scene_file, const float sim_time_step = 0.0)¶
-
void
set_sim_time_step
(float sim_time_step)¶
-
float
get_sim_time_step
() const¶
-
size_t
get_agent_count
()¶
-
void
sim_step
() const¶
Public Static Functions
-
static std::shared_ptr<MengeHandle>
init_and_make
(const std::string &resource_path, const std::string &behavior_file, const std::string &scene_file, const float sim_time_step)¶
-
inline
Class ModelTypeDatabase¶
Defined in File crowd_simulator_common.hpp
Nested Relationships¶
Class Documentation¶
Class DoorCommon¶
Defined in File door_common.hpp
Nested Relationships¶
Class Documentation¶
-
class
rmf_building_sim_common
::
DoorCommon
¶ Public Functions
-
rclcpp::Logger
logger
() const¶
-
std::vector<std::string>
joint_names
() const¶
-
MotionParams &
params
()¶
-
std::vector<DoorUpdateResult>
update
(const double time, const std::vector<DoorUpdateRequest> &request)¶
Public Static Functions
-
struct
DoorUpdateRequest
¶
-
struct
DoorUpdateResult
¶
-
rclcpp::Logger
Class LiftCommon¶
Defined in File lift_common.hpp
Nested Relationships¶
Class Documentation¶
-
class
rmf_building_sim_common
::
LiftCommon
¶ Public Functions
-
rclcpp::Logger
logger
() const¶
-
LiftUpdateResult
update
(const double time, const double position, const double velocity)¶
-
std::string
get_joint_name
() const¶
-
double
get_elevation
() const¶
-
bool
motion_state_changed
()¶
Public Static Functions
-
struct
LiftUpdateResult
¶
-
rclcpp::Logger
Class TeleportDispenserCommon¶
Defined in File dispenser_common.hpp
Class Documentation¶
-
class
rmf_dispenser_common
::
TeleportDispenserCommon
¶ Public Types
-
using
FleetState
= rmf_fleet_msgs::msg::FleetState¶
-
using
FleetStateIt
= std::unordered_map<std::string, FleetState::UniquePtr>::iterator¶
-
using
DispenserState
= rmf_dispenser_msgs::msg::DispenserState¶
-
using
DispenserRequest
= rmf_dispenser_msgs::msg::DispenserRequest¶
-
using
DispenserResult
= rmf_dispenser_msgs::msg::DispenserResult¶
Public Functions
-
void
send_dispenser_response
(uint8_t status) const¶
-
void
fleet_state_cb
(FleetState::UniquePtr msg)¶
-
void
dispenser_request_cb
(DispenserRequest::UniquePtr msg)¶
-
void
on_update
(std::function<void(FleetStateIt, std::vector<rmf_plugins_utils::SimEntity>&)> fill_robot_list_cb, std::function<rmf_plugins_utils::SimEntity(const std::vector<rmf_plugins_utils::SimEntity>&, bool&)> find_nearest_model_cb, std::function<void(const rmf_plugins_utils::SimEntity&)> place_on_entity_cb, std::function<bool(void)> check_filled_cb)¶
Public Members
-
bool
dispense
= false¶
-
DispenserRequest
latest
¶
-
std::string
guid
¶
-
double
last_pub_time
= 0.0¶
-
double
sim_time
= 0.0¶
-
bool
item_en_found
= false¶
-
bool
dispenser_filled
= false¶
-
rclcpp::Node::SharedPtr
ros_node
¶
-
std::unordered_map<std::string, FleetState::UniquePtr>
fleet_states
¶
-
DispenserState
current_state
¶
-
using
Class TeleportIngestorCommon¶
Defined in File ingestor_common.hpp
Class Documentation¶
-
class
rmf_ingestor_common
::
TeleportIngestorCommon
¶ Public Types
-
using
FleetState
= rmf_fleet_msgs::msg::FleetState¶
-
using
FleetStateIt
= std::unordered_map<std::string, FleetState::UniquePtr>::iterator¶
-
using
IngestorState
= rmf_ingestor_msgs::msg::IngestorState¶
-
using
IngestorRequest
= rmf_ingestor_msgs::msg::IngestorRequest¶
-
using
IngestorResult
= rmf_ingestor_msgs::msg::IngestorResult¶
Public Functions
-
void
send_ingestor_response
(uint8_t status) const¶
-
void
fleet_state_cb
(FleetState::UniquePtr msg)¶
-
void
ingestor_request_cb
(IngestorRequest::UniquePtr msg)¶
-
void
on_update
(std::function<void(FleetStateIt, std::vector<rmf_plugins_utils::SimEntity>&)> fill_robot_list_cb, std::function<rmf_plugins_utils::SimEntity(const std::vector<rmf_plugins_utils::SimEntity>&, bool&)> find_nearest_model_cb, std::function<bool(const SimEntity&)> get_payload_model_cb, std::function<void()> transport_model_cbstd::function<void(void)> send_ingested_item_home_cb)¶
Public Members
-
bool
ingest
= false¶
-
IngestorRequest
latest
¶
-
std::string
_guid
¶
-
bool
ingestor_filled
= false¶
-
double
last_pub_time
= 0.0¶
-
double
last_ingested_time
= 0.0¶
-
double
sim_time
= 0.0¶
-
rclcpp::Node::SharedPtr
ros_node
¶
-
std::unordered_map<std::string, Eigen::Isometry3d>
non_static_models_init_poses
¶
-
std::unordered_map<std::string, FleetState::UniquePtr>
fleet_states
¶
-
IngestorState
current_state
¶
-
using
Class ReadonlyCommon¶
Defined in File readonly_common.hpp
Class Documentation¶
-
class
rmf_readonly_common
::
ReadonlyCommon
¶ Public Types
-
using
BuildingMap
= rmf_building_map_msgs::msg::BuildingMap¶
-
using
Level
= rmf_building_map_msgs::msg::Level¶
-
using
Graph
= rmf_building_map_msgs::msg::Graph¶
-
using
Location
= rmf_fleet_msgs::msg::Location¶
Public Functions
-
void
set_name
(const std::string &name)¶
-
std::string
get_name
() const¶
-
rclcpp::Logger
logger
()¶
-
void
on_update
(Eigen::Isometry3d &pose, double sim_time)¶
Public Members
-
rclcpp::Node::SharedPtr
ros_node
¶
-
using
Class SlotcarCommon¶
Defined in File slotcar_common.hpp
Nested Relationships¶
Class Documentation¶
-
class
rmf_robot_sim_common
::
SlotcarCommon
¶ Public Functions
-
SlotcarCommon
()¶
-
rclcpp::Logger
logger
() const¶
-
void
set_model_name
(const std::string &model_name)¶
-
std::string
model_name
() const¶
-
UpdateResult
update
(const Eigen::Isometry3d &pose, const std::vector<Eigen::Vector3d> &obstacle_positions, const double time)¶
-
bool
emergency_stop
(const std::vector<Eigen::Vector3d> &obstacle_positions, const Eigen::Vector3d ¤t_heading)¶
-
std::array<double, 2>
calculate_control_signals
(const std::array<double, 2> &curr_velocities, const std::pair<double, double> &displacements, const double dt, const double target_linear_velocity = 0.0) const¶
-
std::array<double, 2>
calculate_joint_control_signals
(const std::array<double, 2> &w_tire, const std::pair<double, double> &displacements, const double dt) const¶
-
void
charge_state_cb
(const std::string &name, bool selected)¶
-
void
publish_robot_state
(const double time)¶
-
struct
UpdateResult
¶
-
Enums¶
Enum Simulator¶
Defined in File utils.hpp
Enum Documentation¶
Functions¶
Function rmf_building_sim_common::compute_desired_rate_of_change¶
Defined in File utils.hpp
Function Documentation¶
-
double
rmf_building_sim_common
::
compute_desired_rate_of_change
(double _s_target, double _v_actual, const MotionParams &_motion_params, const double _dt)¶
Function rmf_building_sim_common::compute_ds¶
Defined in File utils.hpp
Function Documentation¶
-
double
rmf_building_sim_common
::
compute_ds
(double s_target, double v_actual, const double v_max, const double accel_nom, const double accel_max, const double dt)¶
Template Function rmf_building_sim_common::get_element_required¶
Defined in File utils.hpp
Function Documentation¶
-
template<typename
SdfPtrT
, typenameSdfElementPtrT
>
boolrmf_building_sim_common
::
get_element_required
(SdfPtrT &_sdf, const std::string &_element_name, SdfElementPtrT &_element)¶
Template Function rmf_building_sim_common::get_sdf_attribute_required¶
Defined in File utils.hpp
Function Documentation¶
Template Function rmf_building_sim_common::get_sdf_param_if_available¶
Defined in File utils.hpp
Function Documentation¶
Template Function rmf_building_sim_common::get_sdf_param_required¶
Defined in File utils.hpp
Function Documentation¶
Function rmf_plugins_utils::compute_desired_rate_of_change¶
Defined in File utils.hpp
Function Documentation¶
-
double
rmf_plugins_utils
::
compute_desired_rate_of_change
(double _s_target, double _v_actual, const MotionParams &_motion_params, const double _dt)¶
Function rmf_plugins_utils::compute_ds¶
Defined in File utils.hpp
Function Documentation¶
-
double
rmf_plugins_utils
::
compute_ds
(double s_target, double v_actual, const double v_max, const double accel_nom, const double accel_max, const double dt, const double v_target = 0.0)¶
Template Function rmf_plugins_utils::convert(const Eigen::Quaterniond&, IgnQuatT&)¶
Defined in File utils.hpp
Function Documentation¶
Template Function rmf_plugins_utils::convert(const Eigen::Vector3d&, IgnVec3T&)¶
Defined in File utils.hpp
Function Documentation¶
Template Function rmf_plugins_utils::convert_pose¶
Defined in File utils.hpp
Function Documentation¶
Template Function rmf_plugins_utils::convert_quat¶
Defined in File utils.hpp
Function Documentation¶
Template Function rmf_plugins_utils::convert_to_pose¶
Defined in File utils.hpp
Function Documentation¶
-
template<typename
IgnPoseT
>
inline autormf_plugins_utils
::
convert_to_pose
(const Eigen::Isometry3d &_tf)¶
Template Function rmf_plugins_utils::convert_vec¶
Defined in File utils.hpp
Function Documentation¶
Template Function rmf_plugins_utils::get_element_required¶
Defined in File utils.hpp
Function Documentation¶
-
template<typename
SdfPtrT
, typenameSdfElementPtrT
>
boolrmf_plugins_utils
::
get_element_required
(SdfPtrT &_sdf, const std::string &_element_name, SdfElementPtrT &_element)¶
Template Function rmf_plugins_utils::get_sdf_attribute_required¶
Defined in File utils.hpp
Function Documentation¶
Template Function rmf_plugins_utils::get_sdf_param_if_available¶
Defined in File utils.hpp
Function Documentation¶
Template Function rmf_plugins_utils::get_sdf_param_required¶
Defined in File utils.hpp
Function Documentation¶
Template Function rmf_plugins_utils::make_response¶
Defined in File utils.hpp
Function Documentation¶
Function rmf_plugins_utils::simulation_now¶
Defined in File utils.hpp
Function Documentation¶
-
rclcpp::Time
rmf_plugins_utils
::
simulation_now
(double t)¶
Typedefs¶
Typedef crowd_simulator::AgentPtr¶
Defined in File crowd_simulator_common.hpp
Typedef Documentation¶
-
using
crowd_simulator
::
AgentPtr
= std::shared_ptr<Menge::Agents::BaseAgent>¶
Typedef rmf_building_sim_common::DoorMode¶
Defined in File door_common.hpp
Typedef Documentation¶
-
typedef rmf_door_msgs::msg::DoorMode
rmf_building_sim_common
::
DoorMode
¶
Typedef rmf_building_sim_common::DoorRequest¶
Defined in File door_common.hpp
Typedef Documentation¶
-
typedef rmf_door_msgs::msg::DoorRequest
rmf_building_sim_common
::
DoorRequest
¶
Typedef rmf_building_sim_common::DoorState¶
Defined in File door_common.hpp
Typedef Documentation¶
-
typedef rmf_door_msgs::msg::DoorState
rmf_building_sim_common
::
DoorState
¶
Typedef rmf_building_sim_common::LiftRequest¶
Defined in File lift_common.hpp
Typedef Documentation¶
-
using
rmf_building_sim_common
::
LiftRequest
= rmf_lift_msgs::msg::LiftRequest¶
Typedef rmf_building_sim_common::LiftState¶
Defined in File lift_common.hpp
Typedef Documentation¶
-
using
rmf_building_sim_common
::
LiftState
= rmf_lift_msgs::msg::LiftState¶