diff --git a/README.md b/README.md index 3792731..e04d91b 100644 --- a/README.md +++ b/README.md @@ -103,17 +103,17 @@ source devel/setup.bash (for python version) rosrun rl_sar rl_sim.py ``` -# Keyboard Controls +Keyboard Controls * Press **\** 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 **\** 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. diff --git a/README_CN.md b/README_CN.md index 91632d3..1fea8a3 100644 --- a/README_CN.md +++ b/README_CN.md @@ -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`运动到仿真开始的姿态。 diff --git a/src/rl_sar/src/rl_sim.cpp b/src/rl_sar/src/rl_sim.cpp index a917d6e..23d5b68 100644 --- a/src/rl_sar/src/rl_sim.cpp +++ b/src/rl_sar/src/rl_sim.cpp @@ -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 &source_data, std::vector &target_data)