Quantcast
Channel: Gazebo: Q&A Forum - RSS feed
Viewing all articles
Browse latest Browse all 7017

Setting initial velocity in plugin

$
0
0
I am trying to have a model rotate along a Lissajous curve. I am using torques to set the angular acceleration to be able to simulate this movement. For this to work, I have to set the initial angular velocity. I tried this by adding a parameter which checks if the update method has run before, and then set the angular velocity the first time the Update method of the plugin is called. > if (!this->dataPtr->runOnce){ this->dataPtr->link->SetAngularVel({0,50,0}); this->dataPtr->runOnce = true; } However, if I print out the > this->dataPtr->link->WorldAngularVel() I can see that it is set, but the next time the Update method is called, it is already set to a value close to zero. Just to be sure I added a delay before setting the torques, but they don't have any influence on the initial value, so they must be reset somewhere else... Any idea what I am doing wrong?

Viewing all articles
Browse latest Browse all 7017

Trending Articles