hotfix: joy change y/yaw

This commit is contained in:
fan-ziqi 2024-12-22 10:42:33 +08:00
parent c508305273
commit f07083ba2e
3 changed files with 6 additions and 6 deletions

View File

@ -103,17 +103,17 @@ source devel/setup.bash
(for python version) rosrun rl_sar rl_sim.py
```
# Keyboard Controls
Keyboard Controls
* Press **\<Enter\>** to toggle the simulator between running and stopped.
* Use **W/S** to control forward/backward movement, **A/D** to control turning, and **J/L** to control lateral movement. Press **\<Space\>** to reset all control commands to zero.
* If the robot falls, press **R** to reset the Gazebo environment.
* Press **0** to move the robot from its simulation start posture to `init_pos`, and press **1** to move the robot from `init_pos` back to its simulation start posture.
# Gamepad Controls
Gamepad Controls
* Press **LB** to toggle the simulator between running and stopped.
* Use **LY** to control forward/backward movement, **LX** to control turning, and **J** and **L** to control lateral movement.
* **LY** controls forward/backward movement, **LX** controls lateral movement, and **RX** controls turning.
* If the robot falls, press **RB+X** to reset the Gazebo environment.
* Press **RB+Y** to move the robot from its simulation start posture to `init_pos`, and press **RB+A** to move the robot from `init_pos` back to its simulation start posture.

View File

@ -113,7 +113,7 @@ source devel/setup.bash
手柄控制:
* 按 **LB** 切换仿真器运行/停止。
* **LY** 控制水平移动,**LX** 控制转向,**J** 和 **L** 控制横向移动
* **LY** 控制前后移动,**LX** 控制横向移动,**RX** 控制转向
* 如果机器人摔倒,按 **RB+X** 重置Gazebo环境。
* 按 **RB+Y** 让机器人从仿真开始的姿态运动到`init_pos`,按 **RB+A** 让机器人从`init_pos`运动到仿真开始的姿态。

View File

@ -235,8 +235,8 @@ void RL_Sim::JoyCallback(const sensor_msgs::Joy::ConstPtr &msg)
}
this->control.x = this->joy_msg.axes[1] * 1.5; // Ly
this->control.y = this->joy_msg.axes[3] * 1.5; // Rx
this->control.yaw = this->joy_msg.axes[0] * 1.5; // Lx
this->control.y = this->joy_msg.axes[0] * 1.5; // Lx
this->control.yaw = this->joy_msg.axes[3] * 1.5; // Rx
}
void RL_Sim::MapData(const std::vector<double> &source_data, std::vector<double> &target_data)