1.Install ROS2_galactic
https://docs.ros.org/en/galactic/Installation/Ubuntu-Install-Debians.html
Use ubuntu20.4 can use this illustration Installing ROS 2 via Debian Packages
attention
you will meet the problem to visit https://raw.githubusercontent.com/ros/rosdistro/master/ros.key
,“can’t connetct”,you can and prefix https://
2.Install Moveit2 !
https://moveit.picknik.ai/galactic/doc/tutorials/getting_started/getting_started.html
this website i used is can be true
attention
1.if you can’t download git clone ,please add that prefixhttps://
2.vcs import < moveit2_tutorials/moveit2_tutorials.repos
this is a big problem
you should find this file called _.repos,and change the website address +prefix like before, and you will meet the next problem You are in ‘detached HEAD
,you should create a new branch (now i don’t know the mean) ,just rungit switch -c <new name >
and run again this code .
3. run this rosdep install -r --from-paths . --ignore-src --rosdistro $ROS_DISTRO -y
code ,you maybe can’t success , you can change the “rosdep” to “rosdepc”,if you don’t install it just visit this websitehttps://zhuanlan.zhihu.com/p/398754989
.
4.the vety difficult thing is coming, run colcon build --mixin release
,i use the “VMware”,so it so slow to finish it and you will meet stop the process,you should rerun this code again and again,finally, you will success
- the official website said the
setuo.sh
insource ~/ws_moveit2/install/setup.bash
,but i am insource ~/ws_moveit2/src/install/setup.bash
,i don’t konw why ,but it’s ok ,we should compile it in our bashrcecho 'source ~/ws_moveit2/src/install/setup.bash' >> ~/.bashrc
6.now,you frist source ros2 and sorce moveit2 ,and runros2 launch moveit2_tutorials demo.launch.py rviz_tutorial:=true
you will success!!!加粗样式