set up joystick

This commit is contained in:
LuoBin 2025-03-03 14:27:54 +08:00
parent 2f5459d466
commit 631af97b77
2 changed files with 3 additions and 2 deletions

View File

@ -3,6 +3,7 @@
UnitreeSdk2Bridge::UnitreeSdk2Bridge(mjModel *model, mjData *data) : mj_model_(model), mj_data_(data)
{
CheckSensor();
SetupJoystick();
if (idl_type_ == 0)
{

View File

@ -110,7 +110,7 @@ public:
void Run();
void PrintSceneInformation();
void CheckSensor();
void SetupJoystick(string device, string js_type, int bits);
void SetupJoystick(string device = "/dev/input/js0", string js_type = "xbox", int bits = 16);
ChannelSubscriberPtr<unitree_go::msg::dds_::LowCmd_> low_cmd_go_suber_;
ChannelSubscriberPtr<unitree_hg::msg::dds_::LowCmd_> low_cmd_hg_suber_;