Giter Club home page Giter Club logo

carla-rust's People

Contributors

jerry73204 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

carla-rust's Issues

Trying to fetch lidar sensor data from ego vehicle

Hi @jerry73204,

CARLA version: 0.9.13
Platform/OS: Ubuntu 20.04

I am running python script which is connecting to remote Carla instance, and parallel running rust api connecting as another client to fetch the raw data of actor, from automatic_control.py ego vehicle. I have selected the Lidar sensor in automatic_control.py. I want pass the Lidar data into the rust interface. Interface between automatic_control.py and rust is established. Am able to fetch the attributes of Lidar sensor, but am unable to fetch the Lidar output data from the actor.

if let Some(actor) = client.world().actors().iter().find(|a|{
                a.type_id().contains("sensor.lidar.ray_cast")
            }) {
                
                loop{
                    let mut attr=actor.attributes();

                    for attr in attr.iter(){
                        println!("{:?}= {:?}",attr.id(),attr.value_string());
                    }
                    println!();
                }
             }

output i observed for above:

"noise_stddev"= "0.0"
"dropoff_zero_intensity"= "0.4"
"atmosphere_attenuation_rate"= "0.004"
"horizontal_fov"= "360.0"
"lower_fov"= "-30.0"
"upper_fov"= "10.0"
"rotation_frequency"= "10.0"
"points_per_second"= "56000"
"dropoff_intensity_limit"= "0.8"
"noise_seed"= "0"
"range"= "50"
"channels"= "32"
"dropoff_general_rate"= "0.45"
"sensor_tick"= "0.0"
"role_name"= "front"

Can you please suggest what API to use in order to receive the sensor data? I cannot use the listen method here. 
Thank you.

Carla simulator version 0.9.X

Hi @jerry73204

This is a great project and I was just trying this out to connect to the latest version of the simulator I installed on Ubuntu.

WARNING: Version mismatch detected: You are trying to connect to a simulator that might be incompatible with this API
WARNING: Client API version = 0.4.0-1-gb3fbf09-dirty
WARNING: Simulator API version = 0.9.13

I see that the Client API is quite old. What would it take to move to a newer version? Is this something I can help with?

Regards,
Sojan

Failed to build without setting RUST_LOG=info

It seems that carla-rust fails to build if we unset the RUST_LOG . Here's the error logs:

warning: field `dir_name` is never read
 --> carla-bin/build.rs:7:9
  |
