Skip to content

Is it possible to warp models (robots) into a certain pose? I.e., is it possible to directly set link positions? #300

Discussion options

You must be logged in to vote

Hello, I believe you are looking for Model::resetJointPositions(). Alternatively, there is Joint::resetPosition() if you need to access a single joint (which you can also do with Model::resetJointPositions() by passing jointNames argument).

When resetting positions, I also recommend setting velocities to 0.0 for the affected joints (Model::resetJointVelocities()), especially if the robot was in motion. Without this, I have experienced occasional/unpredictable segfault during subsequent Gazebo PostUpdate call - even if the robot was seemingly static (not sure if it still occurs).

Remember to run a paused Gazebo step for this to take effect. In case your model uses plugins that update only …

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@FirefoxMetzger
Comment options

@traversaro
Comment options

@diegoferigo
Comment options

@diegoferigo
Comment options

Answer selected by FirefoxMetzger
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants