Jump to content
  • Sky
  • Blueberry
  • Slate
  • Blackcurrant
  • Watermelon
  • Strawberry
  • Orange
  • Banana
  • Apple
  • Emerald
  • Chocolate
  • Charcoal
  • 0

cords of my robot


hello , im trying to do a code that can get the cords of my robot no matter the distance useing a linked card
i tryed to make counters with the x y z everytime he moves, but cause of lags the counter doesnt do it right, and missing a  few moves ,
is there a  way to get a distance from a position no matter the distance,or a way he can read that he moved a block and count it with no chance of failing? does a wireless card lv2 can help me in that ?

Share this post

Link to post
Share on other sites

3 answers to this question

Recommended Posts

  • 0

Unfortunately, the only way to use absolute coordinates is to use the debug card.

There have been plenty of conversations about this topic before but the decision has been made to use relative coordinates only.

Of course the navigation upgrade make the process of using relative coordinates simpler.

Forgive me for finding it difficult to believe that lag causes the counter to malfunction - could you upload your source code using the <code> button or by uploading your lua file?


Share this post

Link to post
Share on other sites
  • 0

Make sure you check every move/turn operation for errors. In case of lags, you'll get nil, "still moving", and you'll have to call the move method again.

Share this post

Link to post
Share on other sites
  • 0

My vote is to use the navigation upgrade to get relative coordinates to the center of a map.  You can send the robot to (0, 0, 0) to find where it thinks that is, and then just write down the real coordinates for the spot to be used as an offset so that you can convert relative to absolute.

As an alternative, you can:

1) Using the navigation and waypoints, you can retrieve coordinates of specific blocks and their coordinates relative to the robot

2) Try a gps-like approach by measuring the signal strength of wireless transmitters at known locations

3) Use the error codes from robot.move() to tell if it was sucessfull, and update some internal counters to track offset from a starting position

Share this post

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Create New...

Important Information

By using this site, you agree to our Terms of Use and Privacy Policy.