Simulation of Robotnik Automation robots in ROS2!
Explore the docs »
View Demo
·
Report Bug
·
Request Feature
Table of Contents
This package will combine the different Robotnik packages in ROS2 to simulate the robots in the different available platforms, as Gazebo Sim 8.9.0, etc.
This README will guide you to the simulation usage and the custom simulations that you can build for your own projects.
This package works with the different packages that Robotnik developed for the robots. You will need to install some of these packages first.
First, be sure that you have all the Gazebo packages installed for ROS2.
sudo apt install ros-jazzy-ros-gz
Then, let's procede with the installation of the Robotnik packages. First, create the workspace to work with:
mkdir -p ~/ros2_ws/src
cd ~/ros2_ws/src/
Then continue with the installation of packages.
- robotnik_description
- robotnik_sensors
- robotnik_common
- robotnik_interfaces
- ur_description
- robotnik_simulation
git clone https://github.com/RobotnikAutomation/robotnik_description.git -b jazzy-devel
git clone https://github.com/RobotnikAutomation/robotnik_sensors.git -b jazzy-devel
git clone https://github.com/RobotnikAutomation/robotnik_common.git -b ros2-devel
git clone https://github.com/RobotnikAutomation/robotnik_interfaces.git -b jazzy-devel
git clone https://github.com/RobotnikAutomation/Universal_Robots_ROS2_Description.git -b fix/gazebo-control-jazzy
git clone https://github.com/RobotnikAutomation/robotnik_simulation.git -b jazzy-devel
Install precompiled debs for simulation. Please, change directory to the root of the repository and run the following command:
sudo apt-get install -y ./debs/ros-${ROS_DISTRO}-*.deb
Install missing dependencies with rosdep:
cd ~/ros2_ws
rosdep update
rosdep install --from-paths src --ignore-src -r -y
Finally, compile workspace:
source /opt/ros/jazzy/setup.bash
cd ~/ros2_ws && colcon build
source install/setup.bash
If you want to use Docker, you can use the docker-compose file that is in the root of the repository. This will create a container with all the dependencies installed and ready to use.
To start the containers, run the following command:
docker compose up
This will build a robotnik_simulator image the first time you run it. After that, it will use the cached image.
You can configure the simulation based on docker images editing the environment in the env/robot.env file. You will need to uncomment the specific variables related to desired robot to simulate and comment or delete the others.
Make sure that the environment variables (ROBOT, ROBOT_MODEL, HAS_ARM) are set correctly before running the containers.
See each package for more details.
In case that the robot model that you want to simulate is not in robotnik_description package, or the world, or you want to use a different controller, you will have to create your own simulaiton files.
This will guide you to create your custom simulation.
- First, create your own package for the project.
- In this package, create your URDF file. You can base in the template file that are in robotnik_description package.
- In the README of robotnik_description there is a brief descripiton on how to create a robot.
- On this file you can modify and add all the sensors, arms and any other component.
- Then, launch the spawn_robot with the argument robot_xacro_path.
In case that you want to modify the velocity, topics, frames and everything related to the control, you can find the files in robotnik_gazebo_ignition/config folder. There is a file for each robot that you can modify.
To launch a custom file, you can use the world_path argument that it's in the spawn_world launch. See Launch Gazebo.
- Add Gazebo Ignition
- Add more worlds
- Add multi robot support
See the open issues for a full list of proposed features (and known issues).
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
Distributed under the Unlicense License. See LICENSE.txt
for more information.
Project Link: https://github.com/RobotnikAutomation