Gazebo | Ignition | Community
Ask Your Question

TwoBid's profile - activity

2023-03-08 02:52:33 -0500 received badge  Favorite Question (source)
2018-03-08 14:12:34 -0500 received badge  Famous Question (source)
2018-03-08 14:12:34 -0500 received badge  Notable Question (source)
2018-03-08 14:12:34 -0500 received badge  Popular Question (source)
2017-09-04 03:42:56 -0500 asked a question ROS Timer Bug? Only occurs when using Gazebo

ROS Timer Bug? Only occurs when using Gazebo Hello, this is a forked question from ros answers. There I'm referring to

2017-01-04 08:12:52 -0500 received badge  Famous Question (source)
2016-10-04 02:54:57 -0500 received badge  Supporter (source)
2016-09-30 00:01:09 -0500 received badge  Famous Question (source)
2016-09-29 14:08:11 -0500 received badge  Notable Question (source)
2016-09-27 04:55:27 -0500 commented question Lift Controller Plugin

So i played around a little and in my case the following line is causing the problem: this->model->SetJointPosition(lift_joint->GetScopedName(), this->lift_height);

2016-09-25 17:36:10 -0500 received badge  Notable Question (source)
2016-09-21 06:31:44 -0500 asked a question Sick S300 - configuration of Fieldsets

Hi,

I implemented a few s300 laserscanners to my robot model, based on the libRayPlugin. My question is, is there someone who already implemented the field set functionality of the SICK CDS software. It would be awesome to have the option to define some points which setup an area where every detected object is triggering a IO signal. Including the selection of the protective and warning fields. So my plan is also to simulate the sensor behavior.

When there is a bigger interest I could also publish my results and write it contribution conform.

Cheers, Rob

2016-09-21 04:50:02 -0500 received badge  Popular Question (source)
2016-09-21 03:11:36 -0500 commented question Lift Controller Plugin

So i narrowed it down to the lift control plugin. I changed the initial fork height from 0.163 to 0. I actually assumed that the method SetJointPosition is not influencing the physics engine, but it doesn't help anyway. I also changed the order of the subscriber init and the update events init and now its done at the end of the load method. But still 1 of 4 times the fork is displaced.

2016-09-21 03:11:36 -0500 received badge  Commentator
2016-09-21 01:04:54 -0500 commented question Lift Controller Plugin

I'm using 7.3.1

2016-09-20 13:09:06 -0500 asked a question Lift Controller Plugin

Hi,

I created a model of a Fork-Lifter. The Chassis and the forks are separated links, connected with a prismatic joint. This joint is controlled by a plug-in that handles the fork height.

When I'm spawning the model, sometimes I have the issue that the fork is spawned a few meters away from the chassis. When I'm excluding the fork lift plug-in it seems stable.

Another issue is that sometimes when I'm spawning the model, it seems that it gets a force kick and than it flies away. I already adjusted the inertia, but it doesn't helped. The reproductivity of both errors are quite strange, sometimes it works, sometimes the forks are displaced and sometime the whole model flies away.

Can someone have a look on my model.sdf and the lift/fork control plug-in? I'm really running out of ideas where the error could be.

[UPDATE]:

model.sdf

lift_ctrl.cpp

The solution for me was to use SetForce() instead of using the model SetJointPosition() method. I followed the ElevatorPlugin example and implemented it like that:

this->liftPID.Init(1600, 0, 1600);
double error = this->liftJoint->GetAngle(2).Radian() - (setpoint_height);
double force = this->liftPID.Update(error, _info.simTime - this->prevSimTime);
this->prevSimTime = _info.simTime;
this->liftJoint->SetForce(0, force);

Also an approach over a JointController and setting up a pid over SetPositionPID() was avoiding my problem. But now I'm encountering another one, when I'm trying to lift something with the fork, a pallet or a box, its either flying away or the vehicle starts to shake.... I updated already my model added the same parameters like in the elevator example for the lift joint, but no success.

Thanks a lot, Rob

2016-09-16 08:21:28 -0500 received badge  Scholar (source)
2016-09-13 08:01:49 -0500 received badge  Popular Question (source)
2016-09-10 09:31:31 -0500 asked a question Sensor Plugin loading failure

Hi everyone,

I"m confronted with a strange behavior. I created a model with two custom plugins:

  • socket_com
  • planar_move

and attached 3 Sensors that are based on the RayPlugin.

Here the model.sdf:

model.sdf

When I'm inserting the model via the api:

world->InsertModelFile("model://agv_a4");

The plugins socket_com and planar_move are not loaded, first I have to exclude the sensors, then it's working again.

When I'm inserting the model other a world file, everything works fine, plugins and sensors are loaded from scratch.

Whats wrong? Is it my mistake or an error of the api.

Thanks and best regards.

2016-09-10 09:10:36 -0500 received badge  Famous Question (source)
2016-09-05 03:13:31 -0500 answered a question Modify model names during simulation

Sorry I cant really understand that behavior. When the API gives me the option to change the name of a model, then it should have influence on all other aspects. To restart the GzClient is really unsatisfying! I also wanted to change the model name due to some custom algorithms in the load method, so the numbering is for me important. Do I really have to adjust my algorithm because Im not able to change the name that its indicating the model instance number?

2016-08-18 05:52:54 -0500 commented answer Get WorldPtr to the simulated world by gzserver

Very interested in the outcome, pls let us know about your results :)

2016-08-17 03:35:26 -0500 commented answer Get WorldPtr to the simulated world by gzserver

I would be also very interested. Have a similar problem. Wanted to create a model-view-ctrl concept with gazebo framework, but having issues implementing gazebo plugins into my software. Is there only a publisher subscriber concept designated to pass information?

2016-06-01 02:54:00 -0500 edited question How to communicate with GZServer over a custom Socket-Client

Hi Gazebo Community,

I have to publish some gazebo data to a windows application. For that I wanted to establish a socket communication. I generated a model plugin that is publishing data of interest. The data I can readout through the gazebo gui. For the next step I wanted create a standalone socket client to read the data published by gazebo. As a starter for socket communication the result confuses me.

Code for Client:

using namespace std;

int main(int argc, char* argv[])
{
    int client;
    int portNum = 11345; // NOTE that the port number is same for both client and server
    bool isExit = false;
    int bufsize = 1024;
    char buffer[bufsize];
    char* ip = "127.0.0.1";

    struct sockaddr_in server_addr;

    /// \brief Creating a new Socketconnection
    /// \param[ARG 1] Adress Domain of the Socket
    /// \param[ARG 2] Type of the Socket. Continous TCP Stream
    /// \param[ARG 3] Protocol, choosen by the OS
    client = socket(AF_INET, SOCK_STREAM, 0);

    if(client < 0){
        cerr << "\nError establishing socket..." << endl;
        exit(1);
    }

    cout << "\n=> Client has been created..." << endl;

    server_addr.sin_family = AF_INET;
    server_addr.sin_port = htons(portNum);
    server_addr.sin_addr.s_addr = inet_addr(ip);

    // Connecto to the Socket-Server
    if( connect( client, (struct sockaddr *)&server_addr, sizeof(server_addr)) < 0 ){
        cerr << "\nError establishing connection to Server..." << endl;
        exit(1);
    }
    cout << "=> Awaiting confirmation from the server..." << endl;
    recv(client, buffer, bufsize, 0);
    cout << "=> Connection confirmed..." << endl;


    do {
        recv(client, buffer, bufsize, 0);
        cout << buffer << " ";
    } while (true);

    cout << endl;
    cout << "\n=> Connection terminated.\nGoodbye...\n";
    close(client);

    return 0;
}

And the output is the following:

=> Client has been created...
=> Awaiting confirmation from the server...
=> Connection confirmed...
00000048

����؁�:topic_namepaces_init#
default
/gazebo
velodyne_hdl-3200000990

�������:publishers_init�
K
/gazebo/default/pose/local/infogazebo.msgs.PosesStamped
10.12.0.62 ��
E
/gazebo/default/pose/infogazebo.msgs.PosesStamped
10.12.0.62 ��
6
/gazebo/default/guigazebo.msgs.GUI
10.12.0.62 ��
@
/gazebo/default/responsegazebo.msgs.Response
10.12.0.62 ��
J
/gazebo/default/world_statsgazebo.msgs.WorldStatistics
10.12.0.62 ��
?
/gazebo/default/model/infogazebo.msgs.Model
10.12.0.62 ��
A

I assumed a stream of data and not one single output. Is it right what I'm seeing? How can I access for example the custom topic: /gazebo/veldoyne/scan_pose? Is that because I'm not encoding the ProtoBuf message in the right way and should I proceed with ign_transport lib to create a windows socket client for reading gazebo data?

Thanks for every advice.

Cheers, Rob

2016-05-26 09:31:39 -0500 received badge  Famous Question (source)
2016-05-26 05:23:20 -0500 commented answer How to communicate with GZServer over a custom Socket-Client

After some time I installed all the other deps with apt-get install libignition*. Then the proto file was accepted. But now the Publish() method complains about that the message type is not right. I opened an issue for that topic: https://bitbucket.org/ignitionrobotics/ign-transport/issues/41/publisher-subscriber-example

2016-05-26 05:19:54 -0500 commented answer How to communicate with GZServer over a custom Socket-Client

Hey Carlos, thanks for the help. I installed the deps: Package: libignition-transport-dev Status: install ok installed Section: libdevel Installed-Size: 220 Architecture: amd64 Multi-Arch: same Source: ignition-transport Version: 1.2.0-2~trusty Replaces: libignition-transport-dev (<< 0.9.0) Depends: libignition-transport (= 1.2.0-2~trusty), uuid-dev, libzmq3-dev (>= 3.0.0) Breaks: libignition-transport-dev (<< 0.9.0)

2016-05-25 02:45:54 -0500 commented answer How to communicate with GZServer over a custom Socket-Client

*Thanks for the reply! After a more detailed research I also started with Ignition Transport. Awesome approach and would totally fit my requirements when the windows side is also working.

[UPDATE]

Hi everyone,

I thought that it's maybe interesting how I worked out my Solution. So here my update:

In the end I decided to work with 0MQ in combination with protobuf. I have to communicate on the windows side with multiple programs, some written in c++(the robot controller) and some written in C#(database and other stuff). Because of multiple language bindings, 0MQ & protobuf are perfect for that and easy to implement. The learning curve is pretty high because of the well written api and very good documentation. I used mainly the pub/sub pattern because I have to deal with continuously changing data and that is working basically out of the box. So for me it worked out pretty good, thanks again for all advices.

Greets from Aachen

Here some snippets. I'm always open for improvements, the plugin is causing an error when the model is deleted from the world:

[ Bug Fixes :]

  • Model is now deletable without crashing gazebo
  • Threads are joined when plugin is detached
  • Signals are working now

socket_com.hpp socket_com.cpp

Deps: libzmq3-dev & includes are {zhelpers.hpp, zmq.hpp}

2016-05-24 10:58:31 -0500 received badge  Student (source)
2016-05-24 02:27:47 -0500 answered a question How to communicate with GZServer over a custom Socket-Client

No one there who made a custom protobuf socket without using the gazebo lib?

2016-05-23 03:38:14 -0500 received badge  Notable Question (source)