File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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));
You can’t perform that action at this time.
0 commit comments