* fixed typos and broken links
* updated python_api.md
* fixed CityObjectLabel API docs
* added load_world_if_different to API docs
* added return type to reload_world
* updated python_api.md
* added FutureActor to API docs
* fixed typos and broken links
* updated python_api.md
* fixed CityObjectLabel API docs
* added load_world_if_different to API docs
* added return type to reload_world
* updated python_api.md
* Extended debug draw functions to allow drawing primitives on HUD layer
* Added documentation for new drawing features
* Added debug draw changes to changelog
---------
Co-authored-by: Olli <olli.koskelainen@tuni.fi>
* Added new function to obtain the name of all actor sockets
* Updating CHANGELOG.md
* Simplifying code of get_actor_socket_names function
---------
Co-authored-by: Blyron <53337103+Blyron@users.noreply.github.com>
* Bugfix for empty vehicle_list
Bug description: When an empty list is passed this fills the list with all vehicles; this is not intended.
1) This does not allow to pass an empty list, e.g. if no vehicles are nearby.
2) On a map without pedestrians, this code is also used with an empty list which then detects cars as pedestrians.
* Update CHANGELOG.md with agent bugfix note
---------
Co-authored-by: Blyron <53337103+Blyron@users.noreply.github.com>
* Add actor component getters to the PythonAPI
Adds functions:
- get_component_world_transform
- get_component_relative_transform
to the Python API to acces the transform of actor components by name
* Update changelog for get-transform-component changes
* Adding getters for receive bone names and transforms
* Corrections
* Correcting Python API function definitions to make them able to return lists
* Improving the code of get_actor_bone_world_transforms
* Adding getters to obtain socket transforms
* Updating CHANGELOG.md
* Deleting .ignore
* Updating Util/BuildTools/Setup.sh
* Correcting Setup.sh
---------
Co-authored-by: Aperiss <perissanchezantonio@gmail.com>
Co-authored-by: Blyron <53337103+Blyron@users.noreply.github.com>
Adds functions:
- get_component_world_transform
- get_component_relative_transform
to the Python API to acces the transform of actor components by name
* Adding ROS2 manager
* Trying to compile fastDDS in windows, but have problems with dependencies
* Camera sensors connected to ROS2, dependencies disabled temporaly
* Including enum with sensors list
* adding GNSS sensor capture
* adding IMU sensor capture
* adding DVS sensor capture
* adding Lidar sensor capture
* adding SemanticLidar and Radar capture
* adding ObstacleDetector and some fixes
* modify cmakelists, failed to find libatomic
* fixed libatomic
* compile fast-dds with libc++
* fixed compliation fast dds with libcxx
* linked carla with fastdds
* Fixed Fast-DDS lib
Now its compiled to a intermediate lib with a bridge so libstdc++ can be used
* moved all ros2 deps to ros2 folder
renamed types from .cxx to .cpp
* Finally FastDDS compiled and working inside CARLA
* exposed publish function for testing
* fixed code style
* make ros2 optional
* make ros2 optional
* Added defines to compile ROS2 code
* ros image publisher working
* deleted some buffer copies
* Added more topics and ROS2 types
* Adding sensor Transform as argument, and add function to send buffer or serialize and send buffer
* Removing empty buffer from DVS sensor
* fixed lidar publisher
* fixed lidar publisher
* Fix buffer of RGB in ROS2
* adding timestamp of each frame into ROS2 manager
* sending timestamps with frame to ROS2
* put apart timestamp from frame counter call
* adding BufferView to share buffers
* adding BufferView to share buffers
* adding ros_name attribute to all actors
* mapping ros_name for each actor
* ROS2 is now published in a different thread
Publishers now can be created on demand and be reused
Added subscriber for ego vehicle
Fixed build scripts
* forgot to add this fix
* add ros2 to windows scripts
* fixed default ros topic names
* fix topic name duplication
* Adding functions for enable/disable sensors publishing without listen to it
* Added Camera info and ROI types
RGB Camera now publishes in both topics
* move camera info immutable data to the constructor
* Publish transform for all topics
Create Camera DVS subtopics
Fixed bug with Lidar
* Added flip Y to semantic lidar
* Adding callbacks for subscribers from Unreal
* Adding camera info to ROS2 (resolution and FOV)
* Finished ROS2 naming from python
* Fixed bug with ros names
* Delete topics when deleting the sensors
* setting the rosname same as default no longer rewrites it
* ROS transform fix
* Added all camera topics with the image and camera info
Added vehicle control
Added clock publisher
* Change ros2 topic names for vehicle subscriber and clock publisher
* Rename vehicle control ros2 topic name
* rename subscriber type to CarlaEgoVehicleControl
* Fix semantic lidar default ros name
Fix sizeof the semantic lidar data buffer
* Changed controller stored as string to pointer
* Back to previous version for default hero ros name
Removed debug prints
* Remvoe callback when ego publisher disconnects
* Serializing DVS data before sending to ROS
* dvs camera image and lidar
* DVS Pointcloud publishing
* Remove unnecessary fields
* Send local transforms to ros
* avoid transform recalculation if not needed
* Optical Flow Camera fixed
* Set fixed branch for Fast-DDS to avoid cmake version change issues
* Finally Working on package
* Fix style from FastDDS auto generated files
* Added ros2 to ubuntu in jenkins
* removed ros2 from jenkins, test
* restore ros2 in jenkins
* fix copy shareds, and removed server dependency from libcarla
* test installing the fastdds dependencies in jenkins
* move installing deps to separate stage
* removed install deps
* Fixing test_benchmark_streaming
* Fixed imu orientation and camera info data
* Fixing test_benchmark_streaming.cpp with BufferView
* Removing DEBUG_ONLY()
* publish collision sensor
* Fixing unit-tests with the new BufferView
* camera info is set once
* Fix echo camera info
* fix transform rotation
* Fixing ros_name attribute creation
* fixed camera info and region of interest publish
* fix IMU compass
* Forgot to add ros2 flag to jenkins package
---------
Co-authored-by: bernatx <bernatx@gmail.com>
* PythonAPI: Fix segfault in GetAvailableMaps
When using CARLA with Python 3.10, I'm getting a segfault in
GetAvailableMaps. The problem disappears when PyList manipulation does
not happen with GIL unlocked, as done in this commit.
The initial part of crash backtrace (from GDB) is below:
Program terminated with signal SIGSEGV, Segmentation fault.
warning: Section `.reg-xstate/49253' in core file too small.
#0 _PyInterpreterState_GET () at ./Include/internal/pycore_pystate.h:117
117 return tstate->interp;
[Current thread is 1 (Thread 0x7fe6fe48f740 (LWP 49253))]
(gdb) bt
#0 _PyInterpreterState_GET () at ./Include/internal/pycore_pystate.h:117
#1 get_list_state () at Objects/listobject.c:26
#2 PyList_New (size=0) at Objects/listobject.c:159
#3 0x00007fe6fdc0dab0 in boost::python::detail::list_base::list_base() () from /nix/store/c95f3nrkz3sflvycihyw1c8q4nk47p4m-boost-1.79.0/lib/libboost_python310.so.1.79.0
#4 0x00007fe6ef9ecfc4 in boost::python::list::list (this=0x7ffd8a8aae28) at include/boost/python/list.hpp:61
#5 GetAvailableMaps (self=...) at source/libcarla/Client.cpp:26
#6 0x00007fe6efb6a8fe in boost::python::detail::invoke<boost::python::to_python_value<boost::python::list const&>, boost::python::list (*)(carla::client::Client const&), boost::python::arg_from_python<carla::client::Client const&> > (rc=..., f=<optimized out>, ac0=...)
at include/boost/python/detail/invoke.hpp:73
#7 boost::python::detail::caller_arity<1u>::impl<boost::python::list (*)(carla::client::Client const&), boost::python::default_call_policies, boost::mpl::vector2<boost::python::list, carla::client::Client const&> >::operator() (args_=<optimized out>, this=<optimized out>)
at include/boost/python/detail/caller.hpp:233
#8 boost::python::objects::caller_py_function_impl<boost::python::detail::caller<boost::python::list (*)(carla::client::Client const&), boost::python::default_call_policies, boost::mpl::vector2<boost::python::list, carla::client::Client const&> > >::operator() (
this=<optimized out>, args=<optimized out>, kw=<optimized out>) at include/boost/python/object/py_function.hpp:38
#9 0x00007fe6fdc1b4dd in boost::python::objects::function::call(_object*, _object*) const () from /nix/store/c95f3nrkz3sflvycihyw1c8q4nk47p4m-boost-1.79.0/lib/libboost_python310.so.1.79.0
#10 0x00007fe6fdc1b6a8 in boost::detail::function::void_function_ref_invoker0<boost::python::objects::(anonymous namespace)::bind_return, void>::invoke(boost::detail::function::function_buffer&) ()
from /nix/store/c95f3nrkz3sflvycihyw1c8q4nk47p4m-boost-1.79.0/lib/libboost_python310.so.1.79.0
...
* PythonAPI: Fix segfault in get_random_location_from_navigation()
When I run generate_traffic.py under Python 3.10, I get a segfault at
line:
loc = world.get_random_location_from_navigation()
The backtrace from gdb looks like this:
#0 0x00007f04552ad7e7 in new_threadstate () from /nix/store/zqj9irpw63pal9r4671p1gjd9jiw5sid-ros-env/lib/libpython3.10.so.1.0
#1 0x00007f04552adaa1 in PyGILState_Ensure () from /nix/store/zqj9irpw63pal9r4671p1gjd9jiw5sid-ros-env/lib/libpython3.10.so.1.0
#2 0x00007f040afd4f32 in std::_Function_handler<void (carla::client::WorldSnapshot), MakeCallback(boost::python::api::object)::{lambda(auto:1)#1}>::_M_invoke(std::_Any_data const&, carla::client::WorldSnapshot&&) ()
from /nix/store/zqj9irpw63pal9r4671p1gjd9jiw5sid-ros-env/lib/python3.10/site-packages/carla/libcarla.cpython-310-x86_64-linux-gnu.so
#3 0x00007f040b1d4ab1 in carla::client::detail::CallbackList<carla::client::WorldSnapshot>::Call(carla::client::WorldSnapshot) const () from /nix/store/zqj9irpw63pal9r4671p1gjd9jiw5sid-ros-env/lib/python3.10/site-packages/carla/libcarla.cpython-310-x86_64-linux-gnu.so
#4 0x00007f040b1d424a in std::_Function_handler<void (carla::Buffer), carla::client::detail::Episode::Listen()::{lambda(auto:1)#1}>::_M_invoke(std::_Any_data const&, carla::Buffer&&) ()
from /nix/store/zqj9irpw63pal9r4671p1gjd9jiw5sid-ros-env/lib/python3.10/site-packages/carla/libcarla.cpython-310-x86_64-linux-gnu.so
#5 0x00007f040b23fc41 in boost::asio::detail::completion_handler<boost::asio::detail::binder0<carla::streaming::detail::tcp::Client::ReadData()::{lambda()#1}::operator()() const::{lambda(boost::system::error_code, unsigned long)#1}::operator()(boost::system::error_code, unsigned long) const::{lambda()#1}>, boost::asio::io_context::basic_executor_type<std::allocator<void>, 0ul> >::do_complete(void*, boost::asio::detail::scheduler_operation*, boost::system::error_code const&, unsigned long) ()
from /nix/store/zqj9irpw63pal9r4671p1gjd9jiw5sid-ros-env/lib/python3.10/site-packages/carla/libcarla.cpython-310-x86_64-linux-gnu.so
#6 0x00007f040b24ae85 in boost::asio::detail::strand_service::do_complete(void*, boost::asio::detail::scheduler_operation*, boost::system::error_code const&, unsigned long) ()
from /nix/store/zqj9irpw63pal9r4671p1gjd9jiw5sid-ros-env/lib/python3.10/site-packages/carla/libcarla.cpython-310-x86_64-linux-gnu.so
#7 0x00007f040b1a94f5 in boost::asio::detail::scheduler::do_run_one(boost::asio::detail::conditionally_enabled_mutex::scoped_lock&, boost::asio::detail::scheduler_thread_info&, boost::system::error_code const&) ()
from /nix/store/zqj9irpw63pal9r4671p1gjd9jiw5sid-ros-env/lib/python3.10/site-packages/carla/libcarla.cpython-310-x86_64-linux-gnu.so
#8 0x00007f040b199351 in boost::asio::detail::scheduler::run(boost::system::error_code&) [clone .isra.0] () from /nix/store/zqj9irpw63pal9r4671p1gjd9jiw5sid-ros-env/lib/python3.10/site-packages/carla/libcarla.cpython-310-x86_64-linux-gnu.so
#9 0x00007f040b1ac1cb in std:🧵:_State_impl<std:🧵:_Invoker<std::tuple<carla::ThreadPool::AsyncRun(unsigned long)::{lambda()#1}> > >::_M_run() ()
from /nix/store/zqj9irpw63pal9r4671p1gjd9jiw5sid-ros-env/lib/python3.10/site-packages/carla/libcarla.cpython-310-x86_64-linux-gnu.so
#10 0x00007f040bce05c3 in execute_native_thread_routine () from /nix/store/2fpmbk0g0ggm9zq89af7phvvvv8dnm7n-gcc-12.3.0-lib/lib/libstdc++.so.6
#11 0x00007f045509fdd4 in start_thread () from /nix/store/1x4ijm9r1a88qk7zcmbbfza324gx1aac-glibc-2.37-8/lib/libc.so.6
#12 0x00007f04551219b0 in clone3 () from /nix/store/1x4ijm9r1a88qk7zcmbbfza324gx1aac-glibc-2.37-8/lib/libc.so.6
It turns out that its caused by releasing GIL for too long. We fix it
by releasing the GIL only for the actual libcarla call and
constructing Python objects with GIL locked.
---------
Co-authored-by: bernat <bernatx@gmail.com>
* Adding a new function to load a map only if it is different
* Removing commented code
* Updated AddVehicleWheelsAnimation function
* Revert "Updated AddVehicleWheelsAnimation function"
This reverts commit 55405a3de7.
* Small correction: removing blank space
* Changelog.md update
---------
Co-authored-by: Adri Ollero <adriollero@gmail.com>
Co-authored-by: Axel1092 <35765780+Axel1092@users.noreply.github.com>
* Updated changelog and content versions
* Added vehicle.sixwheeltruck.sixwheeltruck to smoke test exclusion list
* Fix old town tests
* fixed vehicle id in smoke test
* Update ContentVersions.txt
---------
Co-authored-by: bernat <bernatx@gmail.com>
The supported compiler is clang, but that is not the default on Ubuntu.
Unreal Editor itself ships clang-10 for use on linux (along with the
libc++ that Unreal itself uses) so just use those in CARLA.
* Change handling of empty gbuffers.
Now, instead of sending an empty image, a black one with the size of the viewport is sent if the target gbuffer is unavailable.
* Add more GBufferID checks + improve empty gbuffer handling.
* Fix manual_control_gbuffer.py error on repeated listen_to_gbuffer.
* Expose is_listening and is_listening_gbuffer to the PythonAPI.
* Fix data race + autoremove unused gbuffers in manual_control_gbuffer.
* Update PythonAPI docs.
* Remove magic number.
* Switch from error to warning on invalid sensor type when requesting gbuffers.