Skip to content

adding new point just befor the final point produce jerkey motion#635

Merged
k-okada merged 1 commit intojsk-ros-pkg:masterfrom
k-okada:remove_jerkey
Jul 19, 2016
Merged

adding new point just befor the final point produce jerkey motion#635
k-okada merged 1 commit intojsk-ros-pkg:masterfrom
k-okada:remove_jerkey

Conversation

@k-okada
Copy link
Copy Markdown
Member

@k-okada k-okada commented Jul 11, 2016

This will generate smoother motion, expecting not to produce jerkey motion specially the end of the trajectory
this code is introduced in #289, and @wkentaro said I think this works. why don't you merge this? so may be no longer need this code at some point...

Only tested on the gazebo, need to test on the real robot

@k-okada
Copy link
Copy Markdown
Member Author

k-okada commented Jul 11, 2016

before

screenshot from 2016-07-11 19 45 11

after

screenshot from 2016-07-11 19 46 33

I tested with following code

(defun straight-motion ()
  (let (av0 av1)
    (setq av0 (send *baxter* :rarm :inverse-kinematics (make-coords :pos #f(900 -500 350) :rpy (float-vector 0 0 0)))
          av1 (send *baxter* :rarm :inverse-kinematics (make-coords :pos #f(900 0 350) :rpy (float-vector 0 0 0)))
          )
    (warning-message 2 "move 1 points (tm = 3000)~%")
    (send *ri* :angle-vector (send *baxter* :reset-pose) 3000)
    (send *ri* :wait-interpolation)
    (unix::sleep 1)
    ;;
    (warning-message 2 "move 1 points (tm = nil)~%")
    (send *ri* :angle-vector av1 3000)
    (send *ri* :wait-interpolation)
    (unix::sleep 1)

    (warning-message 2 "move 2 points (tm = 3000)~%")
    (send *ri* :angle-vector-sequence (list av0 av1) 3000)
    (send *ri* :wait-interpolation)
    (unix::sleep 1)

    (warning-message 2 "move 2 points (tm = nil)~%")
    (send *ri* :angle-vector-sequence (list av0 av1))
    (send *ri* :wait-interpolation)
    (unix::sleep 1)

    (warning-message 2 "move 3 points (tm = 3000)~%")
    (send *ri* :angle-vector-sequence (list av0 (midpoint 0.5 av0 av1) av1) 3000)
    (send *ri* :wait-interpolation)
    (unix::sleep 1)

    (warning-message 2 "move 3 points (tm = nil)~%")
    (send *ri* :angle-vector-sequence (list av0 (midpoint 0.5 av0 av1) av1))
    (send *ri* :wait-interpolation)
    (unix::sleep 1)

    ))

  )

But I think fundamental problem is that they use Bezier function at
https://github.com/RethinkRobotics/baxter_interface/blob/master/src/joint_trajectory_action/joint_trajectory_action.py#L293-L312

…f points to sent

from v1.1.1 if num_points is 1, it will use current position to the first element of trajectory point RethinkRobotics/baxter_interface@b38ec25
@k-okada
Copy link
Copy Markdown
Member Author

k-okada commented Jul 16, 2016

RethinkRobotics/baxter_interface@b38ec25 has been merged since v1.1.1 and we nolongr need to add current position if length of trajectory.points is 1

@k-okada
Copy link
Copy Markdown
Member Author

k-okada commented Jul 16, 2016

if RethinkRobotics/baxter_interface#73 is merged, we can remove

 ;; from v1.1.1 if num_points is 1, it will use current position to the first element of trajectory point https://github.com/RethinkRobotics/baxter_interface/commit/b38ec257fece0711adb260ed6bc161096aa3ecae                                        
     (when (>= (length avs) 2)
       (push (send self :state :potentio-vector :wait-until-update t) avs)
       (push 50 tms))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant