5#include <chrono/functions/ChFunctionConst.h>
6#include <chrono/physics/ChBodyEasy.h>
7#include <chrono/physics/ChLinkMotorRotationSpeed.h>
8#include <chrono/physics/ChSystemNSC.h>
14using namespace bitsim;
21auto build_wheel(std::shared_ptr<chrono::ChContactMaterialNSC> material,
22 const chrono::ChVector3d &pos);
23auto build_motor(std::shared_ptr<chrono::ChBodyEasyCylinder> wheel,
24 std::shared_ptr<chrono::ChFunctionConst> speed_func,
25 std::shared_ptr<chrono::ChBodyEasyBox> chassis,
const chrono::ChVector3d &pos);
34 void add_to_sys(chrono::ChSystemNSC &sys)
const;
37 void build(std::shared_ptr<chrono::ChContactMaterialNSC> material);
46 chrono::ChVector3d
position() noexcept {
return chassis_->GetPos(); }
49 std::shared_ptr<chrono::ChBodyEasyBox> chassis_;
50 std::shared_ptr<chrono::ChBodyEasyCylinder> left_wheel_;
51 std::shared_ptr<chrono::ChBodyEasyCylinder> right_wheel_;
52 std::shared_ptr<chrono::ChLinkMotorRotationSpeed> left_wheel_motor_;
53 std::shared_ptr<chrono::ChLinkMotorRotationSpeed> right_wheel_motor_;
54 std::shared_ptr<chrono::ChBodyEasySphere> caster_wheel_;
55 std::shared_ptr<chrono::ChLinkLockRevolute> caster_link_joint_;
The basic types of bitsim. Code outside this file names Eigen's matrix and vector types only through ...
chrono::ChVector3d position() noexcept
Definition robot.h:46
void add_to_sys(chrono::ChSystemNSC &sys) const
Definition chrono_smc_system.cpp:126
void reset()
Definition chrono_smc_system.cpp:143
void set_speed(real_t speed)
Definition chrono_smc_system.cpp:137
void build(std::shared_ptr< chrono::ChContactMaterialNSC > material)
Definition chrono_smc_system.cpp:111
double real_t
real_t
Definition bitsim_types.h:20
Definition chrono_smc_system.cpp:17
const real_t WHEEL_RADIUS
Definition robot.h:16
auto build_motor(std::shared_ptr< chrono::ChBodyEasyCylinder > wheel, std::shared_ptr< chrono::ChFunctionConst > speed_func, std::shared_ptr< chrono::ChBodyEasyBox > chassis, const chrono::ChVector3d &pos)
Definition chrono_smc_system.cpp:99
const real_t CHASSIS_HEIGHT
Definition robot.h:17
const real_t WHEEL_WIDTH
Definition robot.h:18
const real_t CASTER_RADIUS
Definition robot.h:19
auto build_wheel(std::shared_ptr< chrono::ChContactMaterialNSC > material, const chrono::ChVector3d &pos)
Definition chrono_smc_system.cpp:63