Franka Panda ROS 2 Ignition Gazebo Simulation for ROBO.720 Advanced Robotics
This repository provides a simulation environment for the Franka Panda robotic arm, utilizing ROS 2 and Ignition Gazebo. The project was developed as part of a university project to facilitate research and experimentation with robotic arm simulations. This repository evolves from the original edu-elfin_simulation (ROS1), replacing the Elfin manipulator with the Franka Panda.
- Simulates the Franka Panda robotic arm in Ignition Gazebo.
- Supports ROS 2 integration for controlling the robot.
- Ubuntu 22.04
- ROS 2 Humble - Installation Guide
sudo apt-get install python3-rosdep
If this is the first time using rosdep, it must be initialized via:
sudo rosdep init
rosdep update
mkdir -p edu-franka_simulation_ws/src
cd ~/edu-franka_simulation_ws/src
Clone the repository:
- Using SSH:
git clone [email protected]:tau-alma/edu-franka_simulation.git - Using HTTPS:
git clone https://github.com/tau-alma/edu-franka_simulation.git
Install dependencies using rosdep:
cd ~/edu-franka_simulation_ws
rosdep install --from-paths src -y --ignore-src
Build the workspace:
colcon build
source install/setup.bash
Note: If for whatever reason the build fails, you can install the dependencies manually. Instructions and commands at the end of this document.
- Open a new terminal and source the workspace:
cd edu-franka_simulation_ws/ colcon build source install/setup.bash
- Launch a controller:
ros2 launch franka_gazebo "INSERT_CONTROLLER_NAME_HERE".launch.py
computed_torque_controllertime_delay_controller
Additionally, the compliance environment can be launched in the same way as the other controllers, and the sensor plugin successfully publishes its readings to the /sensor_joint/force_torque ros2 topic using Gaze-bo-ROS bridge, as seen below. Note: the environment does not have an controller implemented yet, so it uses the joint_impedance_example_controller for now.
compliance_environment.launch.py
Note: The RCLCPP_ERROR "Error initializing URDF to resource manager!" is normal behaviour and does not need to be taken into account.
The following controllers are provided as examples for ROS 2 control and are not used in the course implementation:
joint_impedance_example_controllerjoint_position_example_controllerjoint_velocity_example_controller
Gazebo simulation will flicker and will not render anything to the screen if you are using VMware. To fix this, use the following argument when launching simulations in VMware:
LIBGL_ALWAYS_SOFTWARE=1
Example:
LIBGL_ALWAYS_SOFTWARE=1 ros2 launch franka_gazebo computed_torque_controller.launch.py
This repository is licensed under the MIT License. See the LICENSE file for more details.
The URDF and visuals for the Franka Panda robotic arm in this repository are based on the work from franka_ros, which is licensed under the Apache 2.0 License. Modifications were made to adapt these files for the ROS 2 Ignition Gazebo simulation. The original authors retain copyright over their contributions, and their work is used in compliance with the terms of the Apache 2.0 License.
A copy of the Apache 2.0 License can be found in the franka_ros repository.
Additional references:
- Modulabs Arm-Control Repository for controller implementations
- ROS 2 KDL Parser
- ROS 2 Controller Package Framework
- ROS 2 Migration Guide
- Rosdep packages
- Franka Emika for the design of the Franka Panda robotic arm.
- franka_ros repository for providing the base URDF and visual assets.
Install Effort Controllers for Torque-Control Interface
sudo apt install ros-humble-ros2-control ros-humble-ign-ros2-control ros-humble-ros2-controllers ros-humble-joint-state-publisher-gui ros-humble-ros-gz
Install Gazebo ROS Packages and Gazebo ROS Control
sudo apt-get install ros-humble-gazebo-ros-pkgs ros-humble-gazebo-ros2-control ros-humble-effort-controllers
Install Controller Interface, Control Messages, and KDL Parser
sudo apt install ros-humble-controller-interface ros-humble-control-msgs ros-humble-kdl-parser

