|
cScript spark from India [1 posts] |
9 year
|
write cScript program to control motor to run on selected path planning.
|
|
|
Steven Gentner from United States [1446 posts] |
9 year
|
I'm assuming you are using the Path_Planning module, as one of the outputs you have PLAN_ORIENTATION which is the direction/angle that the robot should stay on in order to move along the specified path. What you know need to do is to figure out what orientation your robot is in (thus the triangle shape used in the tutorial). Once you know the orientation of the robot and the result of PLAN_ORIENTATION you would have to turn the robot to align with that. I.e. if the robot is at angle 45 (geometric degrees) and the path says that you should be at 180 you would need to turn the robot left until it gets close to the 180 degree and then continue moving forward.
You should be able to translate the VBscript in the tutorial to cscript ... because you have a closed loop system you don't need to be very precise in that just some movement in the right direction will help. Even if you overshoot, the system should move you back in the correct direction.
STeven.
|
|