Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Spot] add jsk spot robot #1376

Open
wants to merge 491 commits into
base: master
Choose a base branch
from

Conversation

sktometometo
Copy link
Contributor

@sktometometo sktometometo commented Aug 25, 2021

moved from #1325
based on #1263

Add jsk_spot_robot
This PR enables controlling spot with ROS.

Copy link
Member

@k-okada k-okada left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sktometometo let's discuss once you finished your paper,
if this PR contains both stable packages and development packages, can we distinguish two part? Or can we consider all packages in this PR is stable and ready to merge?

jsk_spot_robot/README.md Outdated Show resolved Hide resolved
jsk_spot_robot/jsk_spot.rosinstall Outdated Show resolved Hide resolved
jsk_spot_robot/jsk_spot.rosinstall Outdated Show resolved Hide resolved
@@ -48,5 +48,48 @@
(forward-message-to front_right_knee_jt (cdr args))
(forward-message-to rear_left_knee_jt (cdr args))
(forward-message-to rear_right_knee_jt (cdr args)))))
(:body-inverse-kinematics
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@708yamaguchi @mqcmd196 @tkmtnt7000 @sktometometo
please consider adding interface :body-pose

(:body-pose (r p y)
  (send self :body-inverse-kinematics ....)
  (setq ret (send .self .....))
  (setq ret-r (elt ret 0) ret-p (elt ret 1) ret-y (elt ret 2))
  (list ret-r ret-p ret-y))

So that we can visualize body-pose and send to real robot like

(send* *ri* :body-pose (send *spot* body-pose 0 0 -0.2))

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mqcmd196 @tkmtnt7000 @sktometometo

Is there a method or API to change height of spot body?

If so,
(:body-pose (x y z r p y)
or
(:body-pose (coords)
might be better.

Copy link
Member

@tkmtnt7000 tkmtnt7000 Nov 11, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you.

We also need to add spot-interface method to use /spot/body_pose/position

Copy link
Member

@mqcmd196 mqcmd196 Nov 12, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tkmtnt7000 @708yamaguchi I tried z with various values and it works fine.
However when I published like,

 rostopic pub /spot/bo_pose geometry_msgs/Pose "position:
  x: 0.0
  y: 0.0
  z: 0.5
orientation:
  x: 0.0
  y: 0.0
  z: 0.0
  w: 1.0"

it doesn't mean 0.5m high from the ground, but 0.5m high from the spot normal height. I have to fix this issue to use from eus model.

Copy link
Member

@708yamaguchi 708yamaguchi Nov 12, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it doesn't mean 0.5m high from the ground, but 0.5m high from the spot normal height. I have to fix this issue to use from eus model.

I think this is the same as current spot.l.

When we create *spot* instance, spot body coords is the same as eus origin coords.
For example, spot body coords (the red arrows) is the same as eus origin coords (rgb lines)
https://user-images.githubusercontent.com/19769486/123687288-b560b600-d88b-11eb-8183-fb36c108fe99.png

Therefore, in :body-inverse-kinematics, we can use coords argument as relative coords from spot normal posture.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One problem with legged robot is that it is difficult to define ground coords.
Like,
Should ground coords be center of gravity?? center of legs?
if 3 of 4 legs are on the ground, how should we define the ground coords?

I think this is why /spot/body_pose uses relative pose from spot normal posture.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is why /spot/body_pose uses relative pose from spot normal posture.

I see, this not happens in cart type robot.

And it seems *spot* returns relative coords from spot normal posture. I misunderstood.

@sktometometo sktometometo force-pushed the PR/spot/add-jsk-spot-robot branch 5 times, most recently from ad5fb00 to 3a3b16e Compare November 24, 2021 03:22
@sktometometo sktometometo force-pushed the PR/spot/add-jsk-spot-robot branch 6 times, most recently from 113d7d6 to dee68da Compare November 25, 2021 14:49
sktometometo and others added 27 commits December 21, 2021 18:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants