Changes from PR
This commit is contained in:
parent
af17bf97f7
commit
e0cdc80cc1
|
@ -602,7 +602,7 @@ namespace nav {
|
|||
|
||||
// get a random location for navigation
|
||||
bool Navigation::GetRandomLocation(carla::geom::Location &location, float maxHeight, dtQueryFilter * filter,
|
||||
bool use_lock) {
|
||||
bool use_lock) const {
|
||||
|
||||
std::unique_lock<std::mutex> guard(_mutex, std::defer_lock);
|
||||
|
||||
|
|
|
@ -59,7 +59,7 @@ namespace nav {
|
|||
void UpdateCrowd(const client::detail::EpisodeState &state);
|
||||
/// get a random location for navigation
|
||||
bool GetRandomLocation(carla::geom::Location &location, float maxHeight = -1.0f,
|
||||
dtQueryFilter * filter = nullptr, bool use_lock = true);
|
||||
dtQueryFilter * filter = nullptr, bool use_lock = true) const;
|
||||
|
||||
private:
|
||||
|
||||
|
@ -76,7 +76,7 @@ namespace nav {
|
|||
/// Store walkers yaw angle from previous tick
|
||||
std::unordered_map<ActorId, float> _yaw_walkers;
|
||||
|
||||
std::mutex _mutex;
|
||||
mutable std::mutex _mutex;
|
||||
|
||||
};
|
||||
|
||||
|
|
|
@ -166,6 +166,10 @@ def main():
|
|||
all_id.append(walkers_list[i]["con"])
|
||||
all_id.append(walkers_list[i]["id"])
|
||||
all_actors = world.get_actors(all_id)
|
||||
|
||||
# wait for a tick to ensure client receives the last transform of the walkers we have just created
|
||||
world.wait_for_tick()
|
||||
|
||||
# 5. initialize each controller and set target to walk to (list is [controler, actor, controller, actor ...])
|
||||
for i in range(0, len(all_id), 2):
|
||||
# start walker
|
||||
|
|
|
@ -617,7 +617,7 @@ void FCarlaServer::FPimpl::BindActions()
|
|||
auto ActorView = Episode->FindActor(ActorId);
|
||||
if (!ActorView.IsValid())
|
||||
{
|
||||
RESPOND_ERROR("unable to apply control: actor view is invalid");
|
||||
RESPOND_ERROR("unable to apply control: actor not found");
|
||||
}
|
||||
auto Pawn = Cast<APawn>(ActorView.GetActor());
|
||||
if (Pawn == nullptr)
|
||||
|
|
Loading…
Reference in New Issue