Robotic simulation in Unity with ROS integration.
ZeroSim is a robotics simulation engine built on the easy to use Unity 3D development platform and the power of the Robotics Operating System (ROS). ZeroSim is designed for ease of use and rapid development of all sorts of robotics and simulation -- from warehouses and industrial settings, to farming and outdoors -- from robotic arms to ground and drone based mobile robots.
ZeroSim is a project developed over several years by FS Studios for the rapid development of all sorts of robotic simulation projects for various clients, from robotic arms to mobile robots.
We are releasing ZeroSim as open source to support the community of roboticist and software engineers that have supported us over the decades. We are in active development and welcome all feature requests, bug reports, and pull requests.
ZeroSim provides a multitude of tools for building robots and environments in Unity to interface with ROS. We strive to provide the same functionality and ROS interfaces of Gazebo. Including:
Dynamics simulation using the latest PhysX 4.x integrated in Unity.
Advanced 3D Rendering, including the latest realtime ray tracing technology.
Sensors:
Ready to use ROS standard controllers and plugins:
Full ROS messaging communications layers API.
Ready to run prebuilt ROS Docker images available publically on DockerHub: https://hub.docker.com/r/zerodog/zerosim_ros_vnc
Machine Learning tools:
URDF Import & Export
ROS2 support via ROS Bridge Suite (https://github.com/RobotWebTools/rosbridge_suite)
COMING SOON:
Window -> Package Manager
+
dropdown:Add Package From Git URL...
and enter [email protected]:fsstudio-team/ZeroSimROSUnity.git
. Note this can take upto a few minutes to update but you should see the following:Import
button in the Package Manager:Edit -> Project Settings... -> Physics
and set the Default Solver Iterations
to 30
and the Default Solver Velocity Iterations
to 60
.
Fixed Timestep
setting by Edit -> Project Settings... -> Time
to 0.005
Edit -> Project Settings...
:Auto Graphics API for Linux
and then under Graphics APIs for Linux
set Vulkan
ahead of OpenGL
:docker pull zerodog/zerosim_ros_vnc:latest
NOTE: Order of operations is important. Especially starting the Docker before the Unity simulation.
Turtlebot3_Waffle_test.scene
docker run -it --rm \
--publish=9090:9090 \
--publish=11311:11311 \
--publish=8083:8083 \
--publish=80:80 \
--publish=5678:5678 \
--name my_zerosim_vnc_docker \
zerodog/zerosim_ros_vnc:latest \
roslaunch zero_sim_ros basic_unity_editor.launch
docker exec -it my_zerosim_vnc_docker \
bash -c "source devel/setup.bash ; rosrun turtlebot3_teleop turtlebot3_teleop_key"
w a s d
keys in the ROS teleop console window:This will show visualizing the 2D LIDAR and ROS TF in RViz. This uses a VNC viewer to the ZeroSim ROS Docker container.
rviz -d ./src/zero_sim_ros/rviz/turtlebot_viewer.rviz
. RViz will start up with a 3D view with the LIDAR scanner visibile.
NOTE: Order of operations is important. Especially starting the Docker before the Unity simulation.
UniversalRobot_UR10_test.scene
docker run -it --rm \
--publish=9090:9090 \
--publish=11311:11311 \
--publish=8083:8083 \
--publish=80:80 \
--publish=5678:5678 \
--name my_zerosim_vnc_docker \
zerodog/zerosim_ros_vnc:latest \
roslaunch zero_sim_ros ur10_moveit.launch
ImageSegmentation_test.scene
docker run -it --rm \
--publish=9090:9090 \
--publish=11311:11311 \
--publish=8083:8083 \
--publish=80:80 \
--publish=5678:5678 \
--name my_zerosim_vnc_docker \
zerodog/zerosim_ros_vnc:latest \
roslaunch zero_sim_ros basic_unity_editor.launch
rqt_image_view /image/segmentation_image
.rqt_image_view /image/image_raw
URDF_test.scene
in the ZeroSim samples.SimpleRobotArm
in the scene hierarchy.Export URDF
in the root properties view.
ZeroSim --> Import URDF...
git clone --recursive https://github.com/LeoRover/leo_common.git
cd leo_common && git checkout melodic
.
# make sure you are in parent directory for `leo_common`
cd ..
# run docker
docker run -it --rm \
--publish=9090:9090 \
--publish=11311:11311 \
--publish=8083:8083 \
--publish=80:80 \
--publish=5678:5678 \
--name my_zerosim_vnc_docker \
--volume=$(pwd)/leo_common/:/catkin_ws/src/leo_common/ \
zerodog/zerosim_ros_vnc:latest \
bash
source devel/setup.bash
catkin build
# Make sure to source ROS again to get the new LEO robot
source devel/setup.bash
rosrun xacro xacro src/leo_common/leo_description/urdf/leo_sim.urdf.xacro > /tmp/leo_sim.urdf
/zerosim_tools/convert_meshes_to_obj.sh ./src/leo_common/leo_description/models
# create a directory and a sub-directory to store the URDF and meshes
mkdir -p my_leo_robot/leo_description
# copy the URDF
docker cp my_zerosim_vnc_docker:/tmp/leo_sim.urdf ./my_leo_robot
# Note we are preserving the path
docker cp my_zerosim_vnc_docker:/catkin_ws/src/leo_common/leo_description/models ./my_leo_robot/leo_description
# First fix up the .DAEs to point to the OBJs
sed -i 's#.dae#.obj#g' my_leo_robot/leo_sim.urdf
# The fix up the .STLs to point to the OBJs
sed -i 's#.stl#.obj#g' my_leo_robot/leo_sim.urdf
# Now remove the `package://` because we are using the filesystem
sed -i 's#package://#./#g' my_leo_robot/leo_sim.urdf
ZeroSim --> Import URDF...