No version for distro humble showing noetic. Known supported distros are highlighted in the buttons above.
Package symbol

gazebo_custom_sensor_preloader package from gazebo_custom_sensor_preloader repo

gazebo_custom_sensor_preloader

ROS Distro
noetic

Package Summary

Tags No category tags.
Version 1.1.0
License BSD
Build type CATKIN
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/ctu-vras/gazebo_custom_sensor_preloader.git
VCS Type git
VCS Version master
Last Updated 2023-08-29
Dev Status MAINTAINED
CI status Continuous Integration : 0 / 0
Released RELEASED
Tags No category tags.
Contributing Help Wanted (0)
Good First Issues (0)
Pull Requests to Review (0)

Package Description

Gazebo plugin that allows writing custom Gazebo sensors.

Additional Links

Maintainers

  • Martin Pecka

Authors

  • Martin Pecka

Implement custom Gazebo sensors at ease

The current structure of the Gazebo simulator doesn’t allow implementation of custom <sensor>s in the form of externally loaded plugins. To add a new sensor implementation, you officially need to fork Gazebo and add the sensor to its source code.

This doesn’t sound really great, does it?

This Gazebo system plugin allows you to write custom Gazebo sensors as ROS packages (so it depends on gazebo_ros, and adding them to Gazebo is then a matter of a few configuration lines in your sensor code. Theoretically, the mechanism this plugin uses could work completely without ROS, but hey, who uses Gazebo without ROS? :)

This plugin is only tested to work with Gazebo 9. If you successfully use it with a different version, please let me know in the issues.

Known custom sensors

Here’s a (noncomprehensive) list of known custom sensor implementations that work with this plugin. Feel free to open a pull request to add your own implementation here.

  • gazebo_rotating_lidar: A sensor for more realistic simulation of lidars based on a rotating mirror where each laser beam has a different timestamp.

How to do it

There is an example custom sensor in this package: ExampleCustomSensor.cpp, ExampleCustomSensor.h and example_custom_sensor.xml. The most important things will be described further in this document.

⚠ In this guide, we use the names ExampleCustomSensor and example_custom_sensor, which you have to change, because a custom sensor with this class/name is already built in this package.

Create a ROS/catkin package for your sensor

E.g. by calling

catkin_create_pkg ... example_custom_sensor ...

A pretty normal Sensor implementation …

ExampleCustomSensor.h

Here, it is important to note that your custom sensor has to reside inside the gazebo::sensors namespace.

#include <gazebo/sensors/Sensor.hh>

namespace gazebo
{
namespace sensors
{

class ExampleCustomSensor : public Sensor
{

// your code

}
}
}

ExampleCustomSensor.cpp

In the implementation file, you have to register your sensor via the following block of code. The first argument is the Gazebo sensor type, which is how you reference the custom sensor in SDF. It should also match the name attribute in XML plugin definition (prefixed with sensors/).

#include <gazebo/sensors/SensorFactory.hh>

using gazebo::sensors::Sensor;
using gazebo::sensors::SensorFactory;
extern "C"
{
GZ_REGISTER_STATIC_SENSOR("example_custom_sensor", ExampleCustomSensor)
}

// your sensor implementation

… a few configuration lines …

example_custom_sensor.xml

This is a configuration file you may know if you’ve ever used ROS pluginlib, e.g. when implementing a nodelet. The library path is relative to the devel space of your sensor’s workspace, and contains the name of the shared object containing the sensor, excluding the

File truncated at 100 lines see the full file

CHANGELOG

Changelog for package gazebo_custom_sensor_preloader

1.1.0 (2023-08-29)

  • Removed unnecessary pollution of gazebo plugin path.
  • Simplified specifying the plugin name on the command line, cleaned up build files.
  • Noetic compatibility.
  • Contributors: Martin Pecka

1.0.1 (2019-10-17)

  • Deferring the sensor registration so that they are registered after all the default ones.
  • Contributors: Martin Pecka

1.0.0 (2019-10-17)

  • Initial commit.
  • Contributors: Martin Pecka

Wiki Tutorials

This package does not provide any links to tutorials in it's rosindex metadata. You can check on the ROS Wiki Tutorials page for the package.

Package Dependencies

System Dependencies

Name
boost

Dependant Packages

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Recent questions tagged gazebo_custom_sensor_preloader at Robotics Stack Exchange

No version for distro jazzy showing noetic. Known supported distros are highlighted in the buttons above.
Package symbol

gazebo_custom_sensor_preloader package from gazebo_custom_sensor_preloader repo

gazebo_custom_sensor_preloader

ROS Distro
noetic

Package Summary

Tags No category tags.
Version 1.1.0
License BSD
Build type CATKIN
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/ctu-vras/gazebo_custom_sensor_preloader.git
VCS Type git
VCS Version master
Last Updated 2023-08-29
Dev Status MAINTAINED
CI status Continuous Integration : 0 / 0
Released RELEASED
Tags No category tags.
Contributing Help Wanted (0)
Good First Issues (0)
Pull Requests to Review (0)

Package Description

Gazebo plugin that allows writing custom Gazebo sensors.

Additional Links

Maintainers

  • Martin Pecka

Authors

  • Martin Pecka

Implement custom Gazebo sensors at ease

The current structure of the Gazebo simulator doesn’t allow implementation of custom <sensor>s in the form of externally loaded plugins. To add a new sensor implementation, you officially need to fork Gazebo and add the sensor to its source code.

This doesn’t sound really great, does it?

This Gazebo system plugin allows you to write custom Gazebo sensors as ROS packages (so it depends on gazebo_ros, and adding them to Gazebo is then a matter of a few configuration lines in your sensor code. Theoretically, the mechanism this plugin uses could work completely without ROS, but hey, who uses Gazebo without ROS? :)

This plugin is only tested to work with Gazebo 9. If you successfully use it with a different version, please let me know in the issues.

Known custom sensors

Here’s a (noncomprehensive) list of known custom sensor implementations that work with this plugin. Feel free to open a pull request to add your own implementation here.

  • gazebo_rotating_lidar: A sensor for more realistic simulation of lidars based on a rotating mirror where each laser beam has a different timestamp.

How to do it

There is an example custom sensor in this package: ExampleCustomSensor.cpp, ExampleCustomSensor.h and example_custom_sensor.xml. The most important things will be described further in this document.

⚠ In this guide, we use the names ExampleCustomSensor and example_custom_sensor, which you have to change, because a custom sensor with this class/name is already built in this package.

Create a ROS/catkin package for your sensor

E.g. by calling

catkin_create_pkg ... example_custom_sensor ...

A pretty normal Sensor implementation …

ExampleCustomSensor.h

Here, it is important to note that your custom sensor has to reside inside the gazebo::sensors namespace.

#include <gazebo/sensors/Sensor.hh>

namespace gazebo
{
namespace sensors
{

class ExampleCustomSensor : public Sensor
{

// your code

}
}
}

ExampleCustomSensor.cpp

In the implementation file, you have to register your sensor via the following block of code. The first argument is the Gazebo sensor type, which is how you reference the custom sensor in SDF. It should also match the name attribute in XML plugin definition (prefixed with sensors/).

#include <gazebo/sensors/SensorFactory.hh>

using gazebo::sensors::Sensor;
using gazebo::sensors::SensorFactory;
extern "C"
{
GZ_REGISTER_STATIC_SENSOR("example_custom_sensor", ExampleCustomSensor)
}

// your sensor implementation

… a few configuration lines …

example_custom_sensor.xml

This is a configuration file you may know if you’ve ever used ROS pluginlib, e.g. when implementing a nodelet. The library path is relative to the devel space of your sensor’s workspace, and contains the name of the shared object containing the sensor, excluding the

File truncated at 100 lines see the full file

CHANGELOG

Changelog for package gazebo_custom_sensor_preloader

1.1.0 (2023-08-29)

  • Removed unnecessary pollution of gazebo plugin path.
  • Simplified specifying the plugin name on the command line, cleaned up build files.
  • Noetic compatibility.
  • Contributors: Martin Pecka

1.0.1 (2019-10-17)

  • Deferring the sensor registration so that they are registered after all the default ones.
  • Contributors: Martin Pecka

1.0.0 (2019-10-17)

  • Initial commit.
  • Contributors: Martin Pecka

Wiki Tutorials

This package does not provide any links to tutorials in it's rosindex metadata. You can check on the ROS Wiki Tutorials page for the package.

Package Dependencies

System Dependencies

Name
boost

Dependant Packages

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Recent questions tagged gazebo_custom_sensor_preloader at Robotics Stack Exchange

No version for distro kilted showing noetic. Known supported distros are highlighted in the buttons above.
Package symbol

gazebo_custom_sensor_preloader package from gazebo_custom_sensor_preloader repo

gazebo_custom_sensor_preloader

ROS Distro
noetic

Package Summary

Tags No category tags.
Version 1.1.0
License BSD
Build type CATKIN
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/ctu-vras/gazebo_custom_sensor_preloader.git
VCS Type git
VCS Version master
Last Updated 2023-08-29
Dev Status MAINTAINED
CI status Continuous Integration : 0 / 0
Released RELEASED
Tags No category tags.
Contributing Help Wanted (0)
Good First Issues (0)
Pull Requests to Review (0)

Package Description

Gazebo plugin that allows writing custom Gazebo sensors.

Additional Links

Maintainers

  • Martin Pecka

Authors

  • Martin Pecka

Implement custom Gazebo sensors at ease

The current structure of the Gazebo simulator doesn’t allow implementation of custom <sensor>s in the form of externally loaded plugins. To add a new sensor implementation, you officially need to fork Gazebo and add the sensor to its source code.

This doesn’t sound really great, does it?

This Gazebo system plugin allows you to write custom Gazebo sensors as ROS packages (so it depends on gazebo_ros, and adding them to Gazebo is then a matter of a few configuration lines in your sensor code. Theoretically, the mechanism this plugin uses could work completely without ROS, but hey, who uses Gazebo without ROS? :)

This plugin is only tested to work with Gazebo 9. If you successfully use it with a different version, please let me know in the issues.

Known custom sensors

Here’s a (noncomprehensive) list of known custom sensor implementations that work with this plugin. Feel free to open a pull request to add your own implementation here.

  • gazebo_rotating_lidar: A sensor for more realistic simulation of lidars based on a rotating mirror where each laser beam has a different timestamp.

How to do it

There is an example custom sensor in this package: ExampleCustomSensor.cpp, ExampleCustomSensor.h and example_custom_sensor.xml. The most important things will be described further in this document.

⚠ In this guide, we use the names ExampleCustomSensor and example_custom_sensor, which you have to change, because a custom sensor with this class/name is already built in this package.

Create a ROS/catkin package for your sensor

E.g. by calling

catkin_create_pkg ... example_custom_sensor ...

A pretty normal Sensor implementation …

ExampleCustomSensor.h

Here, it is important to note that your custom sensor has to reside inside the gazebo::sensors namespace.

#include <gazebo/sensors/Sensor.hh>

namespace gazebo
{
namespace sensors
{

class ExampleCustomSensor : public Sensor
{

// your code

}
}
}

ExampleCustomSensor.cpp

In the implementation file, you have to register your sensor via the following block of code. The first argument is the Gazebo sensor type, which is how you reference the custom sensor in SDF. It should also match the name attribute in XML plugin definition (prefixed with sensors/).

#include <gazebo/sensors/SensorFactory.hh>

using gazebo::sensors::Sensor;
using gazebo::sensors::SensorFactory;
extern "C"
{
GZ_REGISTER_STATIC_SENSOR("example_custom_sensor", ExampleCustomSensor)
}

// your sensor implementation

… a few configuration lines …

example_custom_sensor.xml

This is a configuration file you may know if you’ve ever used ROS pluginlib, e.g. when implementing a nodelet. The library path is relative to the devel space of your sensor’s workspace, and contains the name of the shared object containing the sensor, excluding the

File truncated at 100 lines see the full file

CHANGELOG

Changelog for package gazebo_custom_sensor_preloader

1.1.0 (2023-08-29)

  • Removed unnecessary pollution of gazebo plugin path.
  • Simplified specifying the plugin name on the command line, cleaned up build files.
  • Noetic compatibility.
  • Contributors: Martin Pecka

1.0.1 (2019-10-17)

  • Deferring the sensor registration so that they are registered after all the default ones.
  • Contributors: Martin Pecka

1.0.0 (2019-10-17)

  • Initial commit.
  • Contributors: Martin Pecka

Wiki Tutorials

This package does not provide any links to tutorials in it's rosindex metadata. You can check on the ROS Wiki Tutorials page for the package.

Package Dependencies

System Dependencies

Name
boost

Dependant Packages

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Recent questions tagged gazebo_custom_sensor_preloader at Robotics Stack Exchange

No version for distro rolling showing noetic. Known supported distros are highlighted in the buttons above.
Package symbol

gazebo_custom_sensor_preloader package from gazebo_custom_sensor_preloader repo

gazebo_custom_sensor_preloader

ROS Distro
noetic

Package Summary

Tags No category tags.
Version 1.1.0
License BSD
Build type CATKIN
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/ctu-vras/gazebo_custom_sensor_preloader.git
VCS Type git
VCS Version master
Last Updated 2023-08-29
Dev Status MAINTAINED
CI status Continuous Integration : 0 / 0
Released RELEASED
Tags No category tags.
Contributing Help Wanted (0)
Good First Issues (0)
Pull Requests to Review (0)

Package Description

Gazebo plugin that allows writing custom Gazebo sensors.

Additional Links

Maintainers

  • Martin Pecka

Authors

  • Martin Pecka

Implement custom Gazebo sensors at ease

The current structure of the Gazebo simulator doesn’t allow implementation of custom <sensor>s in the form of externally loaded plugins. To add a new sensor implementation, you officially need to fork Gazebo and add the sensor to its source code.

This doesn’t sound really great, does it?

This Gazebo system plugin allows you to write custom Gazebo sensors as ROS packages (so it depends on gazebo_ros, and adding them to Gazebo is then a matter of a few configuration lines in your sensor code. Theoretically, the mechanism this plugin uses could work completely without ROS, but hey, who uses Gazebo without ROS? :)

This plugin is only tested to work with Gazebo 9. If you successfully use it with a different version, please let me know in the issues.

Known custom sensors

Here’s a (noncomprehensive) list of known custom sensor implementations that work with this plugin. Feel free to open a pull request to add your own implementation here.

  • gazebo_rotating_lidar: A sensor for more realistic simulation of lidars based on a rotating mirror where each laser beam has a different timestamp.

How to do it

There is an example custom sensor in this package: ExampleCustomSensor.cpp, ExampleCustomSensor.h and example_custom_sensor.xml. The most important things will be described further in this document.

⚠ In this guide, we use the names ExampleCustomSensor and example_custom_sensor, which you have to change, because a custom sensor with this class/name is already built in this package.

Create a ROS/catkin package for your sensor

E.g. by calling

catkin_create_pkg ... example_custom_sensor ...

A pretty normal Sensor implementation …

ExampleCustomSensor.h

Here, it is important to note that your custom sensor has to reside inside the gazebo::sensors namespace.

#include <gazebo/sensors/Sensor.hh>

namespace gazebo
{
namespace sensors
{

class ExampleCustomSensor : public Sensor
{

// your code

}
}
}

ExampleCustomSensor.cpp

In the implementation file, you have to register your sensor via the following block of code. The first argument is the Gazebo sensor type, which is how you reference the custom sensor in SDF. It should also match the name attribute in XML plugin definition (prefixed with sensors/).

#include <gazebo/sensors/SensorFactory.hh>

using gazebo::sensors::Sensor;
using gazebo::sensors::SensorFactory;
extern "C"
{
GZ_REGISTER_STATIC_SENSOR("example_custom_sensor", ExampleCustomSensor)
}

// your sensor implementation

… a few configuration lines …

example_custom_sensor.xml

This is a configuration file you may know if you’ve ever used ROS pluginlib, e.g. when implementing a nodelet. The library path is relative to the devel space of your sensor’s workspace, and contains the name of the shared object containing the sensor, excluding the

File truncated at 100 lines see the full file

CHANGELOG

Changelog for package gazebo_custom_sensor_preloader

1.1.0 (2023-08-29)

  • Removed unnecessary pollution of gazebo plugin path.
  • Simplified specifying the plugin name on the command line, cleaned up build files.
  • Noetic compatibility.
  • Contributors: Martin Pecka

1.0.1 (2019-10-17)

  • Deferring the sensor registration so that they are registered after all the default ones.
  • Contributors: Martin Pecka

1.0.0 (2019-10-17)

  • Initial commit.
  • Contributors: Martin Pecka

Wiki Tutorials

This package does not provide any links to tutorials in it's rosindex metadata. You can check on the ROS Wiki Tutorials page for the package.

Package Dependencies

System Dependencies

Name
boost

Dependant Packages

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Recent questions tagged gazebo_custom_sensor_preloader at Robotics Stack Exchange

No version for distro ardent showing noetic. Known supported distros are highlighted in the buttons above.
Package symbol

gazebo_custom_sensor_preloader package from gazebo_custom_sensor_preloader repo

gazebo_custom_sensor_preloader

ROS Distro
noetic

Package Summary

Tags No category tags.
Version 1.1.0
License BSD
Build type CATKIN
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/ctu-vras/gazebo_custom_sensor_preloader.git
VCS Type git
VCS Version master
Last Updated 2023-08-29
Dev Status MAINTAINED
CI status Continuous Integration : 0 / 0
Released RELEASED
Tags No category tags.
Contributing Help Wanted (0)
Good First Issues (0)
Pull Requests to Review (0)

Package Description

Gazebo plugin that allows writing custom Gazebo sensors.

Additional Links

Maintainers

  • Martin Pecka

Authors

  • Martin Pecka

Implement custom Gazebo sensors at ease

The current structure of the Gazebo simulator doesn’t allow implementation of custom <sensor>s in the form of externally loaded plugins. To add a new sensor implementation, you officially need to fork Gazebo and add the sensor to its source code.

This doesn’t sound really great, does it?

This Gazebo system plugin allows you to write custom Gazebo sensors as ROS packages (so it depends on gazebo_ros, and adding them to Gazebo is then a matter of a few configuration lines in your sensor code. Theoretically, the mechanism this plugin uses could work completely without ROS, but hey, who uses Gazebo without ROS? :)

This plugin is only tested to work with Gazebo 9. If you successfully use it with a different version, please let me know in the issues.

Known custom sensors

Here’s a (noncomprehensive) list of known custom sensor implementations that work with this plugin. Feel free to open a pull request to add your own implementation here.

  • gazebo_rotating_lidar: A sensor for more realistic simulation of lidars based on a rotating mirror where each laser beam has a different timestamp.

How to do it

There is an example custom sensor in this package: ExampleCustomSensor.cpp, ExampleCustomSensor.h and example_custom_sensor.xml. The most important things will be described further in this document.

⚠ In this guide, we use the names ExampleCustomSensor and example_custom_sensor, which you have to change, because a custom sensor with this class/name is already built in this package.

Create a ROS/catkin package for your sensor

E.g. by calling

catkin_create_pkg ... example_custom_sensor ...

A pretty normal Sensor implementation …

ExampleCustomSensor.h

Here, it is important to note that your custom sensor has to reside inside the gazebo::sensors namespace.

#include <gazebo/sensors/Sensor.hh>

namespace gazebo
{
namespace sensors
{

class ExampleCustomSensor : public Sensor
{

// your code

}
}
}

ExampleCustomSensor.cpp

In the implementation file, you have to register your sensor via the following block of code. The first argument is the Gazebo sensor type, which is how you reference the custom sensor in SDF. It should also match the name attribute in XML plugin definition (prefixed with sensors/).

#include <gazebo/sensors/SensorFactory.hh>

using gazebo::sensors::Sensor;
using gazebo::sensors::SensorFactory;
extern "C"
{
GZ_REGISTER_STATIC_SENSOR("example_custom_sensor", ExampleCustomSensor)
}

// your sensor implementation

… a few configuration lines …

example_custom_sensor.xml

This is a configuration file you may know if you’ve ever used ROS pluginlib, e.g. when implementing a nodelet. The library path is relative to the devel space of your sensor’s workspace, and contains the name of the shared object containing the sensor, excluding the

File truncated at 100 lines see the full file

CHANGELOG

Changelog for package gazebo_custom_sensor_preloader

1.1.0 (2023-08-29)

  • Removed unnecessary pollution of gazebo plugin path.
  • Simplified specifying the plugin name on the command line, cleaned up build files.
  • Noetic compatibility.
  • Contributors: Martin Pecka

1.0.1 (2019-10-17)

  • Deferring the sensor registration so that they are registered after all the default ones.
  • Contributors: Martin Pecka

1.0.0 (2019-10-17)

  • Initial commit.
  • Contributors: Martin Pecka

Wiki Tutorials

This package does not provide any links to tutorials in it's rosindex metadata. You can check on the ROS Wiki Tutorials page for the package.

Package Dependencies

System Dependencies

Name
boost

Dependant Packages

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Recent questions tagged gazebo_custom_sensor_preloader at Robotics Stack Exchange

No version for distro bouncy showing noetic. Known supported distros are highlighted in the buttons above.
Package symbol

gazebo_custom_sensor_preloader package from gazebo_custom_sensor_preloader repo

gazebo_custom_sensor_preloader

ROS Distro
noetic

Package Summary

Tags No category tags.
Version 1.1.0
License BSD
Build type CATKIN
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/ctu-vras/gazebo_custom_sensor_preloader.git
VCS Type git
VCS Version master
Last Updated 2023-08-29
Dev Status MAINTAINED
CI status Continuous Integration : 0 / 0
Released RELEASED
Tags No category tags.
Contributing Help Wanted (0)
Good First Issues (0)
Pull Requests to Review (0)

Package Description

Gazebo plugin that allows writing custom Gazebo sensors.

Additional Links

Maintainers

  • Martin Pecka

Authors

  • Martin Pecka

Implement custom Gazebo sensors at ease

The current structure of the Gazebo simulator doesn’t allow implementation of custom <sensor>s in the form of externally loaded plugins. To add a new sensor implementation, you officially need to fork Gazebo and add the sensor to its source code.

This doesn’t sound really great, does it?

This Gazebo system plugin allows you to write custom Gazebo sensors as ROS packages (so it depends on gazebo_ros, and adding them to Gazebo is then a matter of a few configuration lines in your sensor code. Theoretically, the mechanism this plugin uses could work completely without ROS, but hey, who uses Gazebo without ROS? :)

This plugin is only tested to work with Gazebo 9. If you successfully use it with a different version, please let me know in the issues.

Known custom sensors

Here’s a (noncomprehensive) list of known custom sensor implementations that work with this plugin. Feel free to open a pull request to add your own implementation here.

  • gazebo_rotating_lidar: A sensor for more realistic simulation of lidars based on a rotating mirror where each laser beam has a different timestamp.

How to do it

There is an example custom sensor in this package: ExampleCustomSensor.cpp, ExampleCustomSensor.h and example_custom_sensor.xml. The most important things will be described further in this document.

⚠ In this guide, we use the names ExampleCustomSensor and example_custom_sensor, which you have to change, because a custom sensor with this class/name is already built in this package.

Create a ROS/catkin package for your sensor

E.g. by calling

catkin_create_pkg ... example_custom_sensor ...

A pretty normal Sensor implementation …

ExampleCustomSensor.h

Here, it is important to note that your custom sensor has to reside inside the gazebo::sensors namespace.

#include <gazebo/sensors/Sensor.hh>

namespace gazebo
{
namespace sensors
{

class ExampleCustomSensor : public Sensor
{

// your code

}
}
}

ExampleCustomSensor.cpp

In the implementation file, you have to register your sensor via the following block of code. The first argument is the Gazebo sensor type, which is how you reference the custom sensor in SDF. It should also match the name attribute in XML plugin definition (prefixed with sensors/).

#include <gazebo/sensors/SensorFactory.hh>

using gazebo::sensors::Sensor;
using gazebo::sensors::SensorFactory;
extern "C"
{
GZ_REGISTER_STATIC_SENSOR("example_custom_sensor", ExampleCustomSensor)
}

// your sensor implementation

… a few configuration lines …

example_custom_sensor.xml

This is a configuration file you may know if you’ve ever used ROS pluginlib, e.g. when implementing a nodelet. The library path is relative to the devel space of your sensor’s workspace, and contains the name of the shared object containing the sensor, excluding the

File truncated at 100 lines see the full file

CHANGELOG

Changelog for package gazebo_custom_sensor_preloader

1.1.0 (2023-08-29)

  • Removed unnecessary pollution of gazebo plugin path.
  • Simplified specifying the plugin name on the command line, cleaned up build files.
  • Noetic compatibility.
  • Contributors: Martin Pecka

1.0.1 (2019-10-17)

  • Deferring the sensor registration so that they are registered after all the default ones.
  • Contributors: Martin Pecka

1.0.0 (2019-10-17)

  • Initial commit.
  • Contributors: Martin Pecka

Wiki Tutorials

This package does not provide any links to tutorials in it's rosindex metadata. You can check on the ROS Wiki Tutorials page for the package.

Package Dependencies

System Dependencies

Name
boost

Dependant Packages

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Recent questions tagged gazebo_custom_sensor_preloader at Robotics Stack Exchange

No version for distro crystal showing noetic. Known supported distros are highlighted in the buttons above.
Package symbol

gazebo_custom_sensor_preloader package from gazebo_custom_sensor_preloader repo

gazebo_custom_sensor_preloader

ROS Distro
noetic

Package Summary

Tags No category tags.
Version 1.1.0
License BSD
Build type CATKIN
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/ctu-vras/gazebo_custom_sensor_preloader.git
VCS Type git
VCS Version master
Last Updated 2023-08-29
Dev Status MAINTAINED
CI status Continuous Integration : 0 / 0
Released RELEASED
Tags No category tags.
Contributing Help Wanted (0)
Good First Issues (0)
Pull Requests to Review (0)

Package Description

Gazebo plugin that allows writing custom Gazebo sensors.

Additional Links

Maintainers

  • Martin Pecka

Authors

  • Martin Pecka

Implement custom Gazebo sensors at ease

The current structure of the Gazebo simulator doesn’t allow implementation of custom <sensor>s in the form of externally loaded plugins. To add a new sensor implementation, you officially need to fork Gazebo and add the sensor to its source code.

This doesn’t sound really great, does it?

This Gazebo system plugin allows you to write custom Gazebo sensors as ROS packages (so it depends on gazebo_ros, and adding them to Gazebo is then a matter of a few configuration lines in your sensor code. Theoretically, the mechanism this plugin uses could work completely without ROS, but hey, who uses Gazebo without ROS? :)

This plugin is only tested to work with Gazebo 9. If you successfully use it with a different version, please let me know in the issues.

Known custom sensors

Here’s a (noncomprehensive) list of known custom sensor implementations that work with this plugin. Feel free to open a pull request to add your own implementation here.

  • gazebo_rotating_lidar: A sensor for more realistic simulation of lidars based on a rotating mirror where each laser beam has a different timestamp.

How to do it

There is an example custom sensor in this package: ExampleCustomSensor.cpp, ExampleCustomSensor.h and example_custom_sensor.xml. The most important things will be described further in this document.

⚠ In this guide, we use the names ExampleCustomSensor and example_custom_sensor, which you have to change, because a custom sensor with this class/name is already built in this package.

Create a ROS/catkin package for your sensor

E.g. by calling

catkin_create_pkg ... example_custom_sensor ...

A pretty normal Sensor implementation …

ExampleCustomSensor.h

Here, it is important to note that your custom sensor has to reside inside the gazebo::sensors namespace.

#include <gazebo/sensors/Sensor.hh>

namespace gazebo
{
namespace sensors
{

class ExampleCustomSensor : public Sensor
{

// your code

}
}
}

ExampleCustomSensor.cpp

In the implementation file, you have to register your sensor via the following block of code. The first argument is the Gazebo sensor type, which is how you reference the custom sensor in SDF. It should also match the name attribute in XML plugin definition (prefixed with sensors/).

#include <gazebo/sensors/SensorFactory.hh>

using gazebo::sensors::Sensor;
using gazebo::sensors::SensorFactory;
extern "C"
{
GZ_REGISTER_STATIC_SENSOR("example_custom_sensor", ExampleCustomSensor)
}

// your sensor implementation

… a few configuration lines …

example_custom_sensor.xml

This is a configuration file you may know if you’ve ever used ROS pluginlib, e.g. when implementing a nodelet. The library path is relative to the devel space of your sensor’s workspace, and contains the name of the shared object containing the sensor, excluding the

File truncated at 100 lines see the full file

CHANGELOG

Changelog for package gazebo_custom_sensor_preloader

1.1.0 (2023-08-29)

  • Removed unnecessary pollution of gazebo plugin path.
  • Simplified specifying the plugin name on the command line, cleaned up build files.
  • Noetic compatibility.
  • Contributors: Martin Pecka

1.0.1 (2019-10-17)

  • Deferring the sensor registration so that they are registered after all the default ones.
  • Contributors: Martin Pecka

1.0.0 (2019-10-17)

  • Initial commit.
  • Contributors: Martin Pecka

Wiki Tutorials

This package does not provide any links to tutorials in it's rosindex metadata. You can check on the ROS Wiki Tutorials page for the package.

Package Dependencies

System Dependencies

Name
boost

Dependant Packages

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Recent questions tagged gazebo_custom_sensor_preloader at Robotics Stack Exchange

No version for distro eloquent showing noetic. Known supported distros are highlighted in the buttons above.
Package symbol

gazebo_custom_sensor_preloader package from gazebo_custom_sensor_preloader repo

gazebo_custom_sensor_preloader

ROS Distro
noetic

Package Summary

Tags No category tags.
Version 1.1.0
License BSD
Build type CATKIN
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/ctu-vras/gazebo_custom_sensor_preloader.git
VCS Type git
VCS Version master
Last Updated 2023-08-29
Dev Status MAINTAINED
CI status Continuous Integration : 0 / 0
Released RELEASED
Tags No category tags.
Contributing Help Wanted (0)
Good First Issues (0)
Pull Requests to Review (0)

