-
Notifications
You must be signed in to change notification settings - Fork 13
Spectro #124
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
Closed
Closed
Spectro #124
Changes from 14 commits
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
8040f92
Added DC Motor HWI
HGardiner1 cabdbc0
Merge remote-tracking branch 'upstream/main' into spectro
HGardiner1 33b1e44
First iteration of HWIs: DC, CCD, Diode, Fixing Laser, CCD Custom Con…
HGardiner1 c3f45f5
Xacro Maintenance Interfaces
HGardiner1 9001b48
HWI Upgrades for CCD, Diode & Laser + Fixes
HGardiner1 b880a67
Merge pull request #3 from HGardiner1/hwi-upgrades
HGardiner1 66e7574
merge upstream/main
HGardiner1 05bf697
CCD Controller Fixes + CCD CANbus flow py script
HGardiner1 b936635
CCD Controller Edits
HGardiner1 d44bfd1
add raman_msgs dependency to ccd_ros2_control, fix ccd controller pix…
HGardiner1 f4a39ce
Merge branch 'main' into spectro
HGardiner1 8a7055b
Build dependency for raman_msgs to prevent colcon error
HGardiner1 2cb06a3
Merge branch 'spectro' of github.com:HGardiner1/athena-code into spectro
HGardiner1 1e59e5a
Modified github workflows to pass colcon build for custom raman msgs
HGardiner1 cc80593
PR Fixes
HGardiner1 9f2eab2
Merge branch 'main' into spectro
HGardiner1 a08659d
Removed raman_msgs pkg from main yaml file
HGardiner1 1ec3e9e
Fix + Pull Changes
HGardiner1 2a9496f
Small package.xml ccd fix
HGardiner1 81d63fa
snake case fix in CCD HWI
HGardiner1 82203ab
Fix CMakeList
HGardiner1 7b394e3
Fix inconsistent naming conventions
HGardiner1 6938590
Added arg can_interfaces to ccd & sensor diode
HGardiner1 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
42 changes: 42 additions & 0 deletions
42
src/description/ros2_control/science/science.ccd.ros2_control.xacro
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,42 @@ | ||
| <?xml version="1.0"?> | ||
| <robot xmlns:xacro="http://www.ros.org/wiki/xacro"> | ||
|
|
||
| <xacro:macro name="ccd_ros2_control" params="name can_interface:=can0"> | ||
|
|
||
| <ros2_control name="${name}" type="system"> | ||
|
|
||
| <hardware> | ||
| <plugin>ccd_ros2_control/CCDHardwareInterface</plugin> | ||
| <param name="can_interface">${can_interface}</param> | ||
| <param name="can_id">0x100</param> | ||
| <param name="update_rate">10</param> <!-- Hz --> | ||
| <param name="logger_rate">5</param> <!-- Hz --> | ||
| <param name="logger_state">0</param> <!-- 0 for off, 1 for on --> | ||
| </hardware> | ||
|
|
||
| <gpio name="${name}"> | ||
| <command_interface name="capture_binary"/> | ||
| <command_interface name="capture_byte"/> | ||
| <command_interface name="status_request"/> | ||
| <command_interface name="maintenance_request"/> | ||
| <command_interface name="maintenance_frame_high"/> | ||
| <command_interface name="maintenance_frame_low"/> | ||
| <command_interface name="maintenance_data_count"/> | ||
|
|
||
|
|
||
| <state_interface name="is_connected"/> | ||
| <state_interface name="command_success"/> | ||
| <state_interface name="acquisition_in_progress"/> | ||
| <state_interface name="data_ready"/> | ||
| <state_interface name="frames_received"/> | ||
| <state_interface name="last_frame_id"/> | ||
| <state_interface name="status"/> | ||
|
|
||
| </gpio> | ||
|
|
||
| </ros2_control> | ||
|
|
||
| </xacro:macro> | ||
|
|
||
| </robot> | ||
|
|
||
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
2 changes: 1 addition & 1 deletion
2
src/description/ros2_control/science/science.laser.ros2_control.xacro
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
17 changes: 17 additions & 0 deletions
17
src/description/ros2_control/science/science.mock_talon.ros2_control.xacro
|
HGardiner1 marked this conversation as resolved.
Outdated
|
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,17 @@ | ||
| <?xml version="1.0" encoding="UTF-8"?> | ||
| <robot xmlns:xacro="http://wiki.ros.org/xacro"> | ||
| <xacro:macro name="mock_talon_ros2_control" params="name"> | ||
| <ros2_control name="${name}" type="system"> | ||
| <hardware> | ||
| <plugin>mock_components/GenericSystem</plugin> | ||
| </hardware> | ||
| <!-- Mirror whatever joints/interfaces your real talon xacro defines --> | ||
| <joint name="talon_joint"> | ||
| <command_interface name="position"/> | ||
| <command_interface name="velocity"/> | ||
| <state_interface name="position"/> | ||
| <state_interface name="velocity"/> | ||
| </joint> | ||
| </ros2_control> | ||
| </xacro:macro> | ||
| </robot> |
36 changes: 36 additions & 0 deletions
36
src/description/ros2_control/science/science.sensor_diode.ros2_control.xacro
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,36 @@ | ||
| <?xml version="1.0"?> | ||
| <robot xmlns:xacro="http://www.ros.org/wiki/xacro"> | ||
|
|
||
| <xacro:macro name="sensor_diode_ros2_control" params="name can_interface:=can0"> | ||
|
|
||
| <ros2_control name="${name}" type="system"> | ||
|
|
||
| <hardware> | ||
| <plugin>sensor_diode_ros2_control/SensorDiodeHardwareInterface</plugin> | ||
| <param name="can_interface">${can_interface}</param> | ||
| <param name="can_id">0x110</param> | ||
| <param name="update_rate">10</param> <!-- Hz --> | ||
| <param name="logger_rate">5</param> <!-- Hz --> | ||
| <param name="logger_state">0</param> <!-- 0 for off, 1 for on --> | ||
| </hardware> | ||
|
|
||
| <gpio name="${name}"> | ||
| <command_interface name="request_measurement"/> | ||
| <command_interface name="status_request"/> | ||
| <command_interface name="maintenance_request"/> | ||
| <command_interface name="maintenance_frame_high"/> | ||
| <command_interface name="maintenance_frame_low"/> | ||
| <command_interface name="maintenance_data_count"/> | ||
|
|
||
| <state_interface name="wavelength_intensity"/> | ||
| <state_interface name="command_success"/> | ||
| <state_interface name="is_connected"/> | ||
| <state_interface name="status"/> | ||
| </gpio> | ||
|
|
||
| </ros2_control> | ||
|
|
||
| </xacro:macro> | ||
|
|
||
| </robot> | ||
|
|
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 |
|---|---|---|
| @@ -0,0 +1,84 @@ | ||
| cmake_minimum_required(VERSION 3.8) | ||
| project(ccd_ros2_control) | ||
|
|
||
| if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang") | ||
| add_compile_options(-Wall -Wextra -Wpedantic) | ||
| endif() | ||
|
|
||
| set(THIS_PACKAGE_INCLUDE_DEPENDS | ||
| hardware_interface | ||
| pluginlib | ||
| rclcpp | ||
| rclcpp_lifecycle | ||
| umdloop_can_library | ||
| realtime_tools | ||
| msgs | ||
| ) | ||
|
|
||
| # find dependencies | ||
| find_package(ament_cmake REQUIRED) | ||
| find_package(ament_cmake_auto REQUIRED) | ||
| find_package(raman_msgs REQUIRED) | ||
| foreach(Dependency IN ITEMS ${THIS_PACKAGE_INCLUDE_DEPENDS}) | ||
| find_package(${Dependency} REQUIRED) | ||
| endforeach() | ||
|
|
||
| ament_export_dependencies(rosidl_default_runtime) | ||
|
|
||
| ament_auto_find_build_dependencies() | ||
|
|
||
| include_directories(include) | ||
|
|
||
| add_library( | ||
| ccd_ros2_control | ||
| SHARED | ||
| src/ccd_hardware_interface.cpp | ||
| ) | ||
|
|
||
| target_compile_features(ccd_ros2_control PUBLIC cxx_std_20) | ||
| target_include_directories(ccd_ros2_control PUBLIC | ||
| $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/include> | ||
| $<INSTALL_INTERFACE:include/ccd_ros2_control> | ||
| ) | ||
|
|
||
| # Link CAN library | ||
| target_link_libraries(ccd_ros2_control PUBLIC umdloop_can_library::umdloop_can_library) | ||
|
|
||
| ament_target_dependencies( | ||
| ccd_ros2_control PUBLIC | ||
| hardware_interface | ||
| pluginlib | ||
| rclcpp | ||
| rclcpp_lifecycle | ||
| realtime_tools | ||
| msgs | ||
| raman_msgs | ||
| ) | ||
|
|
||
| # Export hardware plugins | ||
| pluginlib_export_plugin_description_file(hardware_interface ccd_hardware_interface.xml) | ||
|
|
||
| # INSTALL | ||
| install( | ||
| DIRECTORY include/ | ||
| DESTINATION include/ccd_ros2_control | ||
| ) | ||
|
|
||
| install(TARGETS ccd_ros2_control | ||
| EXPORT export_ccd_ros2_control | ||
| ARCHIVE DESTINATION lib | ||
| LIBRARY DESTINATION lib | ||
| RUNTIME DESTINATION bin | ||
| ) | ||
|
|
||
| if(BUILD_TESTING) | ||
| find_package(ament_lint_auto REQUIRED) | ||
| set(ament_cmake_copyright_FOUND TRUE) | ||
| set(ament_cmake_cpplint_FOUND TRUE) | ||
| ament_lint_auto_find_test_dependencies() | ||
| endif() | ||
|
|
||
| ament_export_targets(export_ccd_ros2_control) | ||
| ament_export_include_directories(include) | ||
| ament_export_dependencies(${THIS_PACKAGE_INCLUDE_DEPENDS}) | ||
| ament_package() |
9 changes: 9 additions & 0 deletions
9
src/hardware_interfaces/ccd_ros2_control/ccd_hardware_interface.xml
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,9 @@ | ||
| <library path="ccd_ros2_control"> | ||
| <class name="ccd_ros2_control/CCDHardwareInterface" | ||
| type="ccd_ros2_control::CCDHardwareInterface" | ||
| base_class_type="hardware_interface::SystemInterface"> | ||
| <description> | ||
| Hardware interface for spectrometry ccd control via ros2_control. | ||
| </description> | ||
| </class> | ||
| </library> |
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.