Skip to content

ROS2 moveit example for quickly learning it. Ubuntu 22, humble.

Notifications You must be signed in to change notification settings

greatcattw/ROS2_moveit_study_note_1

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 

Repository files navigation

ROS2_moveit_study_note_1

ROS2 moveit examples for quickly learning it. Ubuntu 22, humble.
Learning attach/detach, move_group
Must install ROS2 and moveit2 tutorial prior.
pic

dpkg needed

sudo apt-get install ros-humble-moveit-visual-tools
sudo apt-get install ros-humble-moveit-runtime
sudo apt-get install ros-humble-moveit-configs-utils

ex1 : "ros2 run" example, print string

build

cp 01_hello_org/ aaa/ -r
cd aaa/hello_cpp/
colcon build

test

[new terminal]
source install/setup.bash
ros2 run hello_cpp hello_cpp

pic

ex2 : listener and talker

build

cp 02_cpp01_org/ bbb/ -r
cd bbb/cpp01_topic/
colcon build

test

[new terminal]
source install/setup.bash
ros2 run cpp01_topic demo02_listener_str

[new terminal]
source install/setup.bash
ros2 run cpp01_topic demo01_talker_str

pic

pic

ex3 : build [next] button, part of moveit2 tutorial planning_scene_ros_api

build

cp 03_next01_org/ ccc/ -r
cd ccc/next01/
colcon build

test

[new terminal]
cd ~/ws_moveit
source install/setup.bash
ros2 launch moveit2_tutorials move_group.launch.py

[new terminal] source install/setup.bash
ros2 run next01 exe01

press [next] button in RViz window to close program.

pic

pic

ex4 : single build moveit2 tutuorial example of planning_scene_ros_api

build

cp 04_next02_org/ ddd/ -r
cd ddd/next02/
colcon build

test

[new terminal]
cd ~/ws_moveit
source install/setup.bash
ros2 launch moveit2_tutorials move_group.launch.py

[new terminal]
source install/setup.bash
ros2 run next02 exe02

press [next] button in RViz window to run.

pic

ex5 : "ros2 launch" example

build

cp 05_launch03_org/ eee/ -r
cd eee/my_launch_pkg/
colcon build

test

[new terminal]
source install/setup.bash
ros2 launch my_launch_pkg my_node_launch.py

pic

ex6 : build part of move_group_interface

build

cp 06_attach_org/ fff/ -r
cd fff/attach/
colcon build

test

[new terminal]
cd ~/ws_moveit
source install/setup.bash
ros2 launch moveit2_tutorials move_group.launch.py

[new terminal]
source 1.sh
sh rrr.sh

press [next] button in RViz window to run.

pic

Note : install Moveit2 tutorial

source /opt/ros/humble/setup.bash
printenv ROS_DISTRO //check ROS2 verson
humble

sudo apt install python3-rosdep
sudo rosdep init
rosdep update
sudo apt dist-upgrade
sudo apt install python3-colcon-common-extensions
sudo apt install python3-colcon-mixin
sudo colcon mixin add default https://raw.githubusercontent.com/colcon/colcon-mixin-repository/master/index.yaml
sudo colcon mixin update default
sudo apt install python3-vcstool

mkdir -p ~/ws_moveit/src
cd ~/ws_moveit/src
git clone --branch humble https://github.com/moveit/moveit2_tutorials
vcs import --recursive < moveit2_tutorials/moveit2_tutorials.repos
sudo apt update && rosdep install -r --from-paths . --ignore-src --rosdistro $ROS_DISTRO -y

cd ~/ws_moveit
sudo su //I don't know why need su
colcon build --mixin release --executor sequential

wait a little time

...

test

[new terminal]
cd ~/ws_moveit
source install/setup.bash
ros2 launch moveit2_tutorials demo.launch.py rviz_config:=panda_moveit_config_demo_empty.rviz

About

ROS2 moveit example for quickly learning it. Ubuntu 22, humble.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published