Package Description

Gazebo plugin that allows writing custom Gazebo sensors.

Additional Links

Maintainers

  • Martin Pecka

Authors

  • Martin Pecka

Implement custom Gazebo sensors at ease

The current structure of the Gazebo simulator doesn’t allow implementation of custom <sensor>s in the form of externally loaded plugins. To add a new sensor implementation, you officially need to fork Gazebo and add the sensor to its source code.

This doesn’t sound really great, does it?

This Gazebo system plugin allows you to write custom Gazebo sensors as ROS packages (so it depends on gazebo_ros, and adding them to Gazebo is then a matter of a few configuration lines in your sensor code. Theoretically, the mechanism this plugin uses could work completely without ROS, but hey, who uses Gazebo without ROS? :)

This plugin is only tested to work with Gazebo 9. If you successfully use it with a different version, please let me know in the issues.

Known custom sensors

Here’s a (noncomprehensive) list of known custom sensor implementations that work with this plugin. Feel free to open a pull request to add your own implementation here.

  • gazebo_rotating_lidar: A sensor for more realistic simulation of lidars based on a rotating mirror where each laser beam has a different timestamp.

How to do it

There is an example custom sensor in this package: ExampleCustomSensor.cpp, ExampleCustomSensor.h and example_custom_sensor.xml. The most important things will be described further in this document.

⚠ In this guide, we use the names ExampleCustomSensor and example_custom_sensor, which you have to change, because a custom sensor with this class/name is already built in this package.

Create a ROS/catkin package for your sensor

E.g. by calling

catkin_create_pkg ... example_custom_sensor ...

A pretty normal Sensor implementation …

ExampleCustomSensor.h

Here, it is important to note that your custom sensor has to reside inside the gazebo::sensors namespace.

#include <gazebo/sensors/Sensor.hh>

namespace gazebo
{
namespace sensors
{

class ExampleCustomSensor : public Sensor
{

// your code

}
}
}

ExampleCustomSensor.cpp

In the implementation file, you have to register your sensor via the following block of code. The first argument is the Gazebo sensor type, which is how you reference the custom sensor in SDF. It should also match the name attribute in XML plugin definition (prefixed with sensors/).

#include <gazebo/sensors/SensorFactory.hh>

using gazebo::sensors::Sensor;
using gazebo::sensors::SensorFactory;
extern "C"
{
GZ_REGISTER_STATIC_SENSOR("example_custom_sensor", ExampleCustomSensor)
}

// your sensor implementation

… a few configuration lines …

example_custom_sensor.xml

This is a configuration file you may know if you’ve ever used ROS pluginlib, e.g. when implementing a nodelet. The library path is relative to the devel space of your sensor’s workspace, and contains the name of the shared object containing the sensor, excluding the

File truncated at 100 lines see the full file

CHANGELOG

Changelog for package gazebo_custom_sensor_preloader

1.1.0 (2023-08-29)

  • Removed unnecessary pollution of gazebo plugin path.
  • Simplified specifying the plugin name on the command line, cleaned up build files.
  • Noetic compatibility.
  • Contributors: Martin Pecka

1.0.1 (2019-10-17)

  • Deferring the sensor registration so that they are registered after all the default ones.
  • Contributors: Martin Pecka

1.0.0 (2019-10-17)

  • Initial commit.
  • Contributors: Martin Pecka

Wiki Tutorials

This package does not provide any links to tutorials in it's rosindex metadata. You can check on the ROS Wiki Tutorials page for the package.

Package Dependencies

System Dependencies

Name
boost

Dependant Packages

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Recent questions tagged gazebo_custom_sensor_preloader at Robotics Stack Exchange

No version for distro dashing showing noetic. Known supported distros are highlighted in the buttons above.
Package symbol

gazebo_custom_sensor_preloader package from gazebo_custom_sensor_preloader repo

gazebo_custom_sensor_preloader

ROS Distro
noetic

Package Summary

Tags No category tags.
Version 1.1.0
License BSD
Build type CATKIN
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/ctu-vras/gazebo_custom_sensor_preloader.git
VCS Type git
VCS Version master
Last Updated 2023-08-29
Dev Status MAINTAINED
CI status Continuous Integration : 0 / 0
Released RELEASED
Tags No category tags.
Contributing Help Wanted (0)
Good First Issues (0)
Pull Requests to Review (0)

Package Description

Gazebo plugin that allows writing custom Gazebo sensors.

Additional Links

Maintainers

  • Martin Pecka

Authors

  • Martin Pecka

Implement custom Gazebo sensors at ease

The current structure of the Gazebo simulator doesn’t allow implementation of custom <sensor>s in the form of externally loaded plugins. To add a new sensor implementation, you officially need to fork Gazebo and add the sensor to its source code.

This doesn’t sound really great, does it?

This Gazebo system plugin allows you to write custom Gazebo sensors as ROS packages (so it depends on gazebo_ros, and adding them to Gazebo is then a matter of a few configuration lines in your sensor code. Theoretically, the mechanism this plugin uses could work completely without ROS, but hey, who uses Gazebo without ROS? :)

This plugin is only tested to work with Gazebo 9. If you successfully use it with a different version, please let me know in the issues.

Known custom sensors

Here’s a (noncomprehensive) list of known custom sensor implementations that work with this plugin. Feel free to open a pull request to add your own implementation here.

  • gazebo_rotating_lidar: A sensor for more realistic simulation of lidars based on a rotating mirror where each laser beam has a different timestamp.

How to do it

There is an example custom sensor in this package: ExampleCustomSensor.cpp, ExampleCustomSensor.h and example_custom_sensor.xml. The most important things will be described further in this document.

⚠ In this guide, we use the names ExampleCustomSensor and example_custom_sensor, which you have to change, because a custom sensor with this class/name is already built in this package.

Create a ROS/catkin package for your sensor

E.g. by calling

catkin_create_pkg ... example_custom_sensor ...

A pretty normal Sensor implementation …

ExampleCustomSensor.h

Here, it is important to note that your custom sensor has to reside inside the gazebo::sensors namespace.

#include <gazebo/sensors/Sensor.hh>

namespace gazebo
{
namespace sensors
{

class ExampleCustomSensor : public Sensor
{

// your code

}
}
}

ExampleCustomSensor.cpp

In the implementation file, you have to register your sensor via the following block of code. The first argument is the Gazebo sensor type, which is how you reference the custom sensor in SDF. It should also match the name attribute in XML plugin definition (prefixed with sensors/).

#include <gazebo/sensors/SensorFactory.hh>

using gazebo::sensors::Sensor;
using gazebo::sensors::SensorFactory;
extern "C"
{
GZ_REGISTER_STATIC_SENSOR("example_custom_sensor", ExampleCustomSensor)
}

// your sensor implementation

… a few configuration lines …

example_custom_sensor.xml

This is a configuration file you may know if you’ve ever used ROS pluginlib, e.g. when implementing a nodelet. The library path is relative to the devel space of your sensor’s workspace, and contains the name of the shared object containing the sensor, excluding the

File truncated at 100 lines see the full file

CHANGELOG

Changelog for package gazebo_custom_sensor_preloader

1.1.0 (2023-08-29)

  • Removed unnecessary pollution of gazebo plugin path.
  • Simplified specifying the plugin name on the command line, cleaned up build files.
  • Noetic compatibility.
  • Contributors: Martin Pecka

1.0.1 (2019-10-17)

  • Deferring the sensor registration so that they are registered after all the default ones.
  • Contributors: Martin Pecka

1.0.0 (2019-10-17)

  • Initial commit.
  • Contributors: Martin Pecka

Wiki Tutorials

This package does not provide any links to tutorials in it's rosindex metadata. You can check on the ROS Wiki Tutorials page for the package.

Package Dependencies

System Dependencies

Name
boost

Dependant Packages

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Recent questions tagged gazebo_custom_sensor_preloader at Robotics Stack Exchange

No version for distro galactic showing noetic. Known supported distros are highlighted in the buttons above.
Package symbol

gazebo_custom_sensor_preloader package from gazebo_custom_sensor_preloader repo

gazebo_custom_sensor_preloader

ROS Distro
noetic

Package Summary

Tags No category tags.
Version 1.1.0
License BSD
Build type CATKIN
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/ctu-vras/gazebo_custom_sensor_preloader.git
VCS Type git
VCS Version master
Last Updated 2023-08-29
Dev Status MAINTAINED
CI status Continuous Integration : 0 / 0
Released RELEASED
Tags No category tags.
Contributing Help Wanted (0)
Good First Issues (0)
Pull Requests to Review (0)

Package Description

Gazebo plugin that allows writing custom Gazebo sensors.

Additional Links

Maintainers

  • Martin Pecka

Authors

  • Martin Pecka

Implement custom Gazebo sensors at ease

The current structure of the Gazebo simulator doesn’t allow implementation of custom <sensor>s in the form of externally loaded plugins. To add a new sensor implementation, you officially need to fork Gazebo and add the sensor to its source code.

This doesn’t sound really great, does it?

This Gazebo system plugin allows you to write custom Gazebo sensors as ROS packages (so it depends on gazebo_ros, and adding them to Gazebo is then a matter of a few configuration lines in your sensor code. Theoretically, the mechanism this plugin uses could work completely without ROS, but hey, who uses Gazebo without ROS? :)

This plugin is only tested to work with Gazebo 9. If you successfully use it with a different version, please let me know in the issues.

Known custom sensors

Here’s a (noncomprehensive) list of known custom sensor implementations that work with this plugin. Feel free to open a pull request to add your own implementation here.

  • gazebo_rotating_lidar: A sensor for more realistic simulation of lidars based on a rotating mirror where each laser beam has a different timestamp.

How to do it

There is an example custom sensor in this package: ExampleCustomSensor.cpp, ExampleCustomSensor.h and example_custom_sensor.xml. The most important things will be described further in this document.

⚠ In this guide, we use the names ExampleCustomSensor and example_custom_sensor, which you have to change, because a custom sensor with this class/name is already built in this package.

