Skip to content

Commit 7926466

Browse files
committed
joy value
1 parent 3b68c24 commit 7926466

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

src/modelec_com/src/pcb_odo_interface.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -74,16 +74,16 @@ namespace Modelec
7474
[this](const sensor_msgs::msg::Joy::SharedPtr msg)
7575
{
7676
double left_axis = msg->axes[1];
77-
double right_axis = msg->axes[3];
77+
double right_axis = msg->axes[2];
7878

7979
if (fabs(left_axis) < 0.05) left_axis = 0.0;
8080
if (fabs(right_axis) < 0.05) right_axis = 0.0;
8181

82-
// int left = static_cast<int>(forward * 626 - turn * 626);
83-
// int right = static_cast<int>(forward * 626 + turn * 626);
82+
int left_motor = static_cast<int>(forward * 626 - turn * 626);
83+
int right_motor = static_cast<int>(forward * 626 + turn * 626);
8484

85-
int left_motor = static_cast<int>(left_axis * 626);
86-
int right_motor = static_cast<int>(right_axis * 626);
85+
// int left_motor = static_cast<int>(left_axis * 626);
86+
// int right_motor = static_cast<int>(right_axis * 626);
8787

8888
left_motor = std::max(-626, std::min(626, left_motor));
8989
right_motor = std::max(-626, std::min(626, right_motor));

0 commit comments

Comments
 (0)