Vatan Aksoy Tezer a7a00f7dea | 3 years ago | |
---|---|---|
.. | ||
config | 3 years ago | |
launch | 3 years ago | |
scripts | 3 years ago | |
urdf | 3 years ago | |
CMakeLists.txt | 3 years ago | |
README.md | 3 years ago | |
package.xml | 3 years ago |
stretch_gazebo is an implementation of simulating a Stretch robot with Gazebo simulator.
The urdf directory contains a xacro file that extends the capabilities of the original xacro files living in stretch_description package to include Gazebo functionality.
The config directory contains rviz files and ros_control controller configuration files for various parts of the robot including:
The launch directory includes two files:
The script directory contains a single python file that publishes ground truth odometry of the robot from Gazebo.
Sensor | Gazebo | Stretch | Notes |
---|---|---|---|
LIDAR | ✔️ | ✔️ | |
Base IMU | ✔️ | ✔️ | |
Wrist Accelerometer | ✔️ | ✔️ | Modeled as an IMU |
Realsense D435i | ✔️ | ✔️ | |
Respeaker (Mic Array) | ❌ | ✔️ | |
Cliff Sensors | ❌ | ✔️ |
Notes: Although there is no microphone in Gazebo, Respeaker can be represented with a ROS node that accesses compputer's microphone. Cliff sensors are not modeled but they can also be represented as 1D LIDAR sensors. See LIDAR definition in stretch_gazebo.urdf.xacro file.
Actuators are defined as ros_control transmission objects in Gazebo using PositionJointInterfaces. Moveit is configured to use three different action servers to control the body parts of stretch in Gazebo through the srdf file in stretch_moveit_config package. See the section below about moveit for details. Please note that this behaviour is different than stretch_core as it works with a single Python interface to control all the joints.
Clone stretch_ros and realsense_gazebo_plugin packages to your catkin workspace. Then install dependencies and build the packages, with the following set of commands:
cd $CATKIN_WS/src
git clone https://github.com/hello-robot/stretch_ros
git clone https://github.com/pal-robotics/realsense_gazebo_plugin
rosdep install -r --from-paths . --ignore-src --rosdistro melodic -y
cd $CATKIN_WS
catkin build
# Terminal 1:
roslaunch stretch_gazebo gazebo.launch rviz:=true
# Terminal 2:
roslaunch stretch_gazebo teleop_joy.launch
This will launch an Rviz instance that visualizes the sensors and an empty world in Gazebo with Stretch and load all the controllers. Although, the base will be able to move with the joystick comamnds, there joystick won't give joint commands to arm, head or gripper. To move these joints see the next section about Running Gazebo with MoveIt! and Stretch.
# Terminal 1:
roslaunch stretch_gazebo gazebo.launch
# Terminal 2:
roslaunch stretch_gazebo teleop_joy.launch
# Terminal 3
roslaunch stretch_moveit_config demo_gazebo.launch
This will launch an Rviz instance that visualizes the joints with markers and an empty world in Gazebo with Stretch and load all the controllers. There are pre-defined positions for each joint group for demonstration purposes. There are three joint groups, namely stretch_arm, stretch_gripper and stretch_head that can be controlled individually via Motion Planning Rviz plugin. Start and goal positions for joints can be selected similar to this moveit tutorial. A few notes to be kept in mind:
For license information, please see the LICENSE files.