Errors bringup controller

Hi!

I try to run the moveit demo on the physical stretch robot. First I launch the driver by roslaunch stretch_core stretch_driver.launch.

Then, when I try to launch the move_group by roslaunch stretch_moveit_config move_group.launch, I encountered the following errors.

Planning scene monitors started.
[ INFO] [1641683702.236773300]: Initializing OMPL interface using ROS parameters
[ INFO] [1641683702.283570072]: Using planning interface 'OMPL'
[ INFO] [1641683702.285736944]: Param 'default_workspace_bounds' was not set. Using default value: 10
[ INFO] [1641683702.286201288]: Param 'start_state_max_bounds_error' was set to 0.1
[ INFO] [1641683702.286612740]: Param 'start_state_max_dt' was not set. Using default value: 0.5
[ INFO] [1641683702.287012978]: Param 'start_state_max_dt' was not set. Using default value: 0.5
[ INFO] [1641683702.287402563]: Param 'jiggle_fraction' was set to 0.05
[ INFO] [1641683702.287776331]: Param 'max_sampling_attempts' was not set. Using default value: 100
[ INFO] [1641683702.287810719]: Using planning request adapter 'Add Time Parameterization'
[ INFO] [1641683702.287825706]: Using planning request adapter 'Fix Workspace Bounds'
[ INFO] [1641683702.287837909]: Using planning request adapter 'Fix Start State Bounds'
[ INFO] [1641683702.287849568]: Using planning request adapter 'Fix Start State In Collision'
[ INFO] [1641683702.287861173]: Using planning request adapter 'Fix Start State Path Constraints'
[ WARN] [1641683707.305022635]: Waiting for stretch_arm_controller/follow_joint_trajectory to come up
[ WARN] [1641683713.305151055]: Waiting for stretch_arm_controller/follow_joint_trajectory to come up
[ERROR] [1641683719.305332078]: Action client not connected: stretch_arm_controller/follow_joint_trajectory
[ WARN] [1641683724.321231543]: Waiting for stretch_head_controller/follow_joint_trajectory to come up
[ WARN] [1641683730.321433430]: Waiting for stretch_head_controller/follow_joint_trajectory to come up
[ERROR] [1641683736.321629237]: Action client not connected: stretch_head_controller/follow_joint_trajectory
[ WARN] [1641683741.342757937]: Waiting for stretch_gripper_controller/follow_joint_trajectory to come up
[ WARN] [1641683747.342941041]: Waiting for stretch_gripper_controller/follow_joint_trajectory to come up
[ERROR] [1641683753.343098326]: Action client not connected: stretch_gripper_controller/follow_joint_trajectory
[ INFO] [1641683753.352080162]: Returned 0 controllers in list

Thanks a lot!

Hello @lihongyu0807, welcome to the community! I’m sorry you haven’t received a quick response; I had been sick last week.

The ROS1 stretch_moveit_config package only supports running MoveIt1 on a simulated robot. We had incorrect documentation stating otherwise (I’ve corrected the documentation now). We had originally planned to support it on a physical robot, but switched to supporting MoveIt2 instead because MoveIt2 can plan for the whole robot (including the mobile base), whereas MoveIt1 does not have this ability.

We demonstrated using MoveIt2 in our talk/tutorial at ROS World 2021. However, since this code is experimental, it is not shipping by default with Stretch yet and its documentation is incomplete. If you’d like to experiment with MoveIt2 and Stretch, please let me know and I’d be happy to put together an installation and usage guide for you.

1 Like

I’m sorry to hear that you were sick last week. I hope you are feeling better now. Could you please send me some tutorials/documentation on how to deploy Moveit2 on the actual hardware? We are looking forward to utilizing those Moveit capabilities on the actual stretch robot. Thanks a lot.

Thank you @lihongyu0807, feeling much better now. Below, I’ve put together an installation and usage guide that will enable you to work with MoveIt2 on Stretch. Please note that the software and this guide are under active development and are subject to change as we mature the support for MoveIt2 and supporting software. Please proceed with caution.

