- 
                Notifications
    You must be signed in to change notification settings 
- Fork 300
Hardware interface for sending motion primitives to the robot via the Instruction Executor instead of trajectories #1341
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
          
     Open
      
      
            mathias31415
  wants to merge
  102
  commits into
  UniversalRobots:main
  
    
      
        
          
  
    
      Choose a base branch
      
     
    
      
        
      
      
        
          
          
        
        
          
            
              
              
              
  
           
        
        
          
            
              
              
           
        
       
     
  
        
          
            
          
            
          
        
       
    
      
from
b-robotized-forks:main
  
      
      
   
  
    
  
  
  
 
  
      
    base: main
Could not load branches
            
              
  
    Branch not found: {{ refName }}
  
            
                
      Loading
              
            Could not load tags
            
            
              Nothing to show
            
              
  
            
                
      Loading
              
            Are you sure you want to change the base?
            Some commits from the old base branch may be removed from the timeline,
            and old review comments may become outdated.
          
          Conversation
  
    
      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
    
  
  
    
    …overflow error when launching
…calls (and moved some more code to the helper header)
…tware_version_major_>= 5) in transform_force_torque() since ur_driver_ is not available in the ur_state_helper.hpp
… case to fit the rest of the repo
…31415/ros2_motion_primitives_ur_driver_pkg to the Universal_Robots_ROS2_Driver
… the hardware interface can receive a new motion primitive — replaces the previous, more complex handling via execution_status
…unch.py and added if else for driver_type to load the right ros2_control.xacro file in ur.urdf.xacro
…oupdate Auto-update pre-commit hooks
…motion_primitive/q1)
              
                    urfeex
  
              
              requested changes
              
                  
                    Jul 23, 2025 
                  
              
              
            
            
| @mathias31415 regarding b4f4dec, please let's keep that back for a follow-up PR. | 
…truction_executor_ execution is done
…::array<double, 25>, 1> → therefore changed command and state interfaces from std::vector<double> to std::array<double, 25>.
              
                    urfeex
  
              
              reviewed
              
                  
                    Jul 29, 2025 
                  
              
              
            
            
              
                    urfeex
  
              
              reviewed
              
                  
                    Jul 29, 2025 
                  
              
              
            
            
              
                    urfeex
  
              
              reviewed
              
                  
                    Jul 30, 2025 
                  
              
              
            
            
Co-authored-by: Felix Exner <[email protected]>
…refix is passed as param to moprim forward controller
              
                    urfeex
  
              
              reviewed
              
                  
                    Sep 15, 2025 
                  
              
              
            
            
|  | ||
| - repo: https://github.com/pre-commit/mirrors-clang-format | ||
| rev: 'v20.1.7' | ||
| rev: 'v20.1.8' | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
        Suggested change
      
    | rev: 'v20.1.8' | |
| rev: 'v21.1.0' | 
This has been updated on the main branch in the meantime. Maybe try avoiding to change such auxiliary files in the future to avoid this kind of merge conflicts.
Co-authored-by: Felix Exner <[email protected]>
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment
  
      
  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.
  
    
  
    
This PR extends the
ur_robot_driverpackage with a hardware interface for sending motion primitives to the robot via the Instruction Executor instead of traditional trajectory execution.To reuse the state interface functionalities of the original hardware interface in the new
motion_primitive_ur_driver, these functionalities have been refactored into a shared helper file:stateinterface_helper.hpp.The implementation uses the
motion_primitives_forward_controller, which is planned to be integrated into theros2_controllersrepository. (ros-controls/ros2_controllers#1636)Motion primitives are received by the controller using the
MotionPrimitive.msgfrom theindustrial_robot_motion_interfacespackage. A modified version of this message is used here, which includes additional helper types:STOP_MOTION: Interrupts current robot motion and clears the motion queue.MOTION_SEQUENCE_STARTandMOTION_SEQUENCE_END: Define a sequence block—primitives between these markers are grouped and executed as a single, blended motion sequence. This enables smooth transitions between individual primitives, unlike executing them one by one.This implementation also depends on a pending Pull Request in the
Universal_Robots_Client_Library. This PR extends the Instruction Executor with support formoveccommands, which is required for executing circular Cartesian motions within this driver.I'd appreciate any feedback or suggestions – thanks in advance!