6 | struct PrebuildConfig {
  |        -------------- field in this struct
7 |     pub dir_name: PathBuf,
  |         ^^^^^^^^
  |
  = note: `#[warn(dead_code)]` on by default

   Compiling autocxx-engine v0.23.1
warning: `carla-bin` (build script) generated 1 warning
   Compiling autocxx-macro v0.23.1
   Compiling autocxx v0.23.1
   Compiling autocxx-build v0.23.1
   Compiling carla-sys v0.8.0 (/workspace/carla-rust/carla-sys)
   Compiling nalgebra v0.31.4
warning: In file included from /workspace/carla-rust/target/debug/build/carla-bin-4919e105b3e9917c/out/prebuild/0.3.0.x86_64-unknown-linux-gnu.debug/include/rpc/msgpack/object.hpp:15,
warning:                  from /workspace/carla-rust/target/debug/build/carla-bin-4919e105b3e9917c/out/prebuild/0.3.0.x86_64-unknown-linux-gnu.debug/include/rpc/msgpack.hpp:23,
warning:                  from /workspace/carla-rust/target/debug/build/carla-bin-4919e105b3e9917c/out/prebuild/0.3.0.x86_64-unknown-linux-gnu.debug/include/carla/MsgPack.h:11,
warning:                  from /workspace/carla-rust/target/debug/build/carla-bin-4919e105b3e9917c/out/prebuild/0.3.0.x86_64-unknown-linux-gnu.debug/include/carla/geom/Transform.h:9,
warning:                  from /workspace/carla-rust/target/debug/build/carla-bin-4919e105b3e9917c/out/prebuild/0.3.0.x86_64-unknown-linux-gnu.debug/include/carla/rpc/Transform.h:9,
warning:                  from /workspace/carla-rust/target/debug/build/carla-bin-4919e105b3e9917c/out/prebuild/0.3.0.x86_64-unknown-linux-gnu.debug/include/carla/sensor/s11n/SensorHeaderSerializer.h:10,
warning:                  from /workspace/carla-rust/target/debug/build/carla-bin-4919e105b3e9917c/out/prebuild/0.3.0.x86_64-unknown-linux-gnu.debug/include/carla/sensor/RawData.h:10,
warning:                  from /workspace/carla-rust/target/debug/build/carla-bin-4919e105b3e9917c/out/prebuild/0.3.0.x86_64-unknown-linux-gnu.debug/include/carla/sensor/SensorData.h:11,
warning:                  from /workspace/carla-rust/carla-sys/csrc/carla_rust/client/listen_callback.hpp:4,
warning:                  from /workspace/carla-rust/carla-sys/csrc/carla_rust/client/mod.hpp:3,
warning:                  from /workspace/carla-rust/carla-sys/csrc/carla_rust/mod.hpp:3,
warning:                  from /workspace/carla-rust/carla-sys/csrc/carla_rust.hpp:3,
warning:                  from /workspace/carla-rust/target/debug/build/carla-sys-191a1f6294b8b23d/out/autocxx-build-dir/cxx/gen0.cxx:1:
warning: /workspace/carla-rust/target/debug/build/carla-bin-4919e105b3e9917c/out/prebuild/0.3.0.x86_64-unknown-linux-gnu.debug/include/rpc/msgpack/v1/object.hpp: In function 'void clmdep_msgpack::v1::operator<<(clmdep_msgpack::v2::object&, const msgpack_object&)':
warning: /workspace/carla-rust/target/debug/build/carla-bin-4919e105b3e9917c/out/prebuild/0.3.0.x86_64-unknown-linux-gnu.debug/include/rpc/msgpack/v1/object.hpp:656:16: warning: 'void* memcpy(void*, const void*, size_t)' copying an object of non-trivial type 'struct clmdep_msgpack::v2::object' from an array of 'const msgpack_object' {aka 'const struct msgpack_object'} [-Wclass-memaccess]
warning:   656 |     std::memcpy(&o, &v, sizeof(v));
warning:       |     ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~
warning: In file included from /workspace/carla-rust/target/debug/build/carla-bin-4919e105b3e9917c/out/prebuild/0.3.0.x86_64-unknown-linux-gnu.debug/include/rpc/msgpack/object_fwd.hpp:17,
warning:                  from /workspace/carla-rust/target/debug/build/carla-bin-4919e105b3e9917c/out/prebuild/0.3.0.x86_64-unknown-linux-gnu.debug/include/rpc/msgpack/v1/adaptor/adaptor_base_decl.hpp:14,
warning:                  from /workspace/carla-rust/target/debug/build/carla-bin-4919e105b3e9917c/out/prebuild/0.3.0.x86_64-unknown-linux-gnu.debug/include/rpc/msgpack/adaptor/adaptor_base_decl.hpp:13,
warning:                  from /workspace/carla-rust/target/debug/build/carla-bin-4919e105b3e9917c/out/prebuild/0.3.0.x86_64-unknown-linux-gnu.debug/include/rpc/msgpack/adaptor/adaptor_base.hpp:13,
warning:                  from /workspace/carla-rust/target/debug/build/carla-bin-4919e105b3e9917c/out/prebuild/0.3.0.x86_64-unknown-linux-gnu.debug/include/rpc/msgpack/v1/object_decl.hpp:16,
warning:                  from /workspace/carla-rust/target/debug/build/carla-bin-4919e105b3e9917c/out/prebuild/0.3.0.x86_64-unknown-linux-gnu.debug/include/rpc/msgpack/object_decl.hpp:14,
warning:                  from /workspace/carla-rust/target/debug/build/carla-bin-4919e105b3e9917c/out/prebuild/0.3.0.x86_64-unknown-linux-gnu.debug/include/rpc/msgpack/object.hpp:13,
warning:                  from /workspace/carla-rust/target/debug/build/carla-bin-4919e105b3e9917c/out/prebuild/0.3.0.x86_64-unknown-linux-gnu.debug/include/rpc/msgpack.hpp:23,
warning:                  from /workspace/carla-rust/target/debug/build/carla-bin-4919e105b3e9917c/out/prebuild/0.3.0.x86_64-unknown-linux-gnu.debug/include/carla/MsgPack.h:11,
warning:                  from /workspace/carla-rust/target/debug/build/carla-bin-4919e105b3e9917c/out/prebuild/0.3.0.x86_64-unknown-linux-gnu.debug/include/carla/geom/Transform.h:9,
warning:                  from /workspace/carla-rust/target/debug/build/carla-bin-4919e105b3e9917c/out/prebuild/0.3.0.x86_64-unknown-linux-gnu.debug/include/carla/rpc/Transform.h:9,
warning:                  from /workspace/carla-rust/target/debug/build/carla-bin-4919e105b3e9917c/out/prebuild/0.3.0.x86_64-unknown-linux-gnu.debug/include/carla/sensor/s11n/SensorHeaderSerializer.h:10,
warning:                  from /workspace/carla-rust/target/debug/build/carla-bin-4919e105b3e9917c/out/prebuild/0.3.0.x86_64-unknown-linux-gnu.debug/include/carla/sensor/RawData.h:10,
warning:                  from /workspace/carla-rust/target/debug/build/carla-bin-4919e105b3e9917c/out/prebuild/0.3.0.x86_64-unknown-linux-gnu.debug/include/carla/sensor/SensorData.h:11,
warning:                  from /workspace/carla-rust/carla-sys/csrc/carla_rust/client/listen_callback.hpp:4,
warning:                  from /workspace/carla-rust/carla-sys/csrc/carla_rust/client/mod.hpp:3,
warning:                  from /workspace/carla-rust/carla-sys/csrc/carla_rust/mod.hpp:3,
warning:                  from /workspace/carla-rust/carla-sys/csrc/carla_rust.hpp:3,
warning:                  from /workspace/carla-rust/target/debug/build/carla-sys-191a1f6294b8b23d/out/autocxx-build-dir/cxx/gen0.cxx:1:
warning: /workspace/carla-rust/target/debug/build/carla-bin-4919e105b3e9917c/out/prebuild/0.3.0.x86_64-unknown-linux-gnu.debug/include/rpc/msgpack/v2/object_fwd.hpp:23:8: note: 'struct clmdep_msgpack::v2::object' declared here
warning:    23 | struct object : v1::object {
warning:       |        ^~~~~~
warning: In file included from /workspace/carla-rust/carla-sys/csrc/carla_rust/client/environment_object_list.hpp:8,
warning:                  from /workspace/carla-rust/carla-sys/csrc/carla_rust/client/world.hpp:25,
warning:                  from /workspace/carla-rust/carla-sys/csrc/carla_rust/client/mod.hpp:13,
warning:                  from /workspace/carla-rust/carla-sys/csrc/carla_rust/mod.hpp:3,
warning:                  from /workspace/carla-rust/carla-sys/csrc/carla_rust.hpp:3,
warning:                  from /workspace/carla-rust/target/debug/build/carla-sys-191a1f6294b8b23d/out/autocxx-build-dir/cxx/gen0.cxx:1:
warning: /workspace/carla-rust/carla-sys/csrc/carla_rust/rpc/environment_object.hpp: In member function 'const carla_rust::geom::FfiTransform& carla_rust::rpc::FfiEnvironmentObjectRef::transform() const':
warning: /workspace/carla-rust/carla-sys/csrc/carla_rust/rpc/environment_object.hpp:27:24: warning: returning reference to temporary [-Wreturn-local-addr]
warning:    27 |                 return static_cast<const FfiTransform&>(orig);
warning:       |                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
warning: /workspace/carla-rust/carla-sys/csrc/carla_rust/rpc/environment_object.hpp: In member function 'const carla_rust::geom::FfiBoundingBox& carla_rust::rpc::FfiEnvironmentObjectRef::bounding_box() const':
warning: /workspace/carla-rust/carla-sys/csrc/carla_rust/rpc/environment_object.hpp:32:24: warning: returning reference to temporary [-Wreturn-local-addr]
warning:    32 |                 return static_cast<const FfiBoundingBox&>(orig);
warning:       |                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   Compiling carla v0.8.0 (/workspace/carla-rust/carla)
error[E0599]: no method named `GetLightGroup` found for struct `cxx::UniquePtr<FfiLightRef>` in the current scope
  --> carla/src/client/light.rs:39:20
   |
39 |         self.inner.GetLightGroup()
   |                    ^^^^^^^^^^^^^ method not found in `UniquePtr<FfiLightRef>`

error[E0599]: no method named `GetLightState` found for struct `cxx::UniquePtr<FfiLightRef>` in the current scope
  --> carla/src/client/light.rs:43:20
   |
43 |         self.inner.GetLightState()
   |                    ^^^^^^^^^^^^^ method not found in `UniquePtr<FfiLightRef>`

error[E0599]: no method named `SetLightGroup` found for struct `Pin<&mut FfiLightRef>` in the current scope
  --> carla/src/client/light.rs:63:30
   |
63 |         self.inner.pin_mut().SetLightGroup(group)
   |                              ^^^^^^^^^^^^^ method not found in `Pin<&mut FfiLightRef>`

error[E0599]: no method named `SetLightState` found for struct `Pin<&mut FfiLightRef>` in the current scope
  --> carla/src/client/light.rs:67:30
   |
67 |         self.inner.pin_mut().SetLightState(state);
   |                              ^^^^^^^^^^^^^ method not found in `Pin<&mut FfiLightRef>`

error[E0599]: no method named `GetAllLights` found for struct `cxx::SharedPtr<FfiLightManager>` in the current scope
  --> carla/src/client/light_manager.rs:21:31
   |
21 |         let list = self.inner.GetAllLights(group).within_unique_ptr();
   |                               ^^^^^^^^^^^^ method not found in `SharedPtr<FfiLightManager>`

error[E0599]: no method named `GetLightState` found for struct `cxx::SharedPtr<FfiLightManager>` in the current scope
  --> carla/src/client/light_manager.rs:34:20
   |
34 |         self.inner.GetLightState(id)
   |                    ^^^^^^^^^^^^^ method not found in `SharedPtr<FfiLightManager>`

error[E0599]: no method named `GetLightGroup` found for struct `cxx::SharedPtr<FfiLightManager>` in the current scope
  --> carla/src/client/light_manager.rs:38:20
   |
38 |         self.inner.GetLightGroup(id)
   |                    ^^^^^^^^^^^^^ method not found in `SharedPtr<FfiLightManager>`

error[E0599]: no method named `SetLightState` found for struct `cxx::SharedPtr<FfiLightManager>` in the current scope
  --> carla/src/client/light_manager.rs:58:20
   |
58 |         self.inner.SetLightState(id, state);
   |                    ^^^^^^^^^^^^^ method not found in `SharedPtr<FfiLightManager>`

error[E0599]: no method named `SetLightGroup` found for struct `cxx::SharedPtr<FfiLightManager>` in the current scope
  --> carla/src/client/light_manager.rs:62:20
   |
62 |         self.inner.SetLightGroup(id, group);
   |                    ^^^^^^^^^^^^^ method not found in `SharedPtr<FfiLightManager>`

warning: unused import: `autocxx::WithinUniquePtr`
 --> carla/src/client/light_manager.rs:6:5
  |
6 | use autocxx::WithinUniquePtr;
  |     ^^^^^^^^^^^^^^^^^^^^^^^^
  |
  = note: `#[warn(unused_imports)]` on by default

For more information about this error, try `rustc --explain E0599`.
warning: `carla` (lib) generated 1 warning
error: could not compile `carla` due to 9 previous errors; 1 warning emitted
warning: build failed, waiting for other jobs to finish...

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.