Create a ROS/catkin package for your sensor

E.g. by calling

catkin_create_pkg ... example_custom_sensor ...

A pretty normal Sensor implementation …

ExampleCustomSensor.h

Here, it is important to note that your custom sensor has to reside inside the gazebo::sensors namespace.

#include <gazebo/sensors/Sensor.hh>

namespace gazebo
{
namespace sensors
{

class ExampleCustomSensor : public Sensor
{

// your code

}
}
}

ExampleCustomSensor.cpp

In the implementation file, you have to register your sensor via the following block of code. The first argument is the Gazebo sensor type, which is how you reference the custom sensor in SDF. It should also match the name attribute in XML plugin definition (prefixed with sensors/).

#include <gazebo/sensors/SensorFactory.hh>

using gazebo::sensors::Sensor;
using gazebo::sensors::SensorFactory;
extern "C"
{
GZ_REGISTER_STATIC_SENSOR("example_custom_sensor", ExampleCustomSensor)
}

// your sensor implementation

… a few configuration lines …

example_custom_sensor.xml

This is a configuration file you may know if you’ve ever used ROS pluginlib, e.g. when implementing a nodelet. The library path is relative to the devel space of your sensor’s workspace, and contains the name of the shared object containing the sensor, excluding the

File truncated at 100 lines see the full file

CHANGELOG

Changelog for package gazebo_custom_sensor_preloader

1.1.0 (2023-08-29)

  • Removed unnecessary pollution of gazebo plugin path.
  • Simplified specifying the plugin name on the command line, cleaned up build files.
  • Noetic compatibility.
  • Contributors: Martin Pecka

1.0.1 (2019-10-17)

  • Deferring the sensor registration so that they are registered after all the default ones.
  • Contributors: Martin Pecka

1.0.0 (2019-10-17)

  • Initial commit.
  • Contributors: Martin Pecka

Wiki Tutorials

This package does not provide any links to tutorials in it's rosindex metadata. You can check on the ROS Wiki Tutorials page for the package.

Package Dependencies

System Dependencies

Name
boost

Dependant Packages

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Recent questions tagged gazebo_custom_sensor_preloader at Robotics Stack Exchange

No version for distro foxy showing noetic. Known supported distros are highlighted in the buttons above.
Package symbol

gazebo_custom_sensor_preloader package from gazebo_custom_sensor_preloader repo

gazebo_custom_sensor_preloader

ROS Distro
noetic

Package Summary

Tags No category tags.
Version 1.1.0
License BSD
Build type CATKIN
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/ctu-vras/gazebo_custom_sensor_preloader.git
VCS Type git
VCS Version master
Last Updated 2023-08-29
Dev Status MAINTAINED
CI status Continuous Integration : 0 / 0
Released RELEASED
Tags No category tags.
Contributing Help Wanted (0)
Good First Issues (0)
Pull Requests to Review (0)

Package Description

Gazebo plugin that allows writing custom Gazebo sensors.

Additional Links

Maintainers

  • Martin Pecka

Authors

  • Martin Pecka

Implement custom Gazebo sensors at ease

The current structure of the Gazebo simulator doesn’t allow implementation of custom <sensor>s in the form of externally loaded plugins. To add a new sensor implementation, you officially need to fork Gazebo and add the sensor to its source code.

This doesn’t sound really great, does it?

This Gazebo system plugin allows you to write custom Gazebo sensors as ROS packages (so it depends on gazebo_ros, and adding them to Gazebo is then a matter of a few configuration lines in your sensor code. Theoretically, the mechanism this plugin uses could work completely without ROS, but hey, who uses Gazebo without ROS? :)

This plugin is only tested to work with Gazebo 9. If you successfully use it with a different version, please let me know in the issues.

Known custom sensors

Here’s a (noncomprehensive) list of known custom sensor implementations that work with this plugin. Feel free to open a pull request to add your own implementation here.

  • gazebo_rotating_lidar: A sensor for more realistic simulation of lidars based on a rotating mirror where each laser beam has a different timestamp.

How to do it

There is an example custom sensor in this package: ExampleCustomSensor.cpp, ExampleCustomSensor.h and example_custom_sensor.xml. The most important things will be described further in this document.

⚠ In this guide, we use the names ExampleCustomSensor and example_custom_sensor, which you have to change, because a custom sensor with this class/name is already built in this package.

Create a ROS/catkin package for your sensor

E.g. by calling

catkin_create_pkg ... example_custom_sensor ...

A pretty normal Sensor implementation …

ExampleCustomSensor.h

Here, it is important to note that your custom sensor has to reside inside the gazebo::sensors namespace.

#include <gazebo/sensors/Sensor.hh>

namespace gazebo
{
namespace sensors
{

class ExampleCustomSensor : public Sensor
{

// your code

}
}
}

ExampleCustomSensor.cpp

In the implementation file, you have to register your sensor via the following block of code. The first argument is the Gazebo sensor type, which is how you reference the custom sensor in SDF. It should also match the name attribute in XML plugin definition (prefixed with sensors/).

#include <gazebo/sensors/SensorFactory.hh>

using gazebo::sensors::Sensor;
using gazebo::sensors::SensorFactory;
extern "C"
{
GZ_REGISTER_STATIC_SENSOR("example_custom_sensor", ExampleCustomSensor)
}

// your sensor implementation

… a few configuration lines …

example_custom_sensor.xml

This is a configuration file you may know if you’ve ever used ROS pluginlib, e.g. when implementing a nodelet. The library path is relative to the devel space of your sensor’s workspace, and contains the name of the shared object containing the sensor, excluding the

File truncated at 100 lines see the full file

CHANGELOG

Changelog for package gazebo_custom_sensor_preloader

1.1.0 (2023-08-29)

  • Removed unnecessary pollution of gazebo plugin path.
  • Simplified specifying the plugin name on the command line, cleaned up build files.
  • Noetic compatibility.
  • Contributors: Martin Pecka

1.0.1 (2019-10-17)

  • Deferring the sensor registration so that they are registered after all the default ones.
  • Contributors: Martin Pecka

1.0.0 (2019-10-17)

  • Initial commit.
  • Contributors: Martin Pecka

Wiki Tutorials

This package does not provide any links to tutorials in it's rosindex metadata. You can check on the ROS Wiki Tutorials page for the package.

Package Dependencies

System Dependencies

Name
boost

Dependant Packages

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Recent questions tagged gazebo_custom_sensor_preloader at Robotics Stack Exchange

No version for distro iron showing noetic. Known supported distros are highlighted in the buttons above.
Package symbol

gazebo_custom_sensor_preloader package from gazebo_custom_sensor_preloader repo

gazebo_custom_sensor_preloader

ROS Distro
noetic

Package Summary

Tags No category tags.
Version 1.1.0
License BSD
Build type CATKIN
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/ctu-vras/gazebo_custom_sensor_preloader.git
VCS Type git
VCS Version master
Last Updated 2023-08-29
Dev Status MAINTAINED
CI status Continuous Integration : 0 / 0
Released RELEASED
Tags No category tags.
Contributing Help Wanted (0)
Good First Issues (0)
Pull Requests to Review (0)

Package Description

Gazebo plugin that allows writing custom Gazebo sensors.

Additional Links

Maintainers

  • Martin Pecka

Authors

  • Martin Pecka

Implement custom Gazebo sensors at ease

The current structure of the Gazebo simulator doesn’t allow implementation of custom <sensor>s in the form of externally loaded plugins. To add a new sensor implementation, you officially need to fork Gazebo and add the sensor to its source code.

This doesn’t sound really great, does it?

This Gazebo system plugin allows you to write custom Gazebo sensors as ROS packages (so it depends on gazebo_ros, and adding them to Gazebo is then a matter of a few configuration lines in your sensor code. Theoretically, the mechanism this plugin uses could work completely without ROS, but hey, who uses Gazebo without ROS? :)

This plugin is only tested to work with Gazebo 9. If you successfully use it with a different version, please let me know in the issues.

Known custom sensors

Here’s a (noncomprehensive) list of known custom sensor implementations that work with this plugin. Feel free to open a pull request to add your own implementation here.

  • gazebo_rotating_lidar: A sensor for more realistic simulation of lidars based on a rotating mirror where each laser beam has a different timestamp.

How to do it

There is an example custom sensor in this package: ExampleCustomSensor.cpp, ExampleCustomSensor.h and example_custom_sensor.xml. The most important things will be described further in this document.

⚠ In this guide, we use the names ExampleCustomSensor and example_custom_sensor, which you have to change, because a custom sensor with this class/name is already built in this package.

Create a ROS/catkin package for your sensor

E.g. by calling

catkin_create_pkg ... example_custom_sensor ...

A pretty normal Sensor implementation …

ExampleCustomSensor.h

Here, it is important to note that your custom sensor has to reside inside the gazebo::sensors namespace.

#include <gazebo/sensors/Sensor.hh>

namespace gazebo
{
namespace sensors
{

class ExampleCustomSensor : public Sensor
{

// your code

}
}
}

ExampleCustomSensor.cpp

In the implementation file, you have to register your sensor via the following block of code. The first argument is the Gazebo sensor type, which is how you reference the custom sensor in SDF. It should also match the name attribute in XML plugin definition (prefixed with sensors/).

#include <gazebo/sensors/SensorFactory.hh>

using gazebo::sensors::Sensor;
using gazebo::sensors::SensorFactory;
extern "C"
{
GZ_REGISTER_STATIC_SENSOR("example_custom_sensor", ExampleCustomSensor)
}

// your sensor implementation

… a few configuration lines …

example_custom_sensor.xml

This is a configuration file you may know if you’ve ever used ROS pluginlib, e.g. when implementing a nodelet. The library path is relative to the devel space of your sensor’s workspace, and contains the name of the shared object containing the sensor, excluding the

File truncated at 100 lines see the full file

CHANGELOG

Changelog for package gazebo_custom_sensor_preloader

1.1.0 (2023-08-29)

  • Removed unnecessary pollution of gazebo plugin path.
  • Simplified specifying the plugin name on the command line, cleaned up build files.
  • Noetic compatibility.
  • Contributors: Martin Pecka

