Corrected information that Sensor.is_listening is a method (#7439)

Co-authored-by: Blyron <53337103+Blyron@users.noreply.github.com>
This commit is contained in:
Daraan 2024-05-31 12:04:04 +02:00 committed by GitHub
parent 6aed213f36
commit d5c37f71b7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 9 additions and 9 deletions

View File

@ -14,6 +14,7 @@
* Added possibility to change gravity variable in imui sensor for the accelerometer * Added possibility to change gravity variable in imui sensor for the accelerometer
* Fixed ROS2 native extension build error when ROS2 is installed in the system. * Fixed ROS2 native extension build error when ROS2 is installed in the system.
* ROS2Native: Force fast-dds dependencies download to avoid build crash when boost_asio and tinyxml2 are not installed in Linux. * ROS2Native: Force fast-dds dependencies download to avoid build crash when boost_asio and tinyxml2 are not installed in Linux.
* PythonAPI `Sensor.is_listening` was defined twice (property and method), cleaned and clarified it as a method.
* Added V2X sensors for cooperative awareness message and custom user-defined messages to support vehicle-to-vehicle communication * Added V2X sensors for cooperative awareness message and custom user-defined messages to support vehicle-to-vehicle communication
## CARLA 0.9.15 ## CARLA 0.9.15

View File

@ -96,7 +96,8 @@ Sensor data differs a lot between sensor types. Take a look at the [sensors refe
!!! Important !!! Important
`is_listening` is a __sensor attribute__ that enables/disables data listening at will. `is_listening()` is a __sensor method__ to check whether the sensor has a callback registered by `listen`.
`stop()` is a __sensor method__ to stop the sensor from listening.
`sensor_tick` is a __blueprint attribute__ that sets the simulation time between data received. `sensor_tick` is a __blueprint attribute__ that sets the simulation time between data received.
--- ---

View File

@ -26,7 +26,6 @@ void export_sensor() {
namespace cc = carla::client; namespace cc = carla::client;
class_<cc::Sensor, bases<cc::Actor>, boost::noncopyable, boost::shared_ptr<cc::Sensor>>("Sensor", no_init) class_<cc::Sensor, bases<cc::Actor>, boost::noncopyable, boost::shared_ptr<cc::Sensor>>("Sensor", no_init)
.add_property("is_listening", &cc::Sensor::IsListening)
.def("listen", &SubscribeToStream, (arg("callback"))) .def("listen", &SubscribeToStream, (arg("callback")))
.def("is_listening", &cc::Sensor::IsListening) .def("is_listening", &cc::Sensor::IsListening)
.def("stop", &cc::Sensor::Stop) .def("stop", &cc::Sensor::Stop)

View File

@ -23,13 +23,6 @@
- [Collision detector](ref_sensors.md#collision-detector). - [Collision detector](ref_sensors.md#collision-detector).
- [Lane invasion detector](ref_sensors.md#lane-invasion-detector). - [Lane invasion detector](ref_sensors.md#lane-invasion-detector).
- [Obstacle detector](ref_sensors.md#obstacle-detector). - [Obstacle detector](ref_sensors.md#obstacle-detector).
# - PROPERTIES -------------------------
instance_variables:
- var_name: is_listening
type: boolean
doc: >
When <b>True</b> the sensor will be waiting for data.
# - METHODS ---------------------------- # - METHODS ----------------------------
methods: methods:
- def_name: listen - def_name: listen
@ -44,6 +37,8 @@
- def_name: is_listening - def_name: is_listening
doc: > doc: >
Returns whether the sensor is in a listening state. Returns whether the sensor is in a listening state.
return:
bool
# -------------------------------------- # --------------------------------------
- def_name: stop - def_name: stop
doc: > doc: >
@ -60,6 +55,8 @@
- def_name: is_enabled_for_ros - def_name: is_enabled_for_ros
doc: > doc: >
Returns if the sensor is enabled or not to publish in ROS2 if there is no any listen to it. Returns if the sensor is enabled or not to publish in ROS2 if there is no any listen to it.
return:
bool
# -------------------------------------- # --------------------------------------
- def_name: listen_to_gbuffer - def_name: listen_to_gbuffer
params: params:
@ -83,6 +80,8 @@
The ID of the target Unreal Engine GBuffer texture. The ID of the target Unreal Engine GBuffer texture.
doc: > doc: >
Returns whether the sensor is in a listening state for a specific GBuffer texture. Returns whether the sensor is in a listening state for a specific GBuffer texture.
return:
bool
# -------------------------------------- # --------------------------------------
- def_name: stop_gbuffer - def_name: stop_gbuffer
params: params: