ROS: Moveit

来源:互联网 发布:windows server iscsi 编辑:程序博客网 时间:2024/05/22 07:53

OS: Ubuntu 16.04.02 LTS x64
ROS: Kinetic

  • Moveit Install
  • Moveit Hello World
    • Download the tutorial codes
    • Run Rviz
    • Run a demo
  • Moveit Hello World - Python Interface
    • A Possible Error

Moveit Install

Follow the tutorial would be okay.

sudo apt-get install ros-kinetic-moveit

If you would like to install moveit by source, follow the brief tutorial:
In a new terminal

rosdep updatesudo apt-get updatesudo apt-get dist-upgradesudo apt-get install python-wstool python-catkin-tools clang-format-3.8

Create a new workspace

mkdir -p moveit_ws/srccd moveit_ws/srcwstool init .wstool merge https://raw.githubusercontent.com/ros-planning/moveit/kinetic-devel/moveit.rosinstallwstool updaterosdep install --from-paths . --ignore-src --rosdistro kineticcd ..catkin config --extend /opt/ros/kinetic --cmake-args -DCMAKE_BUILD_TYPE=Releasecatkin_make

Source the Catkin Workspace:

cd ~/moveit_wssource devel/setup.bash

These steps may take dozens of minutes. For the sake of time, we recommend the binary install rather than source install.

Moveit: Hello World

More details can be found here. For simplicity, you can also follow the simple steps.

Download the tutorial codes

Jump to a workspace. Firstly, you ought to git clone the tutorial codes:

https://github.com/ros-planning/moveit_tutorials

Never forget to catkin_make the workspace and source the .bash file.

Run Rviz

Try Rviz

roslaunch pr2_moveit_config demo.launch

Then you can play with it.

Run a demo

Download PR2 configuration files:

git clone https://github.com/PR2/pr2_common.git -b kinetic-develgit clone https://github.com/davetcoleman/pr2_moveit_config.git

This step may take time. Then install dependencies and build:

rosdep install --from-paths . --ignore-src --rosdistro kineticcatkin_make

Run it:

roslaunch pr2_moveit_config demo.launchroslaunch moveit_tutorials move_group_interface_tutorial.launch

Moveit: Hello World - Python Interface

Here is a python demo:

To begin with, make sure your python file is executable:

roscd moveit_tutorials/doc/pr2_tutorials/planning/scripts/chmod +x move_group_python_interface_tutorial.py

Launch and Run:

roslaunch pr2_moveit_config demo.launchrosrun moveit_tutorials move_group_python_interface_tutorial.py

A Possible Error

Once you run move_group_python_interface_tutorial.py, you might encounter an error:
error
This is the due to the version of pyassimp. You can fix it by:

sudo pip uninstall pyassimpsudo pip install pyassimp

If you cannot use pip command, just install it:

sudo apt-get updatesudo apt-get upgradesudo apt-get install python-pippip install --upgrade pip
原创粉丝点击