1.0.1 (2019-10-17)

  • Deferring the sensor registration so that they are registered after all the default ones.
  • Contributors: Martin Pecka

1.0.0 (2019-10-17)

  • Initial commit.
  • Contributors: Martin Pecka

Wiki Tutorials

This package does not provide any links to tutorials in it's rosindex metadata. You can check on the ROS Wiki Tutorials page for the package.

Package Dependencies

System Dependencies

Name
boost

Dependant Packages

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Recent questions tagged gazebo_custom_sensor_preloader at Robotics Stack Exchange

No version for distro lunar showing noetic. Known supported distros are highlighted in the buttons above.
Package symbol

gazebo_custom_sensor_preloader package from gazebo_custom_sensor_preloader repo

gazebo_custom_sensor_preloader

ROS Distro
noetic

Package Summary

Tags No category tags.
Version 1.1.0
License BSD
Build type CATKIN
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/ctu-vras/gazebo_custom_sensor_preloader.git
VCS Type git
VCS Version master
Last Updated 2023-08-29
Dev Status MAINTAINED
CI status Continuous Integration : 0 / 0
Released RELEASED
Tags No category tags.
Contributing Help Wanted (0)
Good First Issues (0)
Pull Requests to Review (0)

Package Description

Gazebo plugin that allows writing custom Gazebo sensors.

Additional Links

Maintainers

  • Martin Pecka

Authors

  • Martin Pecka

Implement custom Gazebo sensors at ease

The current structure of the Gazebo simulator doesn’t allow implementation of custom <sensor>s in the form of externally loaded plugins. To add a new sensor implementation, you officially need to fork Gazebo and add the sensor to its source code.

This doesn’t sound really great, does it?

This Gazebo system plugin allows you to write custom Gazebo sensors as ROS packages (so it depends on gazebo_ros, and adding them to Gazebo is then a matter of a few configuration lines in your sensor code. Theoretically, the mechanism this plugin uses could work completely without ROS, but hey, who uses Gazebo without ROS? :)

This plugin is only tested to work with Gazebo 9. If you successfully use it with a different version, please let me know in the issues.

Known custom sensors

Here’s a (noncomprehensive) list of known custom sensor implementations that work with this plugin. Feel free to open a pull request to add your own implementation here.

  • gazebo_rotating_lidar: A sensor for more realistic simulation of lidars based on a rotating mirror where each laser beam has a different timestamp.

How to do it

There is an example custom sensor in this package: ExampleCustomSensor.cpp, ExampleCustomSensor.h and example_custom_sensor.xml. The most important things will be described further in this document.

⚠ In this guide, we use the names ExampleCustomSensor and example_custom_sensor, which you have to change, because a custom sensor with this class/name is already built in this package.

Create a ROS/catkin package for your sensor

E.g. by calling

catkin_create_pkg ... example_custom_sensor ...

A pretty normal Sensor implementation …

ExampleCustomSensor.h

Here, it is important to note that your custom sensor has to reside inside the gazebo::sensors namespace.

#include <gazebo/sensors/Sensor.hh>

namespace gazebo
{
namespace sensors
{

class ExampleCustomSensor : public Sensor
{

// your code

}
}
}

ExampleCustomSensor.cpp

In the implementation file, you have to register your sensor via the following block of code. The first argument is the Gazebo sensor type, which is how you reference the custom sensor in SDF. It should also match the name attribute in XML plugin definition (prefixed with sensors/).

#include <gazebo/sensors/SensorFactory.hh>

using gazebo::sensors::Sensor;
using gazebo::sensors::SensorFactory;
extern "C"
{
GZ_REGISTER_STATIC_SENSOR("example_custom_sensor", ExampleCustomSensor)
}

// your sensor implementation

… a few configuration lines …

example_custom_sensor.xml

This is a configuration file you may know if you’ve ever used ROS pluginlib, e.g. when implementing a nodelet. The library path is relative to the devel space of your sensor’s workspace, and contains the name of the shared object containing the sensor, excluding the

File truncated at 100 lines see the full file

CHANGELOG

Changelog for package gazebo_custom_sensor_preloader

1.1.0 (2023-08-29)

  • Removed unnecessary pollution of gazebo plugin path.
  • Simplified specifying the plugin name on the command line, cleaned up build files.
  • Noetic compatibility.
  • Contributors: Martin Pecka

1.0.1 (2019-10-17)

  • Deferring the sensor registration so that they are registered after all the default ones.
  • Contributors: Martin Pecka

1.0.0 (2019-10-17)

  • Initial commit.
  • Contributors: Martin Pecka

Wiki Tutorials

This package does not provide any links to tutorials in it's rosindex metadata. You can check on the ROS Wiki Tutorials page for the package.

Package Dependencies

System Dependencies

Name
boost

Dependant Packages

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Recent questions tagged gazebo_custom_sensor_preloader at Robotics Stack Exchange

No version for distro jade showing noetic. Known supported distros are highlighted in the buttons above.
Package symbol

gazebo_custom_sensor_preloader package from gazebo_custom_sensor_preloader repo

gazebo_custom_sensor_preloader

ROS Distro
noetic

Package Summary

Tags No category tags.
Version 1.1.0
License BSD
Build type CATKIN
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/ctu-vras/gazebo_custom_sensor_preloader.git
VCS Type git
VCS Version master
Last Updated 2023-08-29
Dev Status MAINTAINED
CI status Continuous Integration : 0 / 0
Released RELEASED
Tags No category tags.
Contributing Help Wanted (0)
Good First Issues (0)
Pull Requests to Review (0)

Package Description

Gazebo plugin that allows writing custom Gazebo sensors.

Additional Links

Maintainers

  • Martin Pecka

Authors

  • Martin Pecka

Implement custom Gazebo sensors at ease

The current structure of the Gazebo simulator doesn’t allow implementation of custom <sensor>s in the form of externally loaded plugins. To add a new sensor implementation, you officially need to fork Gazebo and add the sensor to its source code.

This doesn’t sound really great, does it?

This Gazebo system plugin allows you to write custom Gazebo sensors as ROS packages (so it depends on gazebo_ros, and adding them to Gazebo is then a matter of a few configuration lines in your sensor code. Theoretically, the mechanism this plugin uses could work completely without ROS, but hey, who uses Gazebo without ROS? :)

This plugin is only tested to work with Gazebo 9. If you successfully use it with a different version, please let me know in the issues.

Known custom sensors

Here’s a (noncomprehensive) list of known custom sensor implementations that work with this plugin. Feel free to open a pull request to add your own implementation here.

  • gazebo_rotating_lidar: A sensor for more realistic simulation of lidars based on a rotating mirror where each laser beam has a different timestamp.

How to do it

There is an example custom sensor in this package: ExampleCustomSensor.cpp, ExampleCustomSensor.h and example_custom_sensor.xml. The most important things will be described further in this document.

⚠ In this guide, we use the names ExampleCustomSensor and example_custom_sensor, which you have to change, because a custom sensor with this class/name is already built in this package.

Create a ROS/catkin package for your sensor

E.g. by calling

catkin_create_pkg ... example_custom_sensor ...

A pretty normal Sensor implementation …

ExampleCustomSensor.h

Here, it is important to note that your custom sensor has to reside inside the gazebo::sensors namespace.

#include <gazebo/sensors/Sensor.hh>

namespace gazebo
{
namespace sensors
{

class ExampleCustomSensor : public Sensor
{

// your code

}
}
}

ExampleCustomSensor.cpp

In the implementation file, you have to register your sensor via the following block of code. The first argument is the Gazebo sensor type, which is how you reference the custom sensor in SDF. It should also match the name attribute in XML plugin definition (prefixed with sensors/).

#include <gazebo/sensors/SensorFactory.hh>

using gazebo::sensors::Sensor;
using gazebo::sensors::SensorFactory;
extern "C"
{
GZ_REGISTER_STATIC_SENSOR("example_custom_sensor", ExampleCustomSensor)
}

// your sensor implementation

… a few configuration lines …

example_custom_sensor.xml

This is a configuration file you may know if you’ve ever used ROS pluginlib, e.g. when implementing a nodelet. The library path is relative to the devel space of your sensor’s workspace, and contains the name of the shared object containing the sensor, excluding the

File truncated at 100 lines see the full file

CHANGELOG

Changelog for package gazebo_custom_sensor_preloader

1.1.0 (2023-08-29)

  • Removed unnecessary pollution of gazebo plugin path.
  • Simplified specifying the plugin name on the command line, cleaned up build files.
  • Noetic compatibility.
  • Contributors: Martin Pecka

1.0.1 (2019-10-17)

  • Deferring the sensor registration so that they are registered after all the default ones.
  • Contributors: Martin Pecka

1.0.0 (2019-10-17)

  • Initial commit.
  • Contributors: Martin Pecka

Wiki Tutorials

This package does not provide any links to tutorials in it's rosindex metadata. You can check on the ROS Wiki Tutorials page for the package.

Package Dependencies

System Dependencies

Name
boost

Dependant Packages

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Recent questions tagged gazebo_custom_sensor_preloader at Robotics Stack Exchange

No version for distro indigo showing noetic. Known supported distros are highlighted in the buttons above.
Package symbol

gazebo_custom_sensor_preloader package from gazebo_custom_sensor_preloader repo

gazebo_custom_sensor_preloader

ROS Distro
noetic

Package Summary

Tags No category tags.
Version 1.1.0
License BSD
Build type CATKIN
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/ctu-vras/gazebo_custom_sensor_preloader.git
VCS Type git
VCS Version master
Last Updated 2023-08-29
Dev Status MAINTAINED
CI status Continuous Integration : 0 / 0
Released RELEASED
Tags No category tags.
Contributing Help Wanted (0)
Good First Issues (0)
Pull Requests to Review (0)

Package Description

Gazebo plugin that allows writing custom Gazebo sensors.

Additional Links

Maintainers

  • Martin Pecka

Authors

  • Martin Pecka

Implement custom Gazebo sensors at ease

The current structure of the Gazebo simulator doesn’t allow implementation of custom <sensor>s in the form of externally loaded plugins. To add a new sensor implementation, you officially need to fork Gazebo and add the sensor to its source code.

