Coder Social home page Coder Social logo

ma_demos's Introduction

ma_demos

Licence

This package is a collection of all setups used for demonstration purposes for my master thesis.

Overview of demonstrators

  • Two_distributed_rrbots: Consists of three robots. Each robots consists of 3 segments connected by 2 revolt revolution joints. All three robots are controlled by the central controller manager. However two of the rrbots are started in separate namespaces and are managed by a sub controller manager respectively. Those register at the central controller manager.

  • kuka_kr_16: Consist of a basic demonstration of the ros2_control concepts on the kuka kr 16 robot (forward_position_controller and joint_trajectory_controller).

How to use:

If you are just interested how to start the demos themselves have a look below under the quickstart section.

Installation:

  1. Update system:
    sudo apt update
    sudo apt upgrade
    
  2. Install ROS 2 Rolling:
  • a) Either setup a Docker container with Rolling installed using RosTeamWS. If you use this method, don't forget to switch to your docker container before continuing with the rtw_switch_to_docker command.

  • b) Or install ROS 2 Rolling directly on your computer.

  1. Make sure colconand vcs are installed:
    sudo apt install python3-colcon-common-extensions python3-vcstool
    
  2. Setup new workspace (If you used RosTeamWS and docker you can skip this step.):
    mkdir -p ~/workspace/rolling_ws/src  # or go to an existing one
    
  3. Clone this repo:
    cd ~/workspace/rolling_ws/src
    git clone [email protected]:StoglRobotics-forks/ma_demos.git 
    (Or gh repo clone StoglRobotics-forks/ma_demos)
    
  4. Make sure your base workspace is sourced and update dependencies:
    source /opt/ros/rolling/setup.bash # source ws
    rosdep update                      # update dependencies
    
  5. Get the relevant packages and install all additional dependencies:
    cd ~/workspace/rolling_ws/         # or your workspace base direcotry
    vcs import -w 1 src --skip-existing --input src/ma_demos/ma_demos.rolling.repos 
    rosdep install --ignore-src --from-paths src -y -r
    
  6. Finally compile everything:
    colcon build --symlink-install --cmake-args -DCMAKE_BUILD_TYPE=RelWithDebInfo
    

Quickstart:

After you hav successfully built the project you can then start the demos as shown below.

  • Two_distributed_rrbots: Open first terminal and execute:

    ros2 launch two_distributed_rrbots_bringup two_distributed_rrbots.launch.py 
    

    Then open the second terminal and execute:

    ros2 launch two_distributed_rrbots_bringup test_two_distributed_rrbots_forward_position_controller.launch.py
    
  • kuka_kr_16: Open first terminal and execute:

    ros2 launch kuka_kr16_2_bringup kuka_kr16_2.launch.py 
    

    Then open the second terminal and execute:

    ros2 launch kuka_kr16_2_bringup test_kuka_kr16_2_forward_position_controller.launch.py
    

    Or if you want to start the position_trajectory_controller:

    1. Load the controller by executing the following command:
      ros2 control load_controller position_trajectory_controller
      
    2. Configure the newly loaded controller:
      ros2 control set_controller_state position_trajectory_controller inactive 
      
    3. Switch the forward_position_controller and the position_trajectory_controller:
      ros2 control switch_controllers --deactivate forward_position_controller --activate position_trajectory_controller
      
    4. Check that everything is loaded as planned:
      ros2 control list_controllers
      
      Which should print something like this:
      joint_state_broadcaster[joint_state_broadcaster/JointStateBroadcaster] active
      forward_position_controller[forward_command_controller/ForwardCommandController inactive
      position_trajectory_controller[joint_trajectory_controller/JointTrajectoryController] active   
      

    Finally: Start the controller execution with:

    ros2 launch kuka_kr16_2_bringup test_kuka_kr16_2_joint_trajectory_controller.launch.py
    

ma_demos's People

Contributors

mamueluth avatar

Watchers

 avatar

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.