Installation

By default, Stretch RE1 ships with Ubuntu 18.04, ROS Melodic, and Python2 packages. These steps will install a second operating system with Ubuntu 20.04, ROS Noetic, ROS2 Galactic (where MoveIt2 is supported), and Python3 packages.

  1. A new firmware called protocol 1 (p1) for Stretch adds support for spline trajectories, a feature used by MoveIt2. Use the firmware update guide to install the new firmware.

  2. Use the Noetic installation instructions. Following the guide will create the second Ubuntu 20.04 partition, and create a ROS2 Galactic workspace with MoveIt2 installed.

  3. Boot into the new Ubuntu 20.04 partition, and edit the last few lines of the ~/.bashrc file to comment out sourcing of Noetic workspaces. When both versions of ROS are sourced, package conflicts arise. The result should look like:

    #source /opt/ros/noetic/setup.bash
    source /opt/ros/galactic/setup.bash
    #source ~/catkin_ws/devel/setup.bash
    source ~/ament_ws/install/setup.bash
    
  4. In a new terminal, collect all of the packages to build from source. Use the command below to automate collection of these packages. The stretch_ros2.repos file can be downloaded from here.

    cd ~/ament_ws/src
    vcs import < stretch_ros2.repos
    
  5. If your robot has the Dex Wrist attached, follow the configuration guide to set up the Dex Wrist to work with Stretch Body. Then change to the “feature/dexwrist_trajs” branch within Stretch ROS2 using the following command.

    cd ~/ament_ws/src/stretch_ros2
    git checkout feature/dexwrist_trajs
    
  6. Build the workspace using these commands.

    cd ~/ament_ws/src
    rosdep install --from-paths src --ignore-src -r --rosdistro galactic -y
    colcon build
    source ~/ament_ws/install/setup.bash
    

Usage

ros2 launch stretch_moveit_config moveit2.launch.py

Launching the moveit2.launch.py launch file brings up everything needed to plan motion plans for Stretch using MoveIt2 and execute them on the actual hardware. A Rviz window with the the MoveIt2 Motion Planning plugin is brought up to make planning and executing easy to experiment with.

Remote Rviz

Since these motion plans involve the mobile base, it is difficult to have cables attached to the robot’s truck. In particular, the monitor connected to the robot via a HDMI cable might need to be disconnected. Therefore, we might desire the Rviz window to open on a different computer. Fortunately, ROS2 is designed with networking in mind, and makes this easy. With another computer that has ROS2 and the same ~/ament_ws installed/built, you can execute the following two commands.

On robot

ros2 launch stretch_core stretch_driver.launch.py mode:=manipulation broadcast_odom_tf:=True

On computer

ros2 launch stretch_moveit_config moveit2.launch.py use_stretch_driver:=false

API Reference

Finally, to interact with MoveIt2 programmatically, only the C++ API described in the MoveIt2 documentation is available at the moment. Working through the tutorials/examples in these docs will enable your team to write nodes that interact with MoveIt2.

Please let me know if you have any questions or run into any issues!

1 Like

Hi, I’d like to know the current progress on ROS1 stretch_moveit_config package. In the default source nor in the official hello robot github repository, I couldn’t find the files. Thus, I couldn’t launch moveit_rviz.launch nor any launch files under this package. Where can I get the stretch_moveit_config package? And you mentioned that in ROS1, you can only run MoveIt1 on a simulated robot, does it mean we can run MoveIt2 in an actual hello robot itself? Thank you

Hello @Mustofa, the stretch_moveit_config package was deprecated with our Ubuntu 18.04/ROS1 Melodic distribution. You can find the code on the melodic branch of the Stretch ROS repository, but you would need to downgrade your software stack to the deprecated stack to use it. Also, note that stretch_moveit_config supported running MoveIt1 only on a Gazebo simulated robot, not the real robot.

Regarding MoveIt2: Yes, you can run the plans/trajectories it’s generating on the real robot. Details available here.