This doesn’t sound really great, does it?

This Gazebo system plugin allows you to write custom Gazebo sensors as ROS packages (so it depends on gazebo_ros, and adding them to Gazebo is then a matter of a few configuration lines in your sensor code. Theoretically, the mechanism this plugin uses could work completely without ROS, but hey, who uses Gazebo without ROS? :)

This plugin is only tested to work with Gazebo 9. If you successfully use it with a different version, please let me know in the issues.

Known custom sensors

Here’s a (noncomprehensive) list of known custom sensor implementations that work with this plugin. Feel free to open a pull request to add your own implementation here.

  • gazebo_rotating_lidar: A sensor for more realistic simulation of lidars based on a rotating mirror where each laser beam has a different timestamp.

How to do it

There is an example custom sensor in this package: ExampleCustomSensor.cpp, ExampleCustomSensor.h and example_custom_sensor.xml. The most important things will be described further in this document.

⚠ In this guide, we use the names ExampleCustomSensor and example_custom_sensor, which you have to change, because a custom sensor with this class/name is already built in this package.

Create a ROS/catkin package for your sensor

E.g. by calling

catkin_create_pkg ... example_custom_sensor ...

A pretty normal Sensor implementation …

ExampleCustomSensor.h

Here, it is important to note that your custom sensor has to reside inside the gazebo::sensors namespace.

#include <gazebo/sensors/Sensor.hh>

namespace gazebo
{
namespace sensors
{

class ExampleCustomSensor : public Sensor
{

// your code

}
}
}

ExampleCustomSensor.cpp

In the implementation file, you have to register your sensor via the following block of code. The first argument is the Gazebo sensor type, which is how you reference the custom sensor in SDF. It should also match the name attribute in XML plugin definition (prefixed with sensors/).

#include <gazebo/sensors/SensorFactory.hh>

using gazebo::sensors::Sensor;
using gazebo::sensors::SensorFactory;
extern "C"
{
GZ_REGISTER_STATIC_SENSOR("example_custom_sensor", ExampleCustomSensor)
}

// your sensor implementation

… a few configuration lines …

example_custom_sensor.xml

This is a configuration file you may know if you’ve ever used ROS pluginlib, e.g. when implementing a nodelet. The library path is relative to the devel space of your sensor’s workspace, and contains the name of the shared object containing the sensor, excluding the

File truncated at 100 lines see the full file

CHANGELOG

Changelog for package gazebo_custom_sensor_preloader

1.1.0 (2023-08-29)

  • Removed unnecessary pollution of gazebo plugin path.
  • Simplified specifying the plugin name on the command line, cleaned up build files.
  • Noetic compatibility.
  • Contributors: Martin Pecka

1.0.1 (2019-10-17)

  • Deferring the sensor registration so that they are registered after all the default ones.
  • Contributors: Martin Pecka

1.0.0 (2019-10-17)

  • Initial commit.
  • Contributors: Martin Pecka

Wiki Tutorials

This package does not provide any links to tutorials in it's rosindex metadata. You can check on the ROS Wiki Tutorials page for the package.

Package Dependencies

System Dependencies

Name
boost

Dependant Packages

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Recent questions tagged gazebo_custom_sensor_preloader at Robotics Stack Exchange

No version for distro hydro showing noetic. Known supported distros are highlighted in the buttons above.
Package symbol

gazebo_custom_sensor_preloader package from gazebo_custom_sensor_preloader repo

gazebo_custom_sensor_preloader

ROS Distro
noetic

Package Summary

Tags No category tags.
Version 1.1.0
License BSD
Build type CATKIN
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/ctu-vras/gazebo_custom_sensor_preloader.git
VCS Type git
VCS Version master
Last Updated 2023-08-29
Dev Status MAINTAINED
CI status Continuous Integration : 0 / 0
Released RELEASED
Tags No category tags.
Contributing Help Wanted (0)
Good First Issues (0)
Pull Requests to Review (0)

Package Description

Gazebo plugin that allows writing custom Gazebo sensors.

Additional Links

Maintainers

  • Martin Pecka

Authors

  • Martin Pecka

Implement custom Gazebo sensors at ease

The current structure of the Gazebo simulator doesn’t allow implementation of custom <sensor>s in the form of externally loaded plugins. To add a new sensor implementation, you officially need to fork Gazebo and add the sensor to its source code.

This doesn’t sound really great, does it?

This Gazebo system plugin allows you to write custom Gazebo sensors as ROS packages (so it depends on gazebo_ros, and adding them to Gazebo is then a matter of a few configuration lines in your sensor code. Theoretically, the mechanism this plugin uses could work completely without ROS, but hey, who uses Gazebo without ROS? :)

This plugin is only tested to work with Gazebo 9. If you successfully use it with a different version, please let me know in the issues.

Known custom sensors

Here’s a (noncomprehensive) list of known custom sensor implementations that work with this plugin. Feel free to open a pull request to add your own implementation here.

  • gazebo_rotating_lidar: A sensor for more realistic simulation of lidars based on a rotating mirror where each laser beam has a different timestamp.

How to do it

There is an example custom sensor in this package: ExampleCustomSensor.cpp, ExampleCustomSensor.h and example_custom_sensor.xml. The most important things will be described further in this document.

⚠ In this guide, we use the names ExampleCustomSensor and example_custom_sensor, which you have to change, because a custom sensor with this class/name is already built in this package.

Create a ROS/catkin package for your sensor

E.g. by calling

catkin_create_pkg ... example_custom_sensor ...

A pretty normal Sensor implementation …

ExampleCustomSensor.h

Here, it is important to note that your custom sensor has to reside inside the gazebo::sensors namespace.

#include <gazebo/sensors/Sensor.hh>

namespace gazebo
{
namespace sensors
{

class ExampleCustomSensor : public Sensor
{

// your code

}
}
}

ExampleCustomSensor.cpp

In the implementation file, you have to register your sensor via the following block of code. The first argument is the Gazebo sensor type, which is how you reference the custom sensor in SDF. It should also match the name attribute in XML plugin definition (prefixed with sensors/).

#include <gazebo/sensors/SensorFactory.hh>

using gazebo::sensors::Sensor;
using gazebo::sensors::SensorFactory;
extern "C"
{
GZ_REGISTER_STATIC_SENSOR("example_custom_sensor", ExampleCustomSensor)
}

// your sensor implementation

… a few configuration lines …

example_custom_sensor.xml

This is a configuration file you may know if you’ve ever used ROS pluginlib, e.g. when implementing a nodelet. The library path is relative to the devel space of your sensor’s workspace, and contains the name of the shared object containing the sensor, excluding the

File truncated at 100 lines see the full file

CHANGELOG

Changelog for package gazebo_custom_sensor_preloader

1.1.0 (2023-08-29)

  • Removed unnecessary pollution of gazebo plugin path.
  • Simplified specifying the plugin name on the command line, cleaned up build files.
  • Noetic compatibility.
  • Contributors: Martin Pecka

1.0.1 (2019-10-17)

  • Deferring the sensor registration so that they are registered after all the default ones.
  • Contributors: Martin Pecka

1.0.0 (2019-10-17)

  • Initial commit.
  • Contributors: Martin Pecka

Wiki Tutorials

This package does not provide any links to tutorials in it's rosindex metadata. You can check on the ROS Wiki Tutorials page for the package.

Package Dependencies

System Dependencies

Name
boost

Dependant Packages

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Recent questions tagged gazebo_custom_sensor_preloader at Robotics Stack Exchange

No version for distro kinetic showing noetic. Known supported distros are highlighted in the buttons above.
Package symbol

gazebo_custom_sensor_preloader package from gazebo_custom_sensor_preloader repo

gazebo_custom_sensor_preloader

ROS Distro
noetic

Package Summary

Tags No category tags.
Version 1.1.0
License BSD
Build type CATKIN
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/ctu-vras/gazebo_custom_sensor_preloader.git
VCS Type git
VCS Version master
Last Updated 2023-08-29
Dev Status MAINTAINED
CI status Continuous Integration : 0 / 0
Released RELEASED
Tags No category tags.
Contributing Help Wanted (0)
Good First Issues (0)
Pull Requests to Review (0)

Package Description

Gazebo plugin that allows writing custom Gazebo sensors.

Additional Links

Maintainers

  • Martin Pecka

Authors

  • Martin Pecka

Implement custom Gazebo sensors at ease

The current structure of the Gazebo simulator doesn’t allow implementation of custom <sensor>s in the form of externally loaded plugins. To add a new sensor implementation, you officially need to fork Gazebo and add the sensor to its source code.

This doesn’t sound really great, does it?

This Gazebo system plugin allows you to write custom Gazebo sensors as ROS packages (so it depends on gazebo_ros, and adding them to Gazebo is then a matter of a few configuration lines in your sensor code. Theoretically, the mechanism this plugin uses could work completely without ROS, but hey, who uses Gazebo without ROS? :)

This plugin is only tested to work with Gazebo 9. If you successfully use it with a different version, please let me know in the issues.

Known custom sensors

Here’s a (noncomprehensive) list of known custom sensor implementations that work with this plugin. Feel free to open a pull request to add your own implementation here.

  • gazebo_rotating_lidar: A sensor for more realistic simulation of lidars based on a rotating mirror where each laser beam has a different timestamp.

How to do it

There is an example custom sensor in this package: ExampleCustomSensor.cpp, ExampleCustomSensor.h and example_custom_sensor.xml. The most important things will be described further in this document.

⚠ In this guide, we use the names ExampleCustomSensor and example_custom_sensor, which you have to change, because a custom sensor with this class/name is already built in this package.

Create a ROS/catkin package for your sensor

E.g. by calling

catkin_create_pkg ... example_custom_sensor ...

A pretty normal Sensor implementation …

ExampleCustomSensor.h

Here, it is important to note that your custom sensor has to reside inside the gazebo::sensors namespace.

#include <gazebo/sensors/Sensor.hh>

namespace gazebo
{
namespace sensors
{

class ExampleCustomSensor : public Sensor
{

// your code

}
}
}

