Simulation ========== .. image:: media/gifs/go1_gazebo.gif :width: 100% :align: center Unitree GO1 supports two different development environment Gazebo and Webots, with which a virtual robot in the simulation can be programmed for testing in real world virtual evironments. Gazebo are simulated with a fake node and visualization tool RViz is used. The current implementation for Gazebo is working using the opensource `CHAMP <https://github.com/chvmp/champ>`__ drivers. Gazebo support different sensors like IMUs, lidars, cameras and many more. With these simulators and sensors autonomous navigation, slam and other functionalities can be tested. In this instruction, Gazebo will be introduced which is most widely used among ROS developers. Gazebo Tutorials: http://gazebosim.org/tutorials .. note:: In progress .. Gazebo .. ------ .. qre_GO1_gazebo & qre_controller .. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .. `qre_GO1_gazebo` package contains the Gazebo simulation for the GO1 robot. The robot can be teleoperated and can be used further for slam and autonomous navigation. This package is dependent upon `qre_controller` which contains several low level robot controllers `state_estimator, quadruped_controller` and `contact_sensor`. .. To launch `Gazebo` run the following command: .. .. code:: bash .. roslaunch qre_GO1_gazebo gazebo.launch .. This launch file runs all the necessary controllers and accept commands in `cmd_vel(geometry_msgs/Twist)`. The same package `qre_controller` can be used to verify the robot movements in `RVIZ`. To do so run the following command: .. .. code:: bash .. roslaunch qre_GO1_description bringup.launch rviz:=true ll_control:=true .. Now by running any `teleop node` the robot can be controlled. .. .. figure:: media/mbs_gazebo.png .. :width: 100% .. :align: center .. :alt: QuadrupedRoboticsGazebo .. unitree\_gazebo & unitree\_controller: .. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .. You can launch the Gazebo simulation by the following command: .. .. code:: bash .. roslaunch unitree_gazebo normal.launch rname:=GO1 wname:=stairs .. Where the ``rname`` means robot name, which can be ``laikago``, .. ``aliengo`` or ``GO1``. The ``wname`` means world name, which can be .. ``earth``, ``space`` or ``stairs``\ (for stairs world don't forget to .. change the respective world as described .. `here <https://github.com/unitreerobotics/unitree_ros#build>`__). And .. the default value of ``rname`` is ``laikago``, while the default value .. of ``wname`` is ``earth``. In Gazebo, the robot should be lying on the .. ground with joints not activated. .. Stand controller .. ^^^^^^^^^^^^^^^^ .. After launching the gazebo simulation, you can start to control the .. robot: .. .. code:: bash .. rosrun unitree_controller unitree_servo .. And you can add external disturbances, like a push or a kick: .. .. code:: bash .. rosrun unitree_controller unitree_external_force .. Position and pose publisher .. ^^^^^^^^^^^^^^^^^^^^^^^^^^^ .. Here we showed how to control the position and pose of robot without a .. controller, which should be useful in SLAM or visual development. .. Then run the position and pose publisher in another terminal: .. .. code:: bash .. rosrun unitree_controller unitree_move_kinetic .. The robot will turn around the origin, which is the movement under the .. world coordinate. And inside of the source file ``move_publisher``, we .. also offered the method to move robot under robot coordinate. You can .. change the value of ``def_frame`` to ``coord::ROBOT`` and run the .. catkin\_make again, then the ``unitree_move_publisher`` will move robot .. under its own coordinate. .. .. figure:: media/unitree_gazebo.png .. :width: 100% .. :align: center .. :alt: Unitree Gazebo .. Unitree Gazebo simulation