通过moveit和move_base实现的移动操作装置的规划过程,包括了视觉的识别位姿过程,以下是常见的一些配置过程和一些注意事项。

下载源码文件
创建对应的工作空间,得到:
mkdir ~/tiago_public_ws
cd ~/tiago_public_ws
在当前目录下,下载相关功能包
wget https://raw.githubusercontent.com/pal-robotics/tiago_tutorials/noetic-devel/tiago_public-noetic.rosinstall
通过rosinstall下载(需要通过sudo apt install python3-rosinstall安装)
rosinstall src /opt/ros/noetic tiago_public-noetic.rosinstall
在使用rosdep安装依赖之前,我们先通过apt安装一些需要的功能包:
sudo apt install -y ros-noetic-map-server ros-noetic-joy ros-noetic-teb-local-planner ros-noetic-ddynamic-reconfigure ros-noetic-hector-gazebo-plugins ros-noetic-costmap-2d ros-noetic-twist-mux ros-noetic-urdf-geometry-parser ros-noetic-nav-core ros-noetic-people-msgs ros-noetic-pal-* ros-noetic-octomap-server ros-noetic-ira-laser-tools ros-noetic-roboticsgroup-upatras-gazebo-plugins ros-noetic-realsense2-description ros-noetic-usb-cam
sudo apt install -y ros-noetic-pointcloud-to-laserscan ros-noetic-global-planner ros-noetic-sick-tim ros-noetic-libuvc-camera ros-noetic-moveit-simple-controller-manager ros-noetic-four-wheel-steering-msgs ros-noetic-openni2-launch
sudo apt install -y ros-noetic-spatio-temporal-voxel-layer ros-noetic-moveit-ros-visualization ros-noetic-depthimage-to-laserscan ros-noetic-move-base ros-noetic-slam-toolbox
sudo apt install -y ros-noetic-fake-localization ros-noetic-moveit-chomp-optimizer-adapter ros-noetic-amcl ros-noetic-moveit-planners-chomp ros-noetic-pilz-industrial-motion-planner ros-noetic-moveit-planners-ompl
然后是使用rosdep
sudo rosdep init
rosdep update
rosdep install -y --from-paths src --ignore-src --rosdistro noetic --skip-keys "urdf_test omni_drive_controller orocos_kdl pal_filters libgazebo9-dev pal_usb_utils speed_limit_node camera_calibration_files pal_moveit_plugins pal_startup_msgs pal_local_joint_control pal_pcl_points_throttle_and_filter current_limit_controller hokuyo_node dynamixel_cpp pal_moveit_capabilities pal_pcl dynamic_footprint gravity_compensation_controller pal-orbbec-openni2 pal_loc_measure pal_map_manager ydlidar_ros_driver"

最后是编译过程
catkin build -DCATKIN_ENABLE_TESTING=0 -j $(expr `nproc` / 2)

回到github:
https://github.com/KiaRational/Tiago_Object_Manipulation_ROS?tab=readme-ov-file
1下载并解压缩项目文件。
2将 tiago_task 文件夹移动到 catkin 工作区的 tiago_simulation 目录中。
3将预先保存的地图文件夹 room 移动到 $HOME/.pal/tiago_maps/configurations/ 。
4将 room.world 文件放置在 /tiago_public_ws/src/pal_gazebo_worlds/worlds/ 中。
给src下的文件可执行权限;
find ./src -name "*.py" -type f -exec chmod +x {} \;
重新编译
catkin build
注意,在启动之前,需要将插件的动态链接添加到bashrc中:
export GAZEBO_PLUGIN_PATH=$GAZEBO_PLUGIN_PATH:/home/cyun/tiago_public_ws/devel/lib
# 有时还需要更多的内容.
source /opt/ros/noetic/setup.bash
source /usr/share/gazebo-11/setup.bash
export DISABLE_ROS1_EOL_WARNINGS=1
export GAZEBO_MODEL_PATH=$GAZEBO_MODEL_PATH:/home/cyun/Fork_RL/catkin_ws/models
export GAZEBO_MODEL_PATH=$GAZEBO_MODEL_PATH:/home/cyun/tiago_public_ws/src/pal_gazebo_worlds/models
export GAZEBO_PLUGIN_PATH=$GAZEBO_PLUGIN_PATH:/home/cyun/tiago_public_ws/devel/lib
export GAZEBO_PLUGIN_PATH=$GAZEBO_PLUGIN_PATH:/opt/ros/noetic/lib
编译完成之后进行测试
roslaunch tiago_task tiago_navigation.launch public_sim:=true world:=room map:=$HOME/.pal/tiago_maps/configurations/room end_effector:=pal-gripper
roslaunch tiago_task task.launch
后续补充信息
在后续使用时,发现了一些插件的问题,首先是插件版本的不对应,我们需要重新加载它编译过后的插件:
#!/bin/bash
# 标签页1:启动Gazebo
gnome-terminal --tab -t 'Gazebo' -- bash -c "cd /home/cyun/Disk/ubuntu20/tiago_public_ws; source devel/setup.bash && export GAZEBO_PLUGIN_PATH=$GAZEBO_PLUGIN_PATH:/home/cyun/Disk/ubuntu20/tiago_public_ws/devel/lib && roslaunch tiago_test 1tiago_gazebo.launch;"
sleep 5
# 标签页2:加载模型
gnome-terminal --tab -t 'Load Model' -- bash -c "cd /home/cyun/Disk/ubuntu20/tiago_public_ws;source devel/setup.bash && roslaunch tiago_test 2tiago_gazebo.launch; "
sleep 3
# 标签页3:启动控制
gnome-terminal --tab -t 'Control' -- bash -c "cd /home/cyun/Disk/ubuntu20/tiago_public_ws;source devel/setup.bash && roslaunch tiago_test 3tiago_gazebo.launch; "
sleep 3
# 标签页4:启动导航
gnome-terminal --tab -t 'Nav' -- bash -c "cd /home/cyun/Disk/ubuntu20/tiago_public_ws;source devel/setup.bash && roslaunch tiago_test 4tiago_gazebo.launch"
另外一个插件是关于车辆控制的,我们发现定位和控制模块使用时不是通过gazebo本身的定位模块获得的定位,导致gazebo定位异常.
取消了diff_drive_controlller的定位odom和tf的发送
调整了odom的发送频率,解决tf异常时间发布问题.
1150

被折叠的 条评论
为什么被折叠?



