-
Notifications
You must be signed in to change notification settings - Fork 189
Crystal and more #3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 29 commits
Commits
Show all changes
34 commits
Select commit
Hold shift + click to select a range
a16336e
nested messages working
lelongg 52329a3
fix array support
lelongg 0afd8b3
add rcl_sys
lelongg 711e557
add author & fix compilation order
lelongg 7664286
readme
lelongg ce221b2
format
lelongg a890b6b
fix clippy warnings
lelongg 811b718
delete patch
lelongg 4212c5d
remove leftover build.rs
lelongg 9d28b9a
fix authors
lelongg ee61486
add qos support
lelongg 17fb7d0
add spin & change handle handling
lelongg 6805c7e
clippy
lelongg a4a35a2
edit readme
lelongg d9af4d3
Update README.md
lelongg 262924e
fix message generation issue
lelongg 9b2b172
remove messages
lelongg 270d344
fix fixed size nested array issue
lelongg 7fe7ce8
delete unused files
lelongg 8e88968
reset authors
lelongg 4e0da9f
remove rcl_sys
lelongg 3ac2be1
remove remaining authors & revert readme
lelongg b4338cf
fix quickstart
lelongg 0d49823
fix fixed size array warning
lelongg a13bc91
add rosidl_defaults to repos
lelongg 30c2043
fix warnings with array generation
lelongg fb3efd8
register the 'rosidl_generator_rs'
christianrauch 0b2ee43
Merge pull request #1 from christianrauch/register_gen
lelongg 4a6683e
revert message generation to its initial state
lelongg 3f3a205
add rcl build dependency to rclrs
lelongg f657ce1
move spin and spin_once from Node to rclrs
lelongg c55dd16
move publisher sleep at the end of the loop
lelongg df7befc
re-add msg to rosidl_generator_rs
lelongg 5589047
add TODO for publisher and subscription lifetime
lelongg File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,72 +1,27 @@ | ||
| cmake_minimum_required(VERSION 3.5) | ||
| project(rclrs NONE) | ||
|
|
||
| project(rclrs C) | ||
|
|
||
| find_package(ament_cmake_ros REQUIRED) | ||
| find_package(ament_cmake REQUIRED) | ||
| find_package(ament_cmake_export_crates REQUIRED) | ||
| find_package(rcl REQUIRED) | ||
| find_package(rcl_interfaces REQUIRED) | ||
| find_package(rclrs_common REQUIRED) | ||
| find_package(rmw REQUIRED) | ||
| find_package(rmw_implementation REQUIRED) | ||
| find_package(rmw_implementation_cmake REQUIRED) | ||
| find_package(rosidl_generator_c REQUIRED) | ||
|
|
||
| set(${PROJECT_NAME}_SRCS | ||
| "src/c/rclrs.c" | ||
| ) | ||
|
|
||
| set(CMAKE_C_STANDARD 11) | ||
|
|
||
| add_library(${PROJECT_NAME} | ||
| ${${PROJECT_NAME}_SRCS}) | ||
| foreach(_crate_dependency ${rclrs_common_CRATES}) | ||
| set(_crates_dependencies "${_crates_dependencies}\n[dependencies.rclrs_common]\npath = '${_crate_dependency}'\n") | ||
| endforeach() | ||
|
|
||
| ament_target_dependencies(${PROJECT_NAME} | ||
| "builtin_interfaces" | ||
| "rcl" | ||
| "rosidl_generator_c" | ||
| "rosidl_typesupport_c") | ||
| file(COPY "${CMAKE_SOURCE_DIR}/Cargo.toml" DESTINATION "${CMAKE_BINARY_DIR}/") | ||
| file(APPEND "${CMAKE_BINARY_DIR}/Cargo.toml" "${_crates_dependencies}") | ||
|
|
||
| install( | ||
| TARGETS ${PROJECT_NAME} | ||
| ARCHIVE DESTINATION lib | ||
| LIBRARY DESTINATION lib | ||
| RUNTIME DESTINATION bin | ||
| ) | ||
|
|
||
| configure_file( | ||
| "src/rust/Cargo.toml.in" | ||
| "share/${PROJECT_NAME}/rust/Cargo.toml" | ||
| @ONLY | ||
| ) | ||
|
|
||
| install( | ||
| FILES "${CMAKE_CURRENT_BINARY_DIR}/share/${PROJECT_NAME}/rust/Cargo.toml" | ||
| FILES ${CMAKE_BINARY_DIR}/Cargo.toml build.rs src/rcl_wrapper.h | ||
| DESTINATION share/${PROJECT_NAME}/rust/ | ||
| ) | ||
|
|
||
| install( | ||
| DIRECTORY src/rust/src/ | ||
| DIRECTORY src/ | ||
| DESTINATION share/${PROJECT_NAME}/rust/src | ||
| ) | ||
|
|
||
| install( | ||
| DIRECTORY src/rust/src/ | ||
| DESTINATION share/${PROJECT_NAME}/rust/src | ||
| ) | ||
|
|
||
| ament_export_dependencies(ament_cmake_ros) | ||
| ament_export_dependencies(builtin_interfaces) | ||
| ament_export_dependencies(rcl) | ||
| ament_export_dependencies(rosidl_generator_c) | ||
| ament_export_dependencies(rosidl_typesupport_c) | ||
|
|
||
| ament_export_libraries(${PROJECT_NAME}) | ||
| ament_export_crates("share/${PROJECT_NAME}/rust/") | ||
|
|
||
| if(BUILD_TESTING) | ||
| find_package(ament_lint_auto REQUIRED) | ||
| ament_lint_auto_find_test_dependencies() | ||
| endif() | ||
| ament_export_crates("share/${PROJECT_NAME}/rust") | ||
|
|
||
| ament_package() | ||
| ament_package() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,7 +2,11 @@ | |
| name = "rclrs" | ||
| version = "0.1.0" | ||
| authors = ["Esteve Fernandez <[email protected]>"] | ||
| edition = "2018" | ||
|
|
||
| [dependencies] | ||
| libc = "0.2" | ||
| rclrs_common = { path = '@rclrs_common_CRATES@' } | ||
| libc = "0.2.43" | ||
| failure = "0.1.5" | ||
|
|
||
| [build-dependencies] | ||
| bindgen = "0.45.0" | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,34 @@ | ||
| extern crate bindgen; | ||
|
|
||
| use std::env; | ||
| use std::path::PathBuf; | ||
|
|
||
| fn main() { | ||
| let mut builder = bindgen::Builder::default() | ||
| .header("src/rcl_wrapper.h") | ||
| .derive_copy(false) | ||
| .default_enum_style(bindgen::EnumVariation::Rust); | ||
|
|
||
| let ament_prefix_var_name = "AMENT_PREFIX_PATH"; | ||
| let ament_prefix_var = env::var(ament_prefix_var_name); | ||
|
|
||
| if let Ok(ament_prefix_paths) = ament_prefix_var { | ||
| for ament_prefix_path in ament_prefix_paths.split(":") { | ||
| builder = builder.clang_arg(format!("-I{}/include", ament_prefix_path)); | ||
| println!("cargo:rustc-link-search=native={}/lib", ament_prefix_path); | ||
| } | ||
| } | ||
|
|
||
| println!("cargo:rustc-link-lib=dylib=rcl"); | ||
| println!("cargo:rustc-link-lib=dylib=rcl_logging_noop"); | ||
| println!("cargo:rustc-link-lib=dylib=rcutils"); | ||
| println!("cargo:rustc-link-lib=dylib=rmw"); | ||
| println!("cargo:rustc-link-lib=dylib=rmw_implementation"); | ||
|
|
||
| let bindings = builder.generate().expect("Unable to generate bindings"); | ||
|
|
||
| let out_path = PathBuf::from(env::var("OUT_DIR").unwrap()); | ||
| bindings | ||
| .write_to_file(out_path.join("rcl_bindings.rs")) | ||
| .expect("Couldn't write bindings!"); | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -7,49 +7,12 @@ | |
| <maintainer email="[email protected]">Esteve Fernandez</maintainer> | ||
| <license>Apache License 2.0</license> | ||
|
|
||
| <buildtool_depend>ament_cmake_ros</buildtool_depend> | ||
| <buildtool_depend>ament_cmake</buildtool_depend> | ||
| <buildtool_depend>ament_cmake_export_crates</buildtool_depend> | ||
| <buildtool_depend>rclrs_common</buildtool_depend> | ||
|
|
||
| <buildtool_export_depend>ament_cmake_ros</buildtool_export_depend> | ||
| <buildtool_export_depend>ament_cmake_export_crates</buildtool_export_depend> | ||
| <buildtool_export_depend>rclrs_common</buildtool_export_depend> | ||
|
|
||
| <build_depend>builtin_interfaces</build_depend> | ||
| <build_depend>rcl_interfaces</build_depend> | ||
| <build_depend>rcl</build_depend> | ||
| <build_depend>rmw_implementation_cmake</build_depend> | ||
| <build_depend>rmw</build_depend> | ||
| <build_depend>rosidl_generator_c</build_depend> | ||
| <build_depend>rosidl_typesupport_c</build_depend> | ||
| <build_depend>rosidl_typesupport_rs</build_depend> | ||
| <build_export_depend>builtin_interfaces</build_export_depend> | ||
| <build_export_depend>rcl_interfaces</build_export_depend> | ||
| <build_export_depend>rmw</build_export_depend> | ||
| <build_export_depend>rosidl_generator_c</build_export_depend> | ||
| <build_export_depend>rosidl_generator_rs</build_export_depend> | ||
| <build_export_depend>rosidl_typesupport_c</build_export_depend> | ||
|
|
||
| <exec_depend>builtin_interfaces</exec_depend> | ||
| <exec_depend>rcl_interfaces</exec_depend> | ||
| <exec_depend>rcl</exec_depend> | ||
| <exec_depend>rmw_implementation_cmake</exec_depend> | ||
| <exec_depend>rmw_implementation</exec_depend> | ||
| <exec_depend>rosidl_generator_c</exec_depend> | ||
| <exec_depend>rosidl_parser</exec_depend> | ||
|
|
||
| <test_depend>ament_lint_auto</test_depend> | ||
| <test_depend>ament_lint_common</test_depend> | ||
| <test_depend>builtin_interfaces</test_depend> | ||
| <test_depend>rcl_interfaces</test_depend> | ||
| <test_depend>rclrs_common</test_depend> | ||
| <test_depend>rmw_implementation_cmake</test_depend> | ||
| <test_depend>rmw</test_depend> | ||
| <test_depend>rosidl_generator_c</test_depend> | ||
| <test_depend>rosidl_generator_rs</test_depend> | ||
| <test_depend>std_msgs</test_depend> | ||
| <build_depend>rclrs_common</build_depend> | ||
|
|
||
| <export> | ||
| <build_type>ament_cmake</build_type> | ||
| </export> | ||
| </package> | ||
| </package> | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.