简体   繁体   English

实践与理论上关于Lejos坐标系的矛盾

[英]Practice and theory contradicts about Lejos Coordinate system

I know the Coordinate system of leJOS is a cartesian coordinate system.The positive X-axis is pointing directly in front of the car. 我知道leJOS的坐标系是笛卡尔坐标系,正的X轴指向汽车的正前方。 The positive Y-axis points to the left of the X-axis. Y轴正指向X轴的左侧。 But I code a progarm and move the car, and then I have an issue: 但是我编写了一个程序并移动了汽车,然后出现一个问题:

I make the car go straight with navigator.goTo(20, 0); 我使用navigator.goTo(20, 0);使汽车直行navigator.goTo(20, 0); . But with navigator.goTo( 0, 20); 但是使用navigator.goTo( 0, 20); ,it goes to the right instead of the left! ,它会向右而不是向左! I get the pose by navigator.getPoseProvider().getPose() . 我通过navigator.getPoseProvider().getPose()获得姿势。 The value of X is 0 , but the value of Y is 20 instead of -20 ! X的值为0 ,但Y的值为20而不是-20

Why? 为什么?

now I have soved the question. 现在我解决了这个问题。 Wheel wheel1=WheeledChassis.modelWheel(leftMotor, 3.1).offset(-8.5); Wheel wheel1 = WheeledChassis.modelWheel(leftMotor,3.1).offset(-8.5); becaues of the offset it should be 8.5 因为偏移量应该是8.5

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM