Gazebo | Ignition | Community
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

how to use "SetAngularAccel"?

I wrote a very simple modelplugin. I just want to see how model moves when I use the method "SetAngularAccel" But, nothing happened,"SetAnfularAccel"doesn't work, my model still rests there. Please tell me what's wrong,Thank you!

<?xml version="1.0" ?>
<sdf version="1.4">
  <model name="test">
    <link name="Link">
            <pose>0 0 0.05  0 0 0</pose>
                <mass> 0.1 </mass>
            <collision name="Base_collision">
                        <size>0.1 2 0.1</size>
      <visual name="Visual">
                        <size>0.1 2 0.1</size>
    <plugin name="df" filename="/home/Dropbox/gazebo/torquetest/dist/Debug/GNU-Linux-x86/"/>

#include <gazebo/gazebo.hh>
#include <gazebo/physics/physics.hh>
#include <gazebo/common/common.hh>
using namespace gazebo;
class Arm_Control : public ModelPlugin
    public: void Load(physics::ModelPtr _parent, sdf::ElementPtr /*_sdf*/)
        this->model = _parent;
        this->updateConnection = event::Events::ConnectWorldUpdateBegin(boost::bind(&Arm_Control::OnUpdate, this, _1));
public: void OnUpdate(const common::UpdateInfo & /*_info*/)

        physics::ModelPtr model;
        event::ConnectionPtr updateConnection;