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

[on #242] add Craneplugin #243

Merged
merged 5 commits into from
Jul 10, 2020
Merged

Conversation

Naoki-Hiraoka
Copy link
Contributor

@Naoki-Hiraoka Naoki-Hiraoka commented Dec 3, 2019

gazeboでクレーンを使用するためのプラグインです。
gazeboでロボットを地面に置きたい時に、従来は地面より少し高い位置を指定してロボットをワープさせて落とすという手法をとっていましたが、
このプラグインを使うことで①落とすことなく、②正確なZ方向位置を指定することなく、ロボットを地面に置くことが可能になります。

URDFの以下に以下のようなタグを加えることで使用できます。

 <gazebo>                                                                      
    <plugin filename="libCranePlugin.so" name="crane_plugin">                   
      <objname>HRP2JSKNTS</objname>                                             
      <linkname>CHEST_LINK1</linkname>                                          
      <liftheight>1.2</liftheight>                                              
      <lowerheight>0.5</lowerheight>                                            
      <liftvelocity>0.1</liftvelocity>                                          
      <lowervelocity>0.03</lowervelocity>                                       
      <pgain>2500</pgain>                                                       
      <dgain>500</dgain>                                                        
      <damp>10000</damp>                                                        
    </plugin>                                                                   
  </gazebo>   

linknameのリンクに対し、liftheightの高さになるようにpgain dgainの値を用いてPD制御で外力を加えます。
紐で吊るされた状態を想定しているため、鉛直上向きにのみ外力を加え、下向きには外力を加えません。

objname/name/LowerCommandにstd_msgs/Emptyトピックを送ると、目標高さがlowerheightまでlowervelocityの速さで徐々に下がり、目標高さがlowerheightに到達するとこのプラグインが無効になります。

objname/name/LiftCommandにstd_msgs/Emptyトピックを送ると、このプラグインが再度有効になり、目標高さがliftheightまでliftvelocityの速さで徐々に上がります。

@Naoki-Hiraoka Naoki-Hiraoka changed the title [Depends on #242] add Craneplugin [on #242] add Craneplugin Dec 3, 2019
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.

nice! can you add description of plugins at https://github.com/start-jsk/rtmros_gazebo/blob/master/README.md ?

after Environment variables used in iob.cpp

Custom Plugins

Crameplugin
This plugin provides fake "Crame" in gazebo environment

<gazebo>                                                                      
    <plugin filename="libCranePlugin.so" name="crane_plugin">                   
      <objname>HRP2JSKNTS</objname>                                             
      <linkname>CHEST_LINK1</linkname>                                          
      <liftheight>1.2</liftheight>                                              
      <lowerheight>0.5</lowerheight>                                            
      <liftvelocity>0.1</liftvelocity>                                          
      <lowervelocity>0.03</lowervelocity>                                       
      <pgain>2500</pgain>                                                       
      <dgain>500</dgain>                                                        
      <damp>10000</damp>                                                        
    </plugin>                                                                   
  </gazebo>   

Subscribed topics

objname/name/LowerCommand : put robot on the ground

objname/name/LiftCommand : lift the robot to the lift height

Cc: @pazeshun

@pazeshun pazeshun self-requested a review December 11, 2019 12:01
@pazeshun
Copy link
Collaborator

pazeshun commented Apr 3, 2020

@Naoki-Hiraoka Kindly ping

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.

@Naoki-Hiraoka
Copy link
Contributor Author

I'm sorry for my late response.
I added description of plugins.

README.md Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
Copy link
Collaborator

@pazeshun pazeshun left a comment

Choose a reason for hiding this comment

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

@k-okada Could you review this?

@k-okada k-okada merged commit 848a4d7 into start-jsk:master Jul 10, 2020
@Naoki-Hiraoka Naoki-Hiraoka deleted the craneplugin branch July 11, 2020 01:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants