Duet3D Logo Duet3D
    • Tags
    • Documentation
    • Order
    • Register
    • Login

    Programming --> robot position vs camera position

    Scheduled Pinned Locked Moved
    General Discussion
    2
    3
    241
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Arnixundefined
      Arnix
      last edited by

      Hi to all.
      I have one problem and i guess that i use wrong idea for solving it. As i have written in one other post am planning to add offset camera view for our robot but i dont quite understand how to improve tracking and detecting center of the object ( specially because object has irregular shape ). When the camera was set in robot base center i can pick up objects correctly ( maybe with 1 cm off ) but now i must hit exact center of the object. Adding this new camera distance and track speed is not a problem. Main problem is hitting the center of the object throe this offset.

      Question:
      If the camera is 80 cm away from robot center, how to correctly compute kinematics ?
      I dont need robot to camera screen. I need to input camera screen position and based on this i should calculate robot coordinates. Any idea is more then welcome.

      This is the code that am using :

      xr = x - width / 2 
      yr = y - 300 + self.moving_speed robot_angle = math.pi * 34 / 180 
      robot_x = math.cos(-robot_angle) * xr - math.sin(-robot_angle) * yr 
      robot_y = math.sin(-robot_angle) * xr + math.cos(-robot_angle) * yr 
      robot_x = robot_x + 0.05 * robot_x 
      robot_y = robot_y + 0.09 * (robot_y-180)
      
      1 Reply Last reply Reply Quote 0
      • o_lampeundefined
        o_lampe
        last edited by

        Line 2 in your code snippet looks odd to me.
        Shouldn't it be two lines instead?
        The rest of your math can't be evaluated without a sketch of the camera/robot kinematics IMHO.

        1 Reply Last reply Reply Quote 0
        • Arnixundefined
          Arnix
          last edited by

          Hi ! Sorry for late reply.

          We have followed this example, but we need inverse version :
          https://stackoverflow.com/questions/18162880/how-to-correctly-compute-direct-kinematics-for-a-delta-robot
          .................
          Regarding the code:
          Can we hear us per message or mail ?

          A.

          1 Reply Last reply Reply Quote 0
          • First post
            Last post
          Unless otherwise noted, all forum content is licensed under CC-BY-SA