Giter Club home page Giter Club logo

manipulator_tutorial's Introduction

sudo apt-get install ros-$ROS_DISTRO-joint-state-publisher-*
sudo apt-get install ros-humble-xacro 
sudo apt-get install ros-humble-gazebo-ros
sudo apt-get install ros-humble-ros2-control
sudo apt-get install ros-humble-ros2-controllers
sudo apt-get install ros-humble-gazebo-ros2-control
sudo apt-get install ros-humble-moveit

DDS

Secure and reliable communications

![[Pasted image 20240312144842.png]]

URDF

ros2 launch urdf_tutorial display.launch.py model:=/full_path/bot.urdf.xacro 

Parameters

ros2 param set <node_name> <param_name> <value>
ros2 run <node_name> --ros-args -p <param_name>:=value>

Visualization

πŸ’€βš‘NOTE: Always source the workspace before do anything, this help with the autocompletion of topics, params, nodes, etc... also help to find the packages created in the workspace

Terminal 1

ros2 run robot_state_publisher robot_state_publisher  --ros-args -p robot_description:="$(xacro </path/model/of/urdf.xacro>)"

Terminal 2

ros2 run joint_state_publisher_gui joint_state_publisher_gui

Terminal 3

ros2 run rviz2 rviz2 

Launch

from launch_ros.actions import Node
from launch.actions import DeclareLaunchArgument
from launch_ros.parameter_descriptions import ParameterValue
from launch import LaunchDescription
from launch.substitutions import Command, LaunchConfiguration
import os
from ament_index_python.packages import get_package_share_directory
import shlex


def generate_launch_description():
    model_arg = DeclareLaunchArgument(
        name="model",
        default_value=os.path.join(
            get_package_share_directory("robot_description"),
            "urdf/bot.urdf.xacro",
        ),
        description="Absolute path to the urdf file",
    )

    robot_description: ParameterValue = ParameterValue(
        Command(["xacro ", LaunchConfiguration("model")])
    )

    joint_state_publisher: Node = Node(
        package="joint_state_publisher",
        executable="joint_state_publisher",
        parameters=[{"robot_description": robot_description}],
        name="robot_state_publisher",
    )

    joint_state_publisher_gui: Node = Node(
        package="joint_state_publisher_gui",
        executable="joint_state_publisher_gui",
    )

    rviz_node: Node = Node(
        executable="rviz2",
        package="rviz2",
        arguments=[
            "-d",
            os.path.join(
                get_package_share_directory("robot_description"),
                "rviz",
                "display.rviz",
            ),
        ],
        name="rviz2",
        output="screen",
    )

    return LaunchDescription(
        [model_arg, joint_state_publisher, joint_state_publisher_gui, rviz_node]
    )

ROS2 Control

MoveIt2

manipulator_tutorial's People

Contributors

aleamar264 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.