Compare commits
73 Commits
71fff46b63
...
d9e10a9456
Author | SHA1 | Date |
---|---|---|
Daraan | d9e10a9456 | |
Daraan | 5ab4425403 | |
MattRoweEAIF | 2a2cc5f1be | |
Daraan | 0a095b948d | |
MattRoweEAIF | f7ed6c25e9 | |
Blyron | 4feeb77b2b | |
Daniel | dad5f5dc7b | |
Daniel | 944d0e225e | |
Daniel | cdb2664350 | |
Daniel | e9d9a1cd36 | |
Daniel | 9bb1e52581 | |
Daniel | dee22b138d | |
Daniel | a74476e9eb | |
Daniel | fd8d6122dd | |
Daniel | fa0b470a78 | |
Daniel | b5b1168892 | |
Daniel | db2697108a | |
Ylmdrin | 92a6e71c6b | |
Sergio Paniego Blanco | c7339367b9 | |
Jorge Virgos | 4d09f0a660 | |
AreopagX | 9e94feb3a5 | |
Blyron | 00df447670 | |
MattRoweEAIF | c097d7acf1 | |
Daniel | 334740ae53 | |
Daniel | 7633334063 | |
Daniel | 2b465bcd66 | |
Daniel | aec0b261af | |
Daniel | 58e0374f4f | |
Daniel | 26dc386724 | |
Daniel | 798c9e144c | |
Daniel | 77856f467c | |
Daniel | ca81e35d59 | |
Daniel | da80757e27 | |
Daniel | 453ceca112 | |
Daniel | a959577ccf | |
Daniel | b061f9e951 | |
Daniel | f797e1593a | |
Daniel | 41e595c056 | |
Daniel | d9c217ee3c | |
Daniel | a089c3b800 | |
Daniel | 19b892f76b | |
Daniel | 8df99c0414 | |
Daniel | 2935897950 | |
Daniel | ddb5834e38 | |
Daniel | e765559384 | |
Daniel | df1eb25721 | |
Daniel | caac503fdb | |
Daniel | 4c086ad7d9 | |
Daniel | 1d4450b026 | |
Daniel | 0197e0ae5b | |
Daniel | de33210abd | |
Daniel | a0cff71434 | |
Daniel | 232cb8c250 | |
Daniel | 755c0d827d | |
Daniel | 4c1104dc47 | |
Daniel | f275e47f4e | |
Daniel | 7b2c1db39b | |
Daniel | 251b293d61 | |
Daniel | bc6e7cd5ea | |
Daraan | be8735fc28 | |
Daniel | 951fcc4cc9 | |
Minokori | fd44ea0ca1 | |
Blyron | e83b79be74 | |
Blyron | 32f97eae66 | |
Blyron | c83c045ada | |
Blyron | 7c47e7db37 | |
Blyron | 17963902e5 | |
Blyron | 5043ad73fc | |
Blyron | b86b1997fc | |
Blyron | 2a507990d3 | |
Blyron | d854ab5f89 | |
Blyron | 649e2aa56b | |
Blyron | 5be0e2fd17 |
|
@ -1,4 +1,5 @@
|
|||
## Latest Changes
|
||||
* Fixed a bug that caused navigation information not to be loaded when switching maps
|
||||
* Prevent from segfault on failing SignalReference identification when loading OpenDrive files
|
||||
* Added vehicle doors to the recorder
|
||||
* Added functions to get actor' components transform
|
||||
|
@ -18,6 +19,7 @@
|
|||
* 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 named tuples for BasicAgent.py's detection result to allow for type-hints and better semantics.
|
||||
* Added type-hint support for the PythonAPI
|
||||
|
||||
|
||||
## CARLA 0.9.15
|
||||
|
|
|
@ -15,6 +15,8 @@
|
|||
|
||||
The __Digital Twin Tool__ enables procedural generation of unique 3D environments based on road networks derived from the [OpenStreetMap](https://www.openstreetmap.org) (OSM) service. Through the Digital Twin Tool interface in CARLA's Unreal Engine editor a user can select a region of map from OSM and download the road network as the basis for a new CARLA map. The tool then fills the spaces between the roads with procedurally generated 3D buildings that adjust to the layout of the road, creating a realistic 3D road environment with high variability.
|
||||
|
||||
<iframe width="100%" height="400px" src="https://www.youtube.com/embed/gTutXdS2UkQ?si=hssM3YRCAjSIzdXM" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>
|
||||
|
||||
## Building the OSM renderer
|
||||
|
||||
If you are using Linux, you have the option of using the OSM renderer in the CARLA interface to navigate a large OSM map region that you have downloaded. You first need to build the OSM renderer before proceeding to build CARLA. Run `make osmrenderer` inside the CARLA root directory. You may need to upgrade your version of CMake to v3.2 or above in order for this to work. This will create two folders in your build directory called `libosmcout-source` and `libosmcout-build`. Before proceeding to build CARLA, you need to then edit the `Build.sh` file in the directory `$CARLA_ROOT/Build/libosmcout-source/maps` like so, to ensure the executable is found:
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 38 KiB |
|
@ -505,15 +505,16 @@ Client constructor.
|
|||
- `host` (_str_) - IP address where a CARLA Simulator instance is running. Default is localhost (127.0.0.1).
|
||||
- `port` (_int_) - TCP port where the CARLA Simulator instance is running. Default are 2000 and the subsequent 2001.
|
||||
- `worker_threads` (_int_) - Number of working threads used for background updates. If 0, use all available concurrency.
|
||||
- <a name="carla.Client.apply_batch"></a>**<font color="#7fb800">apply_batch</font>**(<font color="#00a6ed">**self**</font>, <font color="#00a6ed">**commands**</font>)
|
||||
- <a name="carla.Client.apply_batch"></a>**<font color="#7fb800">apply_batch</font>**(<font color="#00a6ed">**self**</font>, <font color="#00a6ed">**commands**</font>, <font color="#00a6ed">**do_tick**=False</font>)
|
||||
Executes a list of commands on a single simulation step and retrieves no information. If you need information about the response of each command, use the __<font color="#7fb800">apply_batch_sync()</font>__ method. [Here](https://github.com/carla-simulator/carla/blob/master/PythonAPI/examples/generate_traffic.py) is an example on how to delete the actors that appear in [carla.ActorList](#carla.ActorList) all at once.
|
||||
- **Parameters:**
|
||||
- `commands` (_list_) - A list of commands to execute in batch. Each command is different and has its own parameters. They appear listed at the bottom of this page.
|
||||
- <a name="carla.Client.apply_batch_sync"></a>**<font color="#7fb800">apply_batch_sync</font>**(<font color="#00a6ed">**self**</font>, <font color="#00a6ed">**commands**</font>, <font color="#00a6ed">**due_tick_cue**=False</font>)<button class="SnipetButton" id="carla.Client.apply_batch_sync-snipet_button">snippet →</button>
|
||||
- `do_tick` (_bool_) - A boolean parameter to specify whether or not to perform a [carla.World.tick](#carla.World.tick) after applying the batch in _synchronous mode_. Defaults to __False__.
|
||||
- <a name="carla.Client.apply_batch_sync"></a>**<font color="#7fb800">apply_batch_sync</font>**(<font color="#00a6ed">**self**</font>, <font color="#00a6ed">**commands**</font>, <font color="#00a6ed">**do_tick**=False</font>)<button class="SnipetButton" id="carla.Client.apply_batch_sync-snipet_button">snippet →</button>
|
||||
Executes a list of commands on a single simulation step, blocks until the commands are linked, and returns a list of <b>command.Response</b> that can be used to determine whether a single command succeeded or not. [Here](https://github.com/carla-simulator/carla/blob/master/PythonAPI/examples/generate_traffic.py) is an example of it being used to spawn actors.
|
||||
- **Parameters:**
|
||||
- `commands` (_list_) - A list of commands to execute in batch. The commands available are listed right above, in the method **<font color="#7fb800">apply_batch()</font>**.
|
||||
- `due_tick_cue` (_bool_) - A boolean parameter to specify whether or not to perform a [carla.World.tick](#carla.World.tick) after applying the batch in _synchronous mode_. It is __False__ by default.
|
||||
- `do_tick` (_bool_) - A boolean parameter to specify whether or not to perform a [carla.World.tick](#carla.World.tick) after applying the batch in _synchronous mode_. Defaults to __False__.
|
||||
- **Return:** _list(command.Response)_
|
||||
- <a name="carla.Client.generate_opendrive_world"></a>**<font color="#7fb800">generate_opendrive_world</font>**(<font color="#00a6ed">**self**</font>, <font color="#00a6ed">**opendrive**</font>, <font color="#00a6ed">**parameters**=(2.0, 50.0, 1.0, 0.6, true, true)</font>, <font color="#00a6ed">**reset_settings**=True</font>)
|
||||
Loads a new world with a basic 3D topology generated from the content of an OpenDRIVE file. This content is passed as a `string` parameter. It is similar to `client.load_world(map_name)` but allows for custom OpenDRIVE maps in server side. Cars can drive around the map, but there are no graphics besides the road and sidewalks.
|
||||
|
@ -2011,7 +2012,7 @@ Iterate over the [carla.RadarDetection](#carla.RadarDetection) retrieved as data
|
|||
|
||||
## carla.Rotation<a name="carla.Rotation"></a>
|
||||
Class that represents a 3D rotation and therefore, an orientation in space. CARLA uses the Unreal Engine coordinates system. This is a Z-up left-handed system. <br>
|
||||
<br>The constructor method follows a specific order of declaration: `(pitch, yaw, roll)`, which corresponds to `(Y-rotation,Z-rotation,X-rotation)`. <br> <br>![UE4_Rotation](https://d26ilriwvtzlb.cloudfront.net/8/83/BRMC_9.jpg) *Unreal Engine's coordinates system*.
|
||||
<br>The constructor method follows a specific order of declaration: `(pitch, yaw, roll)`, which corresponds to `(Y-rotation,Z-rotation,X-rotation)`. <br> <br>![UE4_Rotation](/img/unreal_lhcs.png) *Unreal Engine's coordinates system*.
|
||||
|
||||
### Instance Variables
|
||||
- <a name="carla.Rotation.pitch"></a>**<font color="#f8805a">pitch</font>** (_float<small> - degrees</small>_)
|
||||
|
@ -2794,14 +2795,18 @@ Describes a rotation for an object according to Unreal Engine's axis system.
|
|||
- **Parameters:**
|
||||
- `location` (_[carla.Location](#carla.Location)_)
|
||||
- `rotation` (_[carla.Rotation](#carla.Rotation)<small> - degrees (pitch, yaw, roll)</small>_)
|
||||
- <a name="carla.Transform.inverse_transform"></a>**<font color="#7fb800">inverse_transform</font>**(<font color="#00a6ed">**self**</font>, <font color="#00a6ed">**in_point**</font>)
|
||||
Applies the inverse of `transform` by translating a 3D point in place from global to local coordinates using the current transformation as frame of reference.
|
||||
- **Parameters:**
|
||||
- `in_point` (_[carla.Vector3D](#carla.Vector3D)_) - Location in the space to which the inverse transformation will be applied.
|
||||
- <a name="carla.Transform.transform"></a>**<font color="#7fb800">transform</font>**(<font color="#00a6ed">**self**</font>, <font color="#00a6ed">**in_point**</font>)
|
||||
Translates a 3D point from local to global coordinates using the current transformation as frame of reference.
|
||||
Translates a 3D point in place from local to global coordinates using the current transformation as frame of reference.
|
||||
- **Parameters:**
|
||||
- `in_point` (_[carla.Location](#carla.Location)_) - Location in the space to which the transformation will be applied.
|
||||
- <a name="carla.Transform.transform_vector"></a>**<font color="#7fb800">transform_vector</font>**(<font color="#00a6ed">**self**</font>, <font color="#00a6ed">**in_vector**</font>)
|
||||
Rotates a vector using the current transformation as frame of reference, without applying translation. Use this to transform, for example, a velocity.
|
||||
- `in_point` (_[carla.Vector3D](#carla.Vector3D)_) - Location in the space to which the transformation will be applied.
|
||||
- <a name="carla.Transform.transform_vector"></a>**<font color="#7fb800">transform_vector</font>**(<font color="#00a6ed">**self**</font>, <font color="#00a6ed">**in_point**</font>)
|
||||
Rotates a vector in place using the current transformation as frame of reference, without applying translation. Use this to transform, for example, a velocity.
|
||||
- **Parameters:**
|
||||
- `in_vector` (_[carla.Vector3D](#carla.Vector3D)_) - Vector to which the transformation will be applied.
|
||||
- `in_point` (_[carla.Vector3D](#carla.Vector3D)_) - Vector to which the transformation will be applied.
|
||||
|
||||
##### Getters
|
||||
- <a name="carla.Transform.get_forward_vector"></a>**<font color="#7fb800">get_forward_vector</font>**(<font color="#00a6ed">**self**</font>)
|
||||
|
@ -3930,6 +3935,8 @@ This snapshot comprises all the information for every actor on scene at a certai
|
|||
A value unique for every snapshot to differentiate them.
|
||||
- <a name="carla.WorldSnapshot.frame"></a>**<font color="#f8805a">frame</font>** (_int_)
|
||||
Simulation frame in which the snapshot was taken.
|
||||
- <a name="carla.WorldSnapshot.elapsed_seconds"></a>**<font color="#f8805a">elapsed_seconds</font>** (_float<small> - seconds</small>_)
|
||||
Simulated seconds elapsed since the beginning of the current episode.
|
||||
- <a name="carla.WorldSnapshot.timestamp"></a>**<font color="#f8805a">timestamp</font>** (_[carla.Timestamp](#carla.Timestamp)<small> - seconds</small>_)
|
||||
Precise moment in time when snapshot was taken. This class works in seconds as given by the operative system.
|
||||
|
||||
|
|
|
@ -736,7 +736,7 @@ The following tags are currently available (Note, tags changed from version 0.9.
|
|||
| `14` | Car | `(0, 0, 142)` | Cars, vans |
|
||||
| `15` | Truck | `(0, 0, 70)` | Trucks |
|
||||
| `16` | Bus | `(0, 60, 100)` | Busses |
|
||||
| `17` | Train | `(0, 60, 100)` | Trains |
|
||||
| `17` | Train | `(0, 80, 100)` | Trains |
|
||||
| `18` | Motorcycle | `(0, 0, 230)` | Motorcycle, Motorbike |
|
||||
| `19` | Bicycle | `(119, 11, 32)` | Bicylces |
|
||||
| `20` | Static | `(110, 190, 160)` | Elements in the scene and props that are immovable. <br> E.g. fire hydrants, fixed benches, fountains, bus stops, etc. |
|
||||
|
@ -940,21 +940,19 @@ While the visibility is simulated within CARLA, the scenario can be configured b
|
|||
* __Output:__ [carla.CAMData](python_api.md#carla.CAMData), triggered according to the ETSI CAM standard, unless configured otherwise
|
||||
|
||||
Triggering conditions according to ETSI standard:
|
||||
- Heading angle change > $4$°
|
||||
- Position difference > $4$ m
|
||||
- Speed change > $5$ m/s
|
||||
- Heading angle change > 4°
|
||||
- Position difference > 4 m
|
||||
- Speed change > 5 m/s
|
||||
- Time elapsed > CAM Generation time (configurable)
|
||||
- Low Frequency Container Time Elapsed $> 500$ ms
|
||||
- Low Frequency Container Time Elapsed > 500 ms
|
||||
|
||||
For the CAM V2X sensor, additional blueprint attributes apply:
|
||||
|
||||
| Blueprint attribute | Type | Default | Description |
|
||||
|-------------------------|--------|-------------------------|------------------------------------|
|
||||
| <td colspan=4> Message generation |
|
||||
| gen\_cam\_min | float | $0.1$ | Minimum elapsed time between two successive CAMs in seconds (s) |
|
||||
| gen\_cam\_max | float | $1.0$ | Maximum elapsed time between two successive CAMs in seconds (s) |
|
||||
| gen\_cam\_min | float | 0.1 | Minimum elapsed time between two successive CAMs in seconds (s) |
|
||||
| gen\_cam\_max | float | 1.0 | Maximum elapsed time between two successive CAMs in seconds (s) |
|
||||
| fixed\_rate | bool | false [true] | Generate a CAM in every CARLA tick (only for debug purposes, will result in slowdown) |
|
||||
| <td colspan=4> Data generation |
|
||||
| `noise_vel_stddev_x` | float | 0\.0 | Standard deviation parameter in the noise model for velocity (X axis). |
|
||||
| `noise_accel_stddev_x` | float | 0\.0 | Standard deviation parameter in the noise model for acceleration (X axis). |
|
||||
| `noise_accel_stddev_y` | float | 0\.0 | Standard deviation parameter in the noise model for acceleration (Y axis). |
|
||||
|
@ -993,14 +991,14 @@ Example:
|
|||
|
||||
| Blueprint attribute | Type | Default | Description |
|
||||
|-------------------------|--------|-------------------------|------------------------------------|
|
||||
| transmit\_power | float | $21.5$ | Sender transmission power in dBm |
|
||||
| receiver\_sensitivity | float | $-99$ | Receiver sensitivity in dBm |
|
||||
| frequency\_ghz | float | $5.9$ | Transmission frequency in GHz. 5.9 GHz is standard for several physical channels. |
|
||||
| noise\_seed | int | $0$ | Random parameter for initialization of noise |
|
||||
| filter\_distance | float | $500$ | Maximum transmission distance in meter, path loss calculations above are skipped for simulation speed |
|
||||
| <td colspan=4> __Path loss model parameters__ |
|
||||
| combined\_antenna\_gain | float | $10.0$ | Combined gain of sender and receiver antennas in dBi, parameter for radiation efficiency and directivity |
|
||||
| d\_ref | float | $ 1.0 $ | reference distance for Log-distance path loss model in meter |
|
||||
| transmit\_power | float | 21.5 | Sender transmission power in dBm |
|
||||
| receiver\_sensitivity | float | -99 | Receiver sensitivity in dBm |
|
||||
| frequency\_ghz | float | 5.9 | Transmission frequency in GHz. 5.9 GHz is standard for several physical channels. |
|
||||
| noise\_seed | int | 0 | Random parameter for initialization of noise |
|
||||
| filter\_distance | float | 500 | Maximum transmission distance in meter, path loss calculations above are skipped for simulation speed |
|
||||
| __Path loss model parameters__ | | | |
|
||||
| combined\_antenna\_gain | float | 10.0 | Combined gain of sender and receiver antennas in dBi, parameter for radiation efficiency and directivity |
|
||||
| d\_ref | float | 1.0 | reference distance for Log-distance path loss model in meter |
|
||||
| path\_loss\_exponent | float | 2.7 | Loss parameter for non-line of sight due to building obstruction |
|
||||
| scenario | string | urban | Options: [urban, rural, highway], defines the fading noise parameters |
|
||||
| path\_loss\_model | string | geometric | general path loss model to be used. Options: [geometric, winner] |
|
||||
|
|
|
@ -88,6 +88,12 @@ namespace detail {
|
|||
const auto id = GetCurrentEpisode().GetId();
|
||||
_client.LoadEpisode(std::move(map_name), reset_settings, map_layers);
|
||||
|
||||
// delete the pointer to _episode so that the Navigation information
|
||||
// will be loaded for the correct map
|
||||
assert(_episode.use_count() == 1);
|
||||
_episode.reset();
|
||||
GetReadyCurrentEpisode();
|
||||
|
||||
// We are waiting 50ms for the server to reload the episode.
|
||||
// If in this time we have not detected a change of episode, we try again
|
||||
// 'number_of_attempts' times.
|
||||
|
|
|
@ -15,7 +15,6 @@
|
|||
#include <boost/asio/connect.hpp>
|
||||
#include <boost/asio/read.hpp>
|
||||
#include <boost/asio/write.hpp>
|
||||
#include <boost/asio/post.hpp>
|
||||
#include <boost/asio/bind_executor.hpp>
|
||||
|
||||
#include <exception>
|
||||
|
@ -86,7 +85,6 @@ namespace tcp {
|
|||
|
||||
void Client::Connect() {
|
||||
auto self = shared_from_this();
|
||||
boost::asio::post(_strand, [this, self]() {
|
||||
if (_done) {
|
||||
return;
|
||||
}
|
||||
|
@ -139,18 +137,15 @@ namespace tcp {
|
|||
|
||||
log_debug("streaming client: connecting to", ep);
|
||||
_socket.async_connect(ep, boost::asio::bind_executor(_strand, handle_connect));
|
||||
});
|
||||
}
|
||||
|
||||
void Client::Stop() {
|
||||
_connection_timer.cancel();
|
||||
auto self = shared_from_this();
|
||||
boost::asio::post(_strand, [this, self]() {
|
||||
_done = true;
|
||||
if (_socket.is_open()) {
|
||||
_socket.close();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
void Client::Reconnect() {
|
||||
|
@ -165,7 +160,6 @@ namespace tcp {
|
|||
|
||||
void Client::ReadData() {
|
||||
auto self = shared_from_this();
|
||||
boost::asio::post(_strand, [this, self]() {
|
||||
if (_done) {
|
||||
return;
|
||||
}
|
||||
|
@ -182,7 +176,7 @@ namespace tcp {
|
|||
// Move the buffer to the callback function and start reading the next
|
||||
// piece of data.
|
||||
// log_debug("streaming client: success reading data, calling the callback");
|
||||
boost::asio::post(_strand, [self, message]() { self->_callback(message->pop()); });
|
||||
self->_callback(message->pop());
|
||||
ReadData();
|
||||
} else {
|
||||
// As usual, if anything fails start over from the very top.
|
||||
|
@ -219,7 +213,6 @@ namespace tcp {
|
|||
_socket,
|
||||
message->size_as_buffer(),
|
||||
boost::asio::bind_executor(_strand, handle_read_header));
|
||||
});
|
||||
}
|
||||
|
||||
} // namespace tcp
|
||||
|
|
|
@ -79,7 +79,6 @@ namespace tcp {
|
|||
DEBUG_ASSERT(message != nullptr);
|
||||
DEBUG_ASSERT(!message->empty());
|
||||
auto self = shared_from_this();
|
||||
boost::asio::post(_strand, [=]() {
|
||||
if (!_socket.is_open()) {
|
||||
return;
|
||||
}
|
||||
|
@ -111,11 +110,8 @@ namespace tcp {
|
|||
log_debug("session", _session_id, ": sending message of", message->size(), "bytes");
|
||||
|
||||
_deadline.expires_from_now(_timeout);
|
||||
boost::asio::async_write(
|
||||
_socket,
|
||||
message->GetBufferSequence(),
|
||||
handle_sent);
|
||||
});
|
||||
boost::asio::async_write(_socket, message->GetBufferSequence(),
|
||||
boost::asio::bind_executor(_strand, handle_sent));
|
||||
}
|
||||
|
||||
void ServerSession::Close() {
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -41,6 +41,11 @@
|
|||
type: list
|
||||
doc: >
|
||||
A list of commands to execute in batch. Each command is different and has its own parameters. They appear listed at the bottom of this page.
|
||||
- param_name: do_tick
|
||||
type: bool
|
||||
default: false
|
||||
doc: >
|
||||
A boolean parameter to specify whether or not to perform a carla.World.tick after applying the batch in _synchronous mode_. Defaults to __False__.
|
||||
doc: >
|
||||
Executes a list of commands on a single simulation step and retrieves no information. If you need information about the response of each command, use the __<font color="#7fb800">apply_batch_sync()</font>__ method.
|
||||
[Here](https://github.com/carla-simulator/carla/blob/master/PythonAPI/examples/generate_traffic.py) is an example on how to delete the actors that appear in carla.ActorList all at once.
|
||||
|
@ -51,11 +56,11 @@
|
|||
type: list
|
||||
doc: >
|
||||
A list of commands to execute in batch. The commands available are listed right above, in the method **<font color="#7fb800">apply_batch()</font>**.
|
||||
- param_name: due_tick_cue
|
||||
- param_name: do_tick
|
||||
type: bool
|
||||
default: false
|
||||
doc: >
|
||||
A boolean parameter to specify whether or not to perform a carla.World.tick after applying the batch in _synchronous mode_. It is __False__ by default.
|
||||
A boolean parameter to specify whether or not to perform a carla.World.tick after applying the batch in _synchronous mode_. Defaults to __False__.
|
||||
return: list(command.Response)
|
||||
doc: >
|
||||
Executes a list of commands on a single simulation step, blocks until the commands are linked, and returns a list of <b>command.Response</b> that can be used to determine whether a single command succeeded or not. [Here](https://github.com/carla-simulator/carla/blob/master/PythonAPI/examples/generate_traffic.py) is an example of it being used to spawn actors.
|
||||
|
|
|
@ -328,7 +328,7 @@
|
|||
Class that represents a 3D rotation and therefore, an orientation in space. CARLA uses the Unreal Engine coordinates system. This is a Z-up left-handed system. <br>
|
||||
|
||||
<br>The constructor method follows a specific order of declaration: `(pitch, yaw, roll)`, which corresponds to `(Y-rotation,Z-rotation,X-rotation)`. <br>
|
||||
<br>![UE4_Rotation](https://d26ilriwvtzlb.cloudfront.net/8/83/BRMC_9.jpg)
|
||||
<br>![UE4_Rotation](/img/unreal_lhcs.png)
|
||||
*Unreal Engine's coordinates system*
|
||||
# - PROPERTIES -------------------------
|
||||
instance_variables:
|
||||
|
@ -438,20 +438,29 @@
|
|||
- def_name: transform
|
||||
params:
|
||||
- param_name: in_point
|
||||
type: carla.Location
|
||||
type: carla.Vector3D
|
||||
doc: >
|
||||
Location in the space to which the transformation will be applied.
|
||||
doc: >
|
||||
Translates a 3D point from local to global coordinates using the current transformation as frame of reference.
|
||||
Translates a 3D point in place from local to global coordinates using the current transformation as frame of reference.
|
||||
# --------------------------------------
|
||||
- def_name: inverse_transform
|
||||
params:
|
||||
- param_name: in_point
|
||||
type: carla.Vector3D
|
||||
doc: >
|
||||
Location in the space to which the inverse transformation will be applied.
|
||||
doc: >
|
||||
Applies the inverse of `transform` by translating a 3D point in place from global to local coordinates using the current transformation as frame of reference.
|
||||
# --------------------------------------
|
||||
- def_name: transform_vector
|
||||
params:
|
||||
- param_name: in_vector
|
||||
- param_name: in_point
|
||||
type: carla.Vector3D
|
||||
doc: >
|
||||
Vector to which the transformation will be applied.
|
||||
doc: >
|
||||
Rotates a vector using the current transformation as frame of reference, without applying translation. Use this to transform, for example, a velocity.
|
||||
Rotates a vector in place using the current transformation as frame of reference, without applying translation. Use this to transform, for example, a velocity.
|
||||
# --------------------------------------
|
||||
- def_name: get_forward_vector
|
||||
return: carla.Vector3D
|
||||
|
|
|
@ -17,6 +17,11 @@
|
|||
type: int
|
||||
doc: >
|
||||
Simulation frame in which the snapshot was taken.
|
||||
- var_name: elapsed_seconds
|
||||
type: float
|
||||
var_units: seconds
|
||||
doc: >
|
||||
Simulated seconds elapsed since the beginning of the current episode.
|
||||
- var_name: timestamp
|
||||
type: carla.Timestamp
|
||||
var_units: seconds
|
||||
|
|
|
@ -685,11 +685,11 @@ class HUD(object):
|
|||
self._show_ackermann_info = False
|
||||
self._ackermann_control = carla.VehicleAckermannControl()
|
||||
|
||||
def on_world_tick(self, timestamp):
|
||||
def on_world_tick(self, world_snapshot):
|
||||
self._server_clock.tick()
|
||||
self.server_fps = self._server_clock.get_fps()
|
||||
self.frame = timestamp.frame
|
||||
self.simulation_time = timestamp.elapsed_seconds
|
||||
self.frame = world_snapshot.frame
|
||||
self.simulation_time = world_snapshot.elapsed_seconds
|
||||
|
||||
def tick(self, world, clock):
|
||||
self._notifications.tick(world, clock)
|
||||
|
|
|
@ -282,12 +282,12 @@ class HUD(object):
|
|||
self._info_text = []
|
||||
self._server_clock = pygame.time.Clock()
|
||||
|
||||
def on_world_tick(self, timestamp):
|
||||
"""Gets informations from the world at every tick"""
|
||||
def on_world_tick(self, world_snapshot):
|
||||
"""Gets information from the world at every tick"""
|
||||
self._server_clock.tick()
|
||||
self.server_fps = self._server_clock.get_fps()
|
||||
self.frame = timestamp.frame_count
|
||||
self.simulation_time = timestamp.elapsed_seconds
|
||||
self.frame = world_snapshot.frame
|
||||
self.simulation_time = world_snapshot.elapsed_seconds
|
||||
|
||||
def tick(self, world, clock):
|
||||
"""HUD method for every tick"""
|
||||
|
|
|
@ -685,11 +685,12 @@ class HUD(object):
|
|||
self._show_ackermann_info = False
|
||||
self._ackermann_control = carla.VehicleAckermannControl()
|
||||
|
||||
def on_world_tick(self, timestamp):
|
||||
def on_world_tick(self, world_snapshot):
|
||||
"""Gets information from the world at every tick"""
|
||||
self._server_clock.tick()
|
||||
self.server_fps = self._server_clock.get_fps()
|
||||
self.frame = timestamp.frame
|
||||
self.simulation_time = timestamp.elapsed_seconds
|
||||
self.frame = world_snapshot.frame
|
||||
self.simulation_time = world_snapshot.elapsed_seconds
|
||||
|
||||
def tick(self, world, clock):
|
||||
self._notifications.tick(world, clock)
|
||||
|
|
|
@ -575,11 +575,12 @@ class HUD(object):
|
|||
self._info_text = []
|
||||
self._server_clock = pygame.time.Clock()
|
||||
|
||||
def on_world_tick(self, timestamp):
|
||||
def on_world_tick(self, world_snapshot):
|
||||
"""Gets information from the world at every tick"""
|
||||
self._server_clock.tick()
|
||||
self.server_fps = self._server_clock.get_fps()
|
||||
self.frame = timestamp.frame
|
||||
self.simulation_time = timestamp.elapsed_seconds
|
||||
self.frame = world_snapshot.frame
|
||||
self.simulation_time = world_snapshot.elapsed_seconds
|
||||
|
||||
def tick(self, world, clock):
|
||||
self._notifications.tick(world, clock)
|
||||
|
|
|
@ -594,11 +594,12 @@ class HUD(object):
|
|||
self._info_text = []
|
||||
self._server_clock = pygame.time.Clock()
|
||||
|
||||
def on_world_tick(self, timestamp):
|
||||
def on_world_tick(self, world_snapshot):
|
||||
"""Gets information from the world at every tick"""
|
||||
self._server_clock.tick()
|
||||
self.server_fps = self._server_clock.get_fps()
|
||||
self.frame = timestamp.frame
|
||||
self.simulation_time = timestamp.elapsed_seconds
|
||||
self.frame = world_snapshot.frame
|
||||
self.simulation_time = world_snapshot.elapsed_seconds
|
||||
|
||||
def tick(self, world, clock):
|
||||
self._notifications.tick(world, clock)
|
||||
|
|
|
@ -399,11 +399,12 @@ class HUD(object):
|
|||
self._info_text = []
|
||||
self._server_clock = pygame.time.Clock()
|
||||
|
||||
def on_world_tick(self, timestamp):
|
||||
def on_world_tick(self, world_snapshot):
|
||||
"""Gets information from the world at every tick"""
|
||||
self._server_clock.tick()
|
||||
self.server_fps = self._server_clock.get_fps()
|
||||
self.frame = timestamp.frame
|
||||
self.simulation_time = timestamp.elapsed_seconds
|
||||
self.frame = world_snapshot.frame
|
||||
self.simulation_time = world_snapshot.elapsed_seconds
|
||||
|
||||
def tick(self, world, clock):
|
||||
self._notifications.tick(world, clock)
|
||||
|
|
|
@ -993,7 +993,7 @@ class World(object):
|
|||
|
||||
# Register event for receiving server tick
|
||||
weak_self = weakref.ref(self)
|
||||
self.world.on_tick(lambda timestamp: World.on_world_tick(weak_self, timestamp))
|
||||
self.world.on_tick(lambda world_snapshot: World.on_world_tick(weak_self, world_snapshot))
|
||||
|
||||
def select_hero_actor(self):
|
||||
"""Selects only one hero actor if there are more than one. If there are not any, it will spawn one."""
|
||||
|
@ -1081,7 +1081,7 @@ class World(object):
|
|||
self._hud.add_info('HERO', hero_mode_text)
|
||||
|
||||
@staticmethod
|
||||
def on_world_tick(weak_self, timestamp):
|
||||
def on_world_tick(weak_self, world_snapshot):
|
||||
"""Updates the server tick"""
|
||||
self = weak_self()
|
||||
if not self:
|
||||
|
@ -1089,7 +1089,7 @@ class World(object):
|
|||
|
||||
self.server_clock.tick()
|
||||
self.server_fps = self.server_clock.get_fps()
|
||||
self.simulation_time = timestamp.elapsed_seconds
|
||||
self.simulation_time = world_snapshot.elapsed_seconds
|
||||
|
||||
def _show_nearby_vehicles(self, vehicles):
|
||||
"""Shows nearby vehicles of the hero actor"""
|
||||
|
|
|
@ -616,11 +616,12 @@ class HUD(object):
|
|||
self._server_clock = pygame.time.Clock()
|
||||
self.rss_state_visualizer = RssStateVisualizer(self.dim, self._font_mono, self._world)
|
||||
|
||||
def on_world_tick(self, timestamp):
|
||||
def on_world_tick(self, world_snapshot):
|
||||
"""Gets information from the world at every tick"""
|
||||
self._server_clock.tick()
|
||||
self.server_fps = self._server_clock.get_fps()
|
||||
self.frame = timestamp.frame
|
||||
self.simulation_time = timestamp.elapsed_seconds
|
||||
self.frame = world_snapshot.frame
|
||||
self.simulation_time = world_snapshot.elapsed_seconds
|
||||
|
||||
def tick(self, player, clock):
|
||||
self._notifications.tick(clock)
|
||||
|
|
|
@ -138,7 +138,7 @@ LibCarla.client.rss.release: setup ad-rss
|
|||
plugins:
|
||||
@${CARLA_BUILD_TOOLS_FOLDER}/Plugins.sh $(ARGS)
|
||||
|
||||
setup downloadplugins:
|
||||
setup: downloadplugins
|
||||
@${CARLA_BUILD_TOOLS_FOLDER}/Setup.sh $(ARGS)
|
||||
|
||||
ad-rss:
|
||||
|
|
Loading…
Reference in New Issue