Home | Tutorials | Wiki | Issues
Ask Your Question

federico.nardi's profile - activity

2020-03-28 17:31:11 -0500 received badge  Notable Question (source)
2020-03-17 09:28:53 -0500 received badge  Popular Question (source)
2020-03-17 02:45:31 -0500 asked a question How to add texure to ground plane?

How to add texure to ground plane? Hi all, I'm using gazebo9 in ROS melodic and I'm following this answer to change the

2019-12-06 19:25:06 -0500 received badge  Famous Question (source)
2019-12-06 19:25:06 -0500 received badge  Notable Question (source)
2019-12-06 19:25:06 -0500 received badge  Popular Question (source)
2019-06-25 09:13:58 -0500 received badge  Famous Question (source)
2019-04-16 03:50:54 -0500 received badge  Famous Question (source)
2019-01-26 08:14:29 -0500 received badge  Notable Question (source)
2019-01-26 08:14:29 -0500 received badge  Popular Question (source)
2019-01-10 09:00:36 -0500 asked a question Gazebo crashing after update!

Gaebo crashing after update! Hi all, I was running the default versions of ROS kinetic and Gazebo 7 that can be install

2018-12-11 06:39:31 -0500 received badge  Famous Question (source)
2018-12-11 06:39:31 -0500 received badge  Notable Question (source)
2018-11-15 10:32:54 -0500 received badge  Famous Question (source)
2018-06-22 13:53:58 -0500 received badge  Popular Question (source)
2018-06-22 10:36:09 -0500 marked best answer How to get msgs::LogicalCameraImage timestamp?

Hi all,

I wrote an urdf for a diff-drive robot with a logical camera sensor.

To publish its messages over ROS I wrote a simple plugin:

#include "logical_camera_plugin.h"

using namespace gazebo;
using namespace std;
using namespace ros;

GZ_REGISTER_SENSOR_PLUGIN(LogicalCameraPlugin);

void LogicalCameraPlugin::Load(sensors::SensorPtr _sensor, sdf::ElementPtr _sdf){
  // Get the parent sensor.
  this->parentSensor = std::dynamic_pointer_cast<sensors::LogicalCameraSensor>(_sensor);

  // Make sure the parent sensor is valid.
  if (!this->parentSensor){
    gzerr << "LogicalCameraPlugin requires a LogicalCameraSensor.\n";
    return;
  }

  // Connect to the sensor update event.
  this->updateConnection = this->parentSensor->ConnectUpdated(std::bind(&LogicalCameraPlugin::OnUpdate, this));

  // Make sure the parent sensor is active.
  this->parentSensor->SetActive(true);

  ...

  nh = new ros::NodeHandle("~");
  image_pub = nh->advertise<lucrezio_simulation_environments::LogicalImage>("logical_camera_image", 1, true);
}

void LogicalCameraPlugin::OnUpdate(){
  msgs::LogicalCameraImage logical_image;
  lucrezio_simulation_environments::LogicalImage msg;

  logical_image = this->parentSensor->Image();
  gazebo::rendering::ScenePtr scene = gazebo::rendering::get_scene();
  if (!scene || !scene->Initialized())
    return;

  msg.header.stamp = ros::Time::now();
  msg.header.frame_id = "logical_camera_link";

  ...

  this->image_pub.publish(msg);
}

My only concern was:

Is it possible to get from the msgs::LogicalCameraImage a timestamp?

Because, right now, I'm giving ros::Time::now() to the ROS message and I guess this is not the right solution.

Thanks.

2018-06-22 10:35:55 -0500 commented answer How to get msgs::LogicalCameraImage timestamp?

my fault, LastUpdateTime should be called!

2018-06-22 10:30:54 -0500 commented answer How to get msgs::LogicalCameraImage timestamp?

It doesn't compile because lastUpdateTime is protected within that context

2018-06-22 10:29:56 -0500 commented answer How to get msgs::LogicalCameraImage timestamp?

Thanks, I'll try! "Come on Iceland"!!!!!

2018-06-22 10:27:47 -0500 commented answer How to get msgs::LogicalCameraImage timestamp?

Thanks, I'll try! "Come on Iceland"!!!!!

2018-06-22 10:01:55 -0500 commented answer How to get msgs::LogicalCameraImage timestamp?

the LogicalCameraPlugin is a SensorPlugin, I'm afraid I didn't get what you mean!

2018-06-22 09:05:36 -0500 asked a question How to get msgs::LogicalCameraImage timestamp?

How to get msgs::LogicalCameraImage timestamp? Hi all, I wrote an urdf for a diff-drive robot with a logical camera sen

2018-06-08 10:37:17 -0500 marked best answer How to call gazebo_msg/GetLinkState service for a sensor mounted on a robot?

Hi all,

I have the following problem:

To make my own robot in gazebo (a diff-drive with a laser and a kinect) I wrote the following urdf:

https://github.com/schizzz8/lucrezio_...

Now, I'd like to call gazebo_msgs/GetLinkState service to retrieve the pose of the sensor with respect to the gazebo world.

If I do that, that's the output I get:

image description

In fact, in the gazebo window, the robot seems to be made of just few links:

image description

How can I have gazebo to see also camera_link in order to retrieve its pose?

Thanks.

2018-06-08 10:36:45 -0500 received badge  Famous Question (source)
2018-06-06 03:16:50 -0500 received badge  Notable Question (source)
2018-06-06 03:11:03 -0500 commented answer How to call gazebo_msg/GetLinkState service for a sensor mounted on a robot?

Of course, if I change the joint type to "continuous" then I can see it. My question is: is that a possible solution? I

2018-06-06 03:07:51 -0500 commented answer How to call gazebo_msg/GetLinkState service for a sensor mounted on a robot?

I tried your solution, but nothing changes. Btw, I pushed the fix to the repo so you can check if I'm doing that right.

2018-06-05 11:59:22 -0500 received badge  Popular Question (source)
2018-06-05 09:33:57 -0500 asked a question How to call gazebo_msg/GetLinkState service for a sensor mounted on a robot?

How to call gazebo_msg/GetLinkState service for a sensor mounted on a robot? Hi all, I have the following problem: To

2018-02-13 11:57:57 -0500 received badge  Notable Question (source)
2018-02-13 11:57:57 -0500 received badge  Popular Question (source)
2018-01-22 12:59:45 -0500 received badge  Famous Question (source)
2017-12-07 17:16:01 -0500 received badge  Notable Question (source)
2017-12-07 15:34:45 -0500 received badge  Popular Question (source)
2017-12-06 03:50:39 -0500 edited question HELP: adding logical_camera sensor to my robot causes strange effect!

HELP: adding a sensor to my robot causes strange effect! Hi all, I'm using gazebo 7 to simulate a differential drive ro

2017-12-06 02:51:14 -0500 edited question HELP: adding logical_camera sensor to my robot causes strange effect!

HELP: adding a sensor to my robot causes strange effect! Hi all, I'm using gazebo 7 to simulate a differential drive ro

2017-12-05 08:57:19 -0500 received badge  Student (source)
2017-12-05 07:52:33 -0500 asked a question HELP: adding logical_camera sensor to my robot causes strange effect!

HELP: adding a sensor to my robot causes strange effect! Hi all, I'm using gazebo 7 to simulate a differential drive ro

2017-12-01 16:13:54 -0500 received badge  Notable Question (source)
2017-12-01 14:46:50 -0500 marked best answer Strange effect when importing DAE model retrieved on the web

Hi all,

I'm trying to enlarge my models database by retrieving models from the 3D warehouse.

As a reference I'm following this tutorial. And the procedure I follow to generate a COLLADA model is the following.

To check the outcome of the procedure, I open the .dae model with Meshlab. And this is what I get!

image description

So, I'm pretty happy with the result!!!

Next, I create a gazebo model in the following steps:

  • go to ~/gazebo/models folder
  • create a folder to store the necessary files (e.g. ./armchair)
  • create model.config and model.sdf files
  • copy the model.dae file in the ./armchair/meshes folder
  • copy the texture images (if any) in the ./armchair/materials/textures/ folder

where the model.config file contains:

<?xml version="1.0"?>

<model>
  <name>armchair</name>
  <version>1.0</version>
  <sdf version="1.5">model.sdf</sdf>

  <author>
    <name>Federico Nardi</name>
    <email>fnardi@dis.uniroma1.it</email>
  </author>

  <description>
  Armchair
  </description>
</model>

and the model.sdf:

<?xml version="1.0" ?>
<sdf version="1.5">
  <model name="armchair">
    <link name="link">
      <pose>0 0 0 0 0 0</pose>
      <collision name="collision">
        <geometry>
          <mesh>
            <uri>model://armchair/meshes/model.dae</uri>
          </mesh>
        </geometry>
      </collision>
      <visual name="visual">
        <geometry>
          <mesh>
            <uri>model://armchair/meshes/model.dae</uri>
          </mesh>
        </geometry>
      </visual>
    </link>
  </model>
</sdf>

When I insert the model in gazebo, this is the picture:

image description

As you can see the textures are correctly loaded, but the edges of the model are marked in white!

Can someone please explain me what's happening?

Thanks.


EDIT: @sloretz, here is the model.dae:

https://drive.google.com/open?id=1J5f...

https://drive.google.com/a/dis.unirom...

https://drive.google.com/a/dis.unirom...


EDIT 2: @nkoenig, I'm using Gazebo 7.0.0.

2017-12-01 13:27:14 -0500 edited question Strange effect when importing DAE model retrieved on the web

Strange effect when importing DAE model retrieved on the web Hi all, I'm trying to enlarge my models database by retrie

2017-12-01 12:30:21 -0500 received badge  Popular Question (source)
2017-12-01 10:58:26 -0500 edited question Strange effect when importing DAE model retrieved on the web

Strange effect when importing DAE model retrieved on the web Hi all, I'm trying to enlarge my models database by retrie

2017-12-01 04:48:34 -0500 asked a question Strange effect when importing DAE model retrieved on the web

Strange effect when importing DAE model retrieved on the web Hi all, I'm trying to enlarge my models database by retrie

2017-11-24 03:28:48 -0500 asked a question How to efficiently build a models database of home furnishings

How to efficiently build a models database of home furnishings Hi all, I'd like to train an object detector to recogniz

2017-11-16 07:49:23 -0500 asked a question Best practice to store gazebo models into ROS packages

Best practice to store gazebo models into ROS packages Hi all, I'd like to use Gazebo 7 to run different experiments re

2017-09-19 11:38:13 -0500 received badge  Famous Question (source)