Code Usage (example: maze):
- Launch gazebo world
roslaunch unitree_gazebo aliengo_gazebo.launch wname:=smaze2d
- Launch controller
roslaunch aliengo_gait_controller aliengo_gait launch
- Run Rtabmap node Begin rtabmap and record to path "~/nav_ws/src/dog_2D_Nav-sim/rtab_map_testing_pkg/map_save/maze_map.db"
To use it, you should change it to your own path.
roslaunch rtab_map_testing_pkg rtab_map.launch database_path:="~/nav_ws/src/dog_2D_Nav-sim/rtab_map_testing_pkg/map_save/maze_map.db"
- Begin explore or nav. Nav
roslaunch aliengo_2dnav navigation_aliengo.launch
Explore
roslaunch aliengo_2dnav explore_aliengo.launch
original readme
Here are the ROS simulation packages for Unitree AlienGo Quadruped, You can simulate the robot in Gazebo, so you can perform high-level control (Using the Twist message) and the low-level control using the (control the torque, position and angular velocity) of the robot joints.You can also perform navigation using the ROS navigaiton stack using the configuration files built into the following packages.
modified unitree_ros-master packages : robots/aliengo_description
, unitree_controller
,unitree_gazebo
,unitree_legged_control
,unitree_legged_msgs
Realsense_gazebo: realsense2_description
,realsense_gazebo_plugin
gait and navigation related: aliengo_gait_controller
, aliengo_2dnav
Robot data control related: keyboard_control
, depthimage_to_laserscan
SLAM: rtab_map_testing_pkg
For ROS Melodic:
sudo apt-get install ros-melodic-controller-interface ros-melodic-gazebo-ros-control ros-melodic-joint-state-controller ros-melodic-effort-controllers ros-melodic-joint-trajectory-controller
For ROS Kinetic:
sudo apt-get install ros-kinetic-controller-manager ros-kinetic-ros-control ros-kinetic-ros-controllers ros-kinetic-joint-state-controller ros-kinetic-effort-controllers ros-kinetic-velocity-controllers ros-kinetic-position-controllers ros-kinetic-robot-controllers ros-kinetic-robot-state-publisher ros-kinetic-gazebo8-ros ros-kinetic-gazebo8-ros-control ros-kinetic-gazebo8-ros-pkgs ros-kinetic-gazebo8-ros-dev
Then you can use catkin_make to build:
cd ~/catkin_ws
catkin_make
Similarly build the remaining dependencies
You can launch the Gazebo simulation of the aliiengo robot with the following command:
roslaunch unitree_gazebo aliengo_gazebo.launch
After launching the aliengo gazebo simulation, you can start to control the robot:
roslaunch aliengo_gait_controller aliengo_gait.launch
And you can use the keyboard to control the robot after launching:
rosrun keyboard_control teleop_keyboard.py
Use the keyboard keys w,a,s,d to increase the velocity in that perticular direction and use x on the keyboard to stop the robot motion
To launch the RTAB Map localisation node use the command
roslaunch rtab_map_testing_pkg rtab_map.launch
To use the navigation on aliengo simulation run the following command
roslaunch aliengo_2dnav navigation_aliengo.launch
This will open the rviz GUI window which you can use to input the goal point for navigation
Make sure you closed the teleop_keyboard node before starting the navigation It is also possible to create a map of environment without manually controlling the robot using the m-explore package to use it run the follwing (don't run it together with navigation_aliengo as this launch file launches navigation by itself)
roslaunch aliengo_2dnav explore_aliengo.launch