Gazebo | Ignition | Community
Ask Your Question

jwchang's profile - activity

2021-01-11 05:13:22 -0500 received badge  Famous Question (source)
2021-01-11 05:13:22 -0500 received badge  Notable Question (source)
2019-05-03 05:13:19 -0500 received badge  Notable Question (source)
2019-05-03 05:13:19 -0500 received badge  Popular Question (source)
2019-01-24 22:09:28 -0500 edited question Gazebo outputs the same value two times

Gazebo outputs the same value two times I apply some torques to the joint of a robot arm and output the current time, an

2019-01-24 22:05:24 -0500 asked a question Gazebo outputs the same value two times

Gazebo outputs the same value two times I apply some torques to the joint of a robot arm and output the current time, an

2019-01-09 01:08:26 -0500 commented question Can't install gazebo on windows 10

http://answers.gazebosim.org/question/20849/some-links-in-install-on-windows-fail/ The problem is not solved yet.

2018-12-11 05:02:21 -0500 received badge  Famous Question (source)
2018-11-04 04:02:57 -0500 commented answer Some links in Install on Windows fail

Thank for your reply. The link of protobuf 2.6.0 and Qt 5.7 in that pull request fail, so I download them from Index of

2018-11-04 03:27:46 -0500 received badge  Famous Question (source)
2018-10-30 21:18:41 -0500 received badge  Notable Question (source)
2018-10-30 09:16:31 -0500 received badge  Popular Question (source)
2018-10-29 22:39:13 -0500 received badge  Student (source)
2018-10-29 22:20:09 -0500 asked a question Some links in Install on Windows fail

Some links in Install on Windows fail In Install on Windows, the links of protobuf 2.6.0 and Qt 4.8.6 fail so that I can

2018-10-24 21:34:18 -0500 received badge  Famous Question (source)
2018-10-23 05:31:45 -0500 marked best answer Cannot spawnModel from MATLAB

I want to do connection between MATLAB and Gazebo and generate Gazebo model from MATLAB. I follow the instruction in add-build-and-remove-objects-in-gazebo, and the following commands work successfully.

rosinit(ipaddress)
gazebo = ExampleHelperGazeboCommunicator;
ball = ExampleHelperGazeboModel('Ball') 
spherelink = addLink(ball,'sphere',1,'color',[0 0 1 1])

But when I run the next command spawnModel(gazebo,ball,[8.5,0,1]), the errors show up in MATLAB command window:

Error using ExampleHelperGazeboCommunicator/startModelServices (line 334)
Failed to create a /gazebo/get_model_state service client.

Error in ExampleHelperGazeboCommunicator/spawnModel (line 290)
            startModelServices(obj);

[ERROR] ServiceClientHandshakeHandler - Service client handshake failed: client wants service 
/gazebo/get_model_state to have md5sum af0f702011820738976b120226dc9d96, but it has 
4c515e936d3319c9610c559c60bfc3d4. Dropping connection.

The error shown in ubuntu terminal is

[ERROR] ServiceClientHandshakeHandler - Service client handshake failed: client wants service 
/gazebo/get_model_state to have md5sum af0f702011820738976b120226dc9d96, but it has 
4c515e936d3319c9610c559c60bfc3d4. Dropping connection.

I use matlab 2018b, Robotics System Toolbox2.1 on win10, and Ubuntu18.04, ROS melodic, gazebo9 in virtualbox, which are all newest version. Does anyone know how to solve it?

2018-10-23 05:31:33 -0500 answered a question Cannot spawnModel from MATLAB

Solution is here Update MATLAB's ROS Messages Update rosjava_messages.jar and then spawn models successfully.

2018-10-23 05:29:13 -0500 received badge  Notable Question (source)
2018-10-19 06:52:02 -0500 received badge  Popular Question (source)
2018-10-15 03:02:04 -0500 asked a question Cannot spawnModel from MATLAB

Cannot spawnModel from MATLAB I want to do connection between MATLAB and Gazebo and generate Gazebo model from MATLAB. I

2018-09-29 01:03:09 -0500 received badge  Notable Question (source)
2018-09-20 11:52:43 -0500 received badge  Popular Question (source)
2018-09-18 01:43:41 -0500 edited question Damping coefficient of joint

DampingFactor of joint I find the unit of damping coefficient referenced from http://gazebosim.org/tutorials/?tut=ros_ur

2018-09-18 01:43:39 -0500 edited question Damping coefficient of joint

DampingFactor of joint I find the unit of damping coefficient referenced from http://gazebosim.org/tutorials/?tut=ros_ur

2018-09-18 01:40:25 -0500 edited question Damping coefficient of joint

DampingFactor of joint I find the unit of damping coefficient referenced from http://gazebosim.org/tutorials/?tut=ros_ur

2018-09-18 01:28:17 -0500 asked a question Damping coefficient of joint

DampingFactor of joint I cannot understand the description of dampingFactor in http://gazebosim.org/tutorials/?tut=ros_u

2018-08-25 16:44:55 -0500 received badge  Notable Question (source)
2018-08-23 06:38:39 -0500 received badge  Popular Question (source)
2018-08-10 12:14:56 -0500 asked a question Two PID control on a robot

Two PID control on a robot I use PID method referenced from PID.cc for rrbot's position control, and I write the control

2018-08-01 04:17:22 -0500 received badge  Supporter (source)
2018-08-01 04:17:19 -0500 marked best answer Array elements are skipped

I want to move the joints of my robot at 0, 90, 180, 270 degrees, but it only displays the state of 90 and 270 degrees on gazebo repeatedly. I output the results to the terminal, and actually four angles show periodically, and counts are formally 0,1,2,3,4,5,6.... However I do the different tests, the robot always skips one element between two array elements on gazebo. Does anyone know how to solve this problem? Here is my plugin code.

#include <functional>
#include <gazebo/gazebo.hh>
#include <gazebo/common/common.hh>
#include <ignition/math/Vector3.hh>
#include <gazebo/physics/physics.hh>
#include <stdio.h>

using namespace std;

namespace gazebo
{
  int count = 0;
  float pos[4] = {0, 1.57, 3.14, 4.71};

  class ModelPush : public ModelPlugin
  {
    public: void Load(physics::ModelPtr _parent, sdf::ElementPtr /*_sdf*/)
    {
      this->model = _parent;
      this->updateConnection = event::Events::ConnectWorldUpdateBegin(std::bind(&ModelPush::OnUpdate, this));
    }

    public: void OnUpdate()
    {
       this->model->GetJoint("joint1")->SetPosition(0, pos[count%4]);
       this->model->GetJoint("joint1")->>Update();
       this->model->GetJoint("joint2")->SetPosition(0, pos[count%4]);
       this->model->GetJoint("joint2")->>Update();

       cout << fixed << this->model->GetJoint("joint1")->GetAngle(0).Radian() << "\t";
       cout << fixed << this->model->GetJoint("joint2")->GetAngle(0).Radian() << "\t" << count << endl;

       count++;
       usleep(500000);
    }

    private: physics::ModelPtr model;
    private: event::ConnectionPtr updateConnection;
  };
  GZ_REGISTER_MODEL_PLUGIN(ModelPush)
}
2018-07-30 21:15:08 -0500 received badge  Popular Question (source)
2018-07-27 07:35:18 -0500 received badge  Organizer (source)
2018-07-27 07:34:21 -0500 edited question Array elements are skipped

Array elements are skipped I want to move the joints of my robot at 0, 90, 180, 270 degrees, but it only displays the st

2018-07-27 07:20:29 -0500 received badge  Editor (source)
2018-07-27 07:20:29 -0500 edited question Array elements are skipped

array elements are skipped I want to make the joints of robot rotated at 0, 90, 180, 270 degrees, but it only shows 90 a

2018-07-27 07:10:29 -0500 asked a question Array elements are skipped

array elements are skipped I want to make the joints of robot rotated at 0, 90, 180, 270 degrees, but it only shows 90 a

2018-06-25 02:37:48 -0500 received badge  Famous Question (source)
2018-06-19 02:51:21 -0500 received badge  Enthusiast
2018-06-13 10:32:44 -0500 received badge  Notable Question (source)
2018-06-13 02:29:13 -0500 commented answer How to setforce at a constant interval?

Thank you. I change my code to store the torque values into an array, which is SetForce(0,torque[count++]); usleep(10000

2018-06-13 02:26:04 -0500 commented answer How to setforce at a constant interval?

Thank you. I change my code to store the torque values into an array, and SetForce(0,torque[count++]); usleep(10000);, a

2018-06-13 02:20:24 -0500 marked best answer How to setforce at a constant interval?

I use gazebo7.12.0 and want to write a model plugin to apply torque to a joint at a constant interval of 0.01 sec. It seems that the update rate of gazebo is 1000Hz, so I wirte the following code in OnUpdate(). This is not a good way because it's not exact 1000Hz in simulation from my testing. Is there other way to do it?

int count = 0;
public: void OnUpdate()
{
  if (count <= 10)
     this->model->GetJoint("joint")->SetForce(0,5);
  else if (count > 10 && count <= 20)
     this->model->GetJoint("joint")->SetForce(0,5);
  ...
  count++;
};
2018-06-13 02:20:24 -0500 received badge  Scholar (source)
2018-06-13 02:19:12 -0500 received badge  Popular Question (source)
2018-06-13 02:04:54 -0500 commented answer What are the SDF Damping Units?

http://gazebosim.org/tutorials/?tut=ros_urdf#Joints, "the dynamics element with a viscous damping coefficient of 0.7 Nms

2018-06-12 10:07:06 -0500 asked a question How to setforce at a constant interval?

How to setforce at a constant interval? I use gazebo7.12.0 and want to write a model plugin to apply torque to a joint a