Skip to content

Commit

Permalink
hotfix: joy change y/yaw
Browse files Browse the repository at this point in the history
  • Loading branch information
fan-ziqi committed Dec 21, 2024
1 parent c508305 commit e5ebaf6
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ source devel/setup.bash
# 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.

Expand Down
2 changes: 1 addition & 1 deletion README_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`运动到仿真开始的姿态。

Expand Down
4 changes: 2 additions & 2 deletions src/rl_sar/src/rl_sim.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit e5ebaf6

Please sign in to comment.