Skip to content

Commit 941922a

Browse files
committed
Use right joy to rotate the vehicle to match with husarion's implementation
Signed-off-by: Rosalie <rosalie.van.ark@alliander.com>
1 parent 3b3af2f commit 941922a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

alliander_joystick/src/rcdt_joystick/src/joystick_manager.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ void JoystickManager::joy_cb(const sensor_msgs::msg::Joy::SharedPtr msg) {
100100
msg->axes[2]);
101101
break;
102102
case vehicle_mode:
103-
handle_driving(msg->axes[1], msg->axes[0]);
103+
handle_driving(msg->axes[1], msg->axes[2]);
104104
break;
105105
case no_mode:
106106
// Don't do anything.
@@ -200,8 +200,8 @@ bool JoystickManager::check_btn_pressed(size_t idx,
200200

201201
void JoystickManager::handle_driving(const float& linear,
202202
const float& angular) {
203-
float prev_angular = prev_joy_input->axes[0];
204203
float prev_linear = prev_joy_input->axes[1];
204+
float prev_angular = prev_joy_input->axes[2];
205205

206206
geometry_msgs::msg::TwistStamped twist;
207207
twist.header.stamp = node->now();

0 commit comments

Comments
 (0)