ExampleCustomSensor.cpp

In the implementation file, you have to register your sensor via the following block of code. The first argument is the Gazebo sensor type, which is how you reference the custom sensor in SDF. It should also match the name attribute in XML plugin definition (prefixed with sensors/).

#include <gazebo/sensors/SensorFactory.hh>

using gazebo::sensors::Sensor;
using gazebo::sensors::SensorFactory;
extern "C"
{
GZ_REGISTER_STATIC_SENSOR("example_custom_sensor", ExampleCustomSensor)
}

// your sensor implementation

… a few configuration lines …

example_custom_sensor.xml

This is a configuration file you may know if you’ve ever used ROS pluginlib, e.g. when implementing a nodelet. The library path is relative to the devel space of your sensor’s workspace, and contains the name of the shared object containing the sensor, excluding the

File truncated at 100 lines see the full file

CHANGELOG

Changelog for package gazebo_custom_sensor_preloader

1.1.0 (2023-08-29)

  • Removed unnecessary pollution of gazebo plugin path.
  • Simplified specifying the plugin name on the command line, cleaned up build files.
  • Noetic compatibility.
  • Contributors: Martin Pecka

1.0.1 (2019-10-17)

  • Deferring the sensor registration so that they are registered after all the default ones.
  • Contributors: Martin Pecka

1.0.0 (2019-10-17)

  • Initial commit.
  • Contributors: Martin Pecka

Wiki Tutorials

This package does not provide any links to tutorials in it's rosindex metadata. You can check on the ROS Wiki Tutorials page for the package.

Package Dependencies

System Dependencies

Name
boost

Dependant Packages

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Recent questions tagged gazebo_custom_sensor_preloader at Robotics Stack Exchange

No version for distro melodic showing noetic. Known supported distros are highlighted in the buttons above.
Package symbol

gazebo_custom_sensor_preloader package from gazebo_custom_sensor_preloader repo

gazebo_custom_sensor_preloader

ROS Distro
noetic

Package Summary

Tags No category tags.
Version 1.1.0
License BSD
Build type CATKIN
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/ctu-vras/gazebo_custom_sensor_preloader.git
VCS Type git
VCS Version master
Last Updated 2023-08-29
Dev Status MAINTAINED
CI status Continuous Integration : 0 / 0
Released RELEASED
Tags No category tags.
Contributing Help Wanted (0)
Good First Issues (0)
Pull Requests to Review (0)

Package Description

Gazebo plugin that allows writing custom Gazebo sensors.

Additional Links

Maintainers

  • Martin Pecka

Authors

  • Martin Pecka

Implement custom Gazebo sensors at ease

The current structure of the Gazebo simulator doesn’t allow implementation of custom <sensor>s in the form of externally loaded plugins. To add a new sensor implementation, you officially need to fork Gazebo and add the sensor to its source code.

This doesn’t sound really great, does it?

This Gazebo system plugin allows you to write custom Gazebo sensors as ROS packages (so it depends on gazebo_ros, and adding them to Gazebo is then a matter of a few configuration lines in your sensor code. Theoretically, the mechanism this plugin uses could work completely without ROS, but hey, who uses Gazebo without ROS? :)

This plugin is only tested to work with Gazebo 9. If you successfully use it with a different version, please let me know in the issues.

Known custom sensors

Here’s a (noncomprehensive) list of known custom sensor implementations that work with this plugin. Feel free to open a pull request to add your own implementation here.

  • gazebo_rotating_lidar: A sensor for more realistic simulation of lidars based on a rotating mirror where each laser beam has a different timestamp.

How to do it

There is an example custom sensor in this package: ExampleCustomSensor.cpp, ExampleCustomSensor.h and example_custom_sensor.xml. The most important things will be described further in this document.

⚠ In this guide, we use the names ExampleCustomSensor and example_custom_sensor, which you have to change, because a custom sensor with this class/name is already built in this package.

Create a ROS/catkin package for your sensor

E.g. by calling

catkin_create_pkg ... example_custom_sensor ...

A pretty normal Sensor implementation …

ExampleCustomSensor.h

Here, it is important to note that your custom sensor has to reside inside the gazebo::sensors namespace.

#include <gazebo/sensors/Sensor.hh>

namespace gazebo
{
namespace sensors
{

class ExampleCustomSensor : public Sensor
{

// your code

}
}
}

ExampleCustomSensor.cpp

In the implementation file, you have to register your sensor via the following block of code. The first argument is the Gazebo sensor type, which is how you reference the custom sensor in SDF. It should also match the name attribute in XML plugin definition (prefixed with sensors/).

#include <gazebo/sensors/SensorFactory.hh>

using gazebo::sensors::Sensor;
using gazebo::sensors::SensorFactory;
extern "C"
{
GZ_REGISTER_STATIC_SENSOR("example_custom_sensor", ExampleCustomSensor)
}

// your sensor implementation

… a few configuration lines …

example_custom_sensor.xml

This is a configuration file you may know if you’ve ever used ROS pluginlib, e.g. when implementing a nodelet. The library path is relative to the devel space of your sensor’s workspace, and contains the name of the shared object containing the sensor, excluding the

File truncated at 100 lines see the full file

CHANGELOG

Changelog for package gazebo_custom_sensor_preloader

1.1.0 (2023-08-29)

  • Removed unnecessary pollution of gazebo plugin path.
  • Simplified specifying the plugin name on the command line, cleaned up build files.
  • Noetic compatibility.
  • Contributors: Martin Pecka

1.0.1 (2019-10-17)

  • Deferring the sensor registration so that they are registered after all the default ones.
  • Contributors: Martin Pecka

1.0.0 (2019-10-17)

  • Initial commit.
  • Contributors: Martin Pecka

Wiki Tutorials

This package does not provide any links to tutorials in it's rosindex metadata. You can check on the ROS Wiki Tutorials page for the package.

Package Dependencies

System Dependencies

Name
boost

Dependant Packages

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Recent questions tagged gazebo_custom_sensor_preloader at Robotics Stack Exchange

Package symbol

gazebo_custom_sensor_preloader package from gazebo_custom_sensor_preloader repo

gazebo_custom_sensor_preloader

ROS Distro
noetic

Package Summary

Tags No category tags.
Version 1.1.0
License BSD
Build type CATKIN
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/ctu-vras/gazebo_custom_sensor_preloader.git
VCS Type git
VCS Version master
Last Updated 2023-08-29
Dev Status MAINTAINED
CI status Continuous Integration : 0 / 0
Released RELEASED
Tags No category tags.
Contributing Help Wanted (0)
Good First Issues (0)
Pull Requests to Review (0)

Package Description

Gazebo plugin that allows writing custom Gazebo sensors.

Additional Links

Maintainers

  • Martin Pecka

Authors

  • Martin Pecka

Implement custom Gazebo sensors at ease

The current structure of the Gazebo simulator doesn’t allow implementation of custom <sensor>s in the form of externally loaded plugins. To add a new sensor implementation, you officially need to fork Gazebo and add the sensor to its source code.

This doesn’t sound really great, does it?

This Gazebo system plugin allows you to write custom Gazebo sensors as ROS packages (so it depends on gazebo_ros, and adding them to Gazebo is then a matter of a few configuration lines in your sensor code. Theoretically, the mechanism this plugin uses could work completely without ROS, but hey, who uses Gazebo without ROS? :)

This plugin is only tested to work with Gazebo 9. If you successfully use it with a different version, please let me know in the issues.

Known custom sensors

Here’s a (noncomprehensive) list of known custom sensor implementations that work with this plugin. Feel free to open a pull request to add your own implementation here.

  • gazebo_rotating_lidar: A sensor for more realistic simulation of lidars based on a rotating mirror where each laser beam has a different timestamp.

How to do it

There is an example custom sensor in this package: ExampleCustomSensor.cpp, ExampleCustomSensor.h and example_custom_sensor.xml. The most important things will be described further in this document.

⚠ In this guide, we use the names ExampleCustomSensor and example_custom_sensor, which you have to change, because a custom sensor with this class/name is already built in this package.

Create a ROS/catkin package for your sensor

E.g. by calling

catkin_create_pkg ... example_custom_sensor ...

A pretty normal Sensor implementation …

ExampleCustomSensor.h

Here, it is important to note that your custom sensor has to reside inside the gazebo::sensors namespace.

#include <gazebo/sensors/Sensor.hh>

namespace gazebo
{
namespace sensors
{

class ExampleCustomSensor : public Sensor
{

// your code

}
}
}

ExampleCustomSensor.cpp

In the implementation file, you have to register your sensor via the following block of code. The first argument is the Gazebo sensor type, which is how you reference the custom sensor in SDF. It should also match the name attribute in XML plugin definition (prefixed with sensors/).

#include <gazebo/sensors/SensorFactory.hh>

using gazebo::sensors::Sensor;
using gazebo::sensors::SensorFactory;
extern "C"
{
GZ_REGISTER_STATIC_SENSOR("example_custom_sensor", ExampleCustomSensor)
}

// your sensor implementation

… a few configuration lines …

example_custom_sensor.xml

This is a configuration file you may know if you’ve ever used ROS pluginlib, e.g. when implementing a nodelet. The library path is relative to the devel space of your sensor’s workspace, and contains the name of the shared object containing the sensor, excluding the

File truncated at 100 lines see the full file

CHANGELOG

Changelog for package gazebo_custom_sensor_preloader

1.1.0 (2023-08-29)

  • Removed unnecessary pollution of gazebo plugin path.
  • Simplified specifying the plugin name on the command line, cleaned up build files.
  • Noetic compatibility.
  • Contributors: Martin Pecka

1.0.1 (2019-10-17)

  • Deferring the sensor registration so that they are registered after all the default ones.
  • Contributors: Martin Pecka

1.0.0 (2019-10-17)

  • Initial commit.
  • Contributors: Martin Pecka

Wiki Tutorials

This package does not provide any links to tutorials in it's rosindex metadata. You can check on the ROS Wiki Tutorials page for the package.

Package Dependencies

System Dependencies

Name
boost

Dependant Packages

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Recent questions tagged gazebo_custom_sensor_preloader at Robotics Stack Exchange