Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
147 commits
Select commit Hold shift + click to select a range
5465439
Update branch
Jepear19 Mar 19, 2026
1c609a4
Fix Launcher name
Jepear19 Mar 19, 2026
c7f8abf
Fix conveyor pluggin and add package.xml and env-hooks
Jepear19 Mar 19, 2026
c5bbd62
Fix name in CMakeLists.txt
Jepear19 Mar 19, 2026
10e2ea0
Fix launcher
Jepear19 Mar 19, 2026
bdfecef
Fix path to world in launcher
Jepear19 Mar 19, 2026
3255fd9
Fix in .world and .launch.py
Jepear19 Mar 19, 2026
8efd5ca
Split Launchers
Jepear19 Mar 19, 2026
ca3602e
Fix launcher y world
Jepear19 Mar 19, 2026
9196f0a
Fix model.sdf and launcher
Jepear19 Mar 19, 2026
a0fe514
Fix world and launch and delete world.launch.py
Jepear19 Mar 19, 2026
a1f588c
Reset files to create only gazebo harmnic simulation without belt
Jepear19 Mar 20, 2026
498f038
Fix Launcher
Jepear19 Mar 20, 2026
51d9888
Fix world launcher
Jepear19 Mar 20, 2026
63c72ae
Change world_path in launcher
Jepear19 Mar 20, 2026
15923ba
Change floor color and add conveyor belt to universe
Jepear19 Mar 20, 2026
8c7c285
Update branch
Jepear19 Mar 20, 2026
a18f381
Fix package.xml
Jepear19 Mar 20, 2026
32b0697
Fix package and CmakeLists
Jepear19 Mar 20, 2026
e76cfc5
Fix model.sdf
Jepear19 Mar 20, 2026
da58e29
Add object
Jepear19 Mar 20, 2026
d231829
Change box position
Jepear19 Mar 20, 2026
7bc69e3
Change box position
Jepear19 Mar 20, 2026
8775b9e
Change box position
Jepear19 Mar 20, 2026
abd8139
Change box position
Jepear19 Mar 20, 2026
bf23d91
Change box position
Jepear19 Mar 20, 2026
9f8aef0
Change box position
Jepear19 Mar 20, 2026
926beba
Add continuos generation of objects
Jepear19 Mar 21, 2026
401948b
Fix plugin CMakeLists.txt
Jepear19 Mar 21, 2026
98a1197
Fix box position and spawn_box.py
Jepear19 Mar 21, 2026
03591cc
Fix belt collision
Jepear19 Mar 21, 2026
19bff74
Fix collision
Jepear19 Mar 21, 2026
d43ce89
Fix collision
Jepear19 Mar 21, 2026
615b4cd
Fix collision
Jepear19 Mar 21, 2026
fe24814
Fix plugin and collision
Jepear19 Mar 21, 2026
42b2b3b
Fix plugin and collision
Jepear19 Mar 21, 2026
eef4796
Fix plugin
Jepear19 Mar 21, 2026
2e9bbe3
Fix model.sdf and plugin
Jepear19 Mar 21, 2026
c8c7855
Fix velocity in plugin
Jepear19 Mar 22, 2026
d3f97c8
Fix box.sdf
Jepear19 Mar 22, 2026
8f85ff7
Fix model.sdf
Jepear19 Mar 22, 2026
5747cfb
Add friction to model.sdf
Jepear19 Mar 22, 2026
99537d5
Fix movement
Jepear19 Mar 22, 2026
151ccdb
Fix plugin
Jepear19 Mar 22, 2026
87f8bae
Fix plugin
Jepear19 Mar 22, 2026
149b3b5
Fix plugin
Jepear19 Mar 22, 2026
26caf3f
Fix movement
Jepear19 Mar 22, 2026
5266804
Fix movement
Jepear19 Mar 22, 2026
563bffc
Fix movement
Jepear19 Mar 22, 2026
9102f11
Fix movement
Jepear19 Mar 22, 2026
d3526f1
Fix movement
Jepear19 Mar 22, 2026
632f203
Fix launcher
Jepear19 Mar 22, 2026
6f2e1f6
Change launcher
Jepear19 Mar 22, 2026
5134741
Fix movement
Jepear19 Mar 22, 2026
cadf434
Fix movement
Jepear19 Mar 22, 2026
88417d5
Fix movement
Jepear19 Mar 22, 2026
c4d6dd4
Fix movement
Jepear19 Mar 23, 2026
700aa9b
Fix model.sdf
Jepear19 Mar 23, 2026
e6c7736
Fix movement
Jepear19 Mar 23, 2026
b817ebf
Fix model.sdf and plugin
Jepear19 Mar 23, 2026
a9c1dca
Fix model.sdf and plugin
Jepear19 Mar 23, 2026
0a24bf5
Fix plugin
Jepear19 Mar 23, 2026
171fb5e
Fix conveyor movement
Jepear19 Mar 25, 2026
49c57df
Fix model.sdf
Jepear19 Mar 25, 2026
c86119f
Fix movement
Jepear19 Mar 25, 2026
0fbdd5d
Fix plugin and model.sdf
Jepear19 Mar 25, 2026
62569a4
Fix plugin and model.sdf
Jepear19 Mar 25, 2026
7c82999
Fix model.sdf
Jepear19 Mar 25, 2026
547b414
Fix model.sdf and box.sdf
Jepear19 Mar 25, 2026
d1472ab
Change .sdf and plugin to use JointVelocityCmd
Jepear19 Mar 26, 2026
a415b58
Change .sdf and plugin to use JointVelocityCmd
Jepear19 Mar 26, 2026
3341bd4
Fix contact plugin
Jepear19 Mar 26, 2026
09d6796
Fix WorldPose
Jepear19 Mar 26, 2026
655e953
Add collision to conveyor belt
Jepear19 Mar 26, 2026
20a6f64
Add collision to conveyor belt
Jepear19 Mar 26, 2026
498aecc
Fix plugin movement
Jepear19 Mar 26, 2026
9dc24e0
Fix plugin movement
Jepear19 Mar 26, 2026
c395784
Fix plugin movement
Jepear19 Mar 26, 2026
34a080c
Restart plugin and try another one
Jepear19 Mar 26, 2026
53eb6e9
Fix CMakeLists.txt
Jepear19 Mar 26, 2026
30fca1c
Fix CMakeLists.txt
Jepear19 Mar 26, 2026
fd4bf38
Fix plugin
Jepear19 Mar 26, 2026
5608daf
Fix spawn_box.py
Jepear19 Mar 26, 2026
da99730
Fix spawn_box.py
Jepear19 Mar 26, 2026
cb7356c
Fix .world
Jepear19 Mar 26, 2026
7cd4bdc
Fix .world
Jepear19 Mar 26, 2026
b3566f0
Fix model.sdf
Jepear19 Mar 26, 2026
b3a83e1
Fix model.sdf
Jepear19 Mar 26, 2026
2eb62d1
Fix model.sdf
Jepear19 Mar 26, 2026
8dc8357
Fix plugin
Jepear19 Mar 26, 2026
2885cea
Fix plugin
Jepear19 Mar 26, 2026
6d159d9
Fix model.sdf
Jepear19 Mar 28, 2026
0f4c434
Fix model.sdf
Jepear19 Mar 28, 2026
307489b
Fix model.sdf and plugin to use a joint
Jepear19 Mar 28, 2026
d761aa4
Try another plugin for the movement
Jepear19 Mar 28, 2026
cba1b88
Fix plugin
Jepear19 Mar 28, 2026
7a73a7b
Add debug tu plugin
Jepear19 Mar 28, 2026
85bb4d7
Fix movement
Jepear19 Mar 28, 2026
363a31e
Fix movement
Jepear19 Mar 28, 2026
58a1808
Fix movement
Jepear19 Mar 28, 2026
d0e1611
Fix movement
Jepear19 Mar 28, 2026
737a265
Fix movement
Jepear19 Mar 28, 2026
c98da9d
Fix movement
Jepear19 Mar 28, 2026
fb3f91e
Fix movement
Jepear19 Mar 28, 2026
fe25d3a
Fix movement
Jepear19 Mar 28, 2026
843ca16
Fix movement
Jepear19 Mar 28, 2026
afca7d3
Fix movement
Jepear19 Mar 28, 2026
17ee2a6
Fix model.sdf
Jepear19 Mar 29, 2026
7758afd
Fix model.sdf
Jepear19 Mar 29, 2026
852b45e
Fix box.sdf and height
Jepear19 Mar 29, 2026
2528a06
Fix plugin and change min and max z in .sdf
Jepear19 Mar 29, 2026
a8b2fa1
Change plugin
Jepear19 Mar 29, 2026
1051393
Fix logic plugin
Jepear19 Mar 29, 2026
aee1c8e
Fix plugin region
Jepear19 Mar 29, 2026
f8d2638
Restart plugin
Jepear19 Mar 29, 2026
50319dd
Change cinveyor region
Jepear19 Mar 29, 2026
e25dea8
Change conveyor region
Jepear19 Mar 29, 2026
a656ac5
Change conveyor region
Jepear19 Mar 29, 2026
f7aeb44
Change conveyor region
Jepear19 Mar 29, 2026
af8412a
Try another plugin
Jepear19 Mar 29, 2026
0e01755
Try another plugin
Jepear19 Mar 29, 2026
a39cc67
Try another plugin
Jepear19 Mar 29, 2026
f8c0647
Try another plugin
Jepear19 Mar 29, 2026
21eb044
Add pose to conveyor visual
Jepear19 Mar 29, 2026
0c26ffd
Add pose to conveyor visual
Jepear19 Mar 29, 2026
f48fcdc
Add pose to conveyor visual
Jepear19 Mar 29, 2026
111489f
Add pose to conveyor visual
Jepear19 Mar 29, 2026
4fc5e68
Change plugin name
Jepear19 Mar 29, 2026
044be0a
Fix model.sdf
Jepear19 Mar 29, 2026
a6e5944
Fix model.sdf and add debug to plugin
Jepear19 Mar 29, 2026
038fc0d
Fix model.sdf
Jepear19 Mar 29, 2026
76b83e3
Fix model.sdf
Jepear19 Mar 29, 2026
02aac40
Fix model.sdf
Jepear19 Mar 29, 2026
fb961bc
Fix models.sdf
Jepear19 Mar 29, 2026
7a74c1b
Change plugin, fix .sdf and add random box spawn
Jepear19 Mar 30, 2026
1e093d0
Fix colission
Jepear19 Mar 30, 2026
725a249
Change spawn box height
Jepear19 Mar 30, 2026
82f00e1
add sausage mesh
Jepear19 Apr 4, 2026
5956612
Add sausage spawner
Jepear19 Apr 5, 2026
34df453
Fix sausage spawner
Jepear19 Apr 5, 2026
18958cb
Fix database
Jepear19 Jun 2, 2026
07d9500
Fix database
Jepear19 Jun 2, 2026
f020c39
Add ur3 arm to Industrial repo
Jepear19 Jun 2, 2026
603cf50
Add ur3 to conveyor universe
Jepear19 Jun 2, 2026
06d4f01
Fix xacro path in launcher
Jepear19 Jun 2, 2026
2b92b8d
Add plugins path to launcher
Jepear19 Jun 2, 2026
f350873
Add plugins path to world launcher
Jepear19 Jun 3, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CustomRobots/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,12 @@ install(
# ${RI_ROOT_DIR}/Launchers/rescue_people.launch.py
# DESTINATION share/${PROJECT_NAME}/launch)

install(
PROGRAMS
conveyor_belt/spawn_sausage.py
DESTINATION lib/${PROJECT_NAME}
)

if(BUILD_TESTING)
# find_package(ament_lint_auto REQUIRED)
# ament_lint_auto_find_test_dependencies()
Expand Down
16 changes: 16 additions & 0 deletions CustomRobots/conveyor_belt/box.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?xml version="1.0"?>
<model>
<name>box</name>
<version>1.0</version>

<sdf version="1.9">model.sdf</sdf>

<author>
<name>Jesús Pérez Arjona</name>
<email>jesusper2010@gmail.com</email>
</author>

<description>
Simple box model for conveyor belt simulation in Gazebo Harmonic.
</description>
</model>
64 changes: 64 additions & 0 deletions CustomRobots/conveyor_belt/box.sdf
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
<?xml version="1.0" ?>
<sdf version="1.9">

<model name="box">

<link name="link">

<pose>0 0 0 0 0 0</pose>

<gravity>true</gravity>

<inertial>
<mass>0.5</mass>
<inertia>
<ixx>0.0002</ixx>
<iyy>0.0002</iyy>
<izz>0.0002</izz>
</inertia>
</inertial>

<collision name="collision">
<geometry>
<box>
<size>0.05 0.05 0.05</size>
</box>
</geometry>

<surface>

<contact>
<ode>
<kp>100000</kp>
<kd>10</kd>
</ode>
</contact>

<friction>
<ode>
<mu>0.1</mu>
<mu2>0.1</mu2>
</ode>
</friction>

</surface>
</collision>

<visual name="visual">
<geometry>
<box>
<size>0.05 0.05 0.05</size>
</box>
</geometry>

<material>
<ambient>1 0 0 1</ambient>
<diffuse>1 0 0 1</diffuse>
</material>
</visual>

</link>

</model>

</sdf>
147 changes: 147 additions & 0 deletions CustomRobots/conveyor_belt/meshes/conveyor_belt.dae

Large diffs are not rendered by default.

Binary file not shown.
Binary file added CustomRobots/conveyor_belt/meshes/sausage.glb
Binary file not shown.
17 changes: 17 additions & 0 deletions CustomRobots/conveyor_belt/model.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?xml version="1.0"?>
<model>

<name>Conveyor Belt</name>
<version>1.0</version>
<sdf version='1.6'>model.sdf</sdf>

<author>
<name>Mikel Bueno Viso</name>
<email>Mikel.Bueno-Viso@cranfield.ac.uk</email>
</author>

<description>
Conveyor Belt for IFRA_ConveyorBelt ROS2-Gazebo Plugin.
</description>

</model>
66 changes: 66 additions & 0 deletions CustomRobots/conveyor_belt/model.sdf
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
<?xml version="1.0" ?>
<sdf version="1.9">

<model name="conveyor_belt">

<static>false</static>

<link name="link">

<pose>0 0 0 0 0 0</pose>

<inertial>
<mass>1000.0</mass>
<inertia>
<ixx>1.0</ixx>
<iyy>1.0</iyy>
<izz>1.0</izz>
</inertia>
</inertial>

<visual name="visual">
<pose>0 0 0 0 0 0</pose>
<geometry>
<mesh>
<uri>meshes/conveyor_belt.dae</uri>
</mesh>
</geometry>
</visual>

<collision name="collision">
<pose>0 0 0 0 0 0</pose>

<geometry>
<box>
<size>0.5 1.2 1.48</size>
</box>
</geometry>

<surface>
<contact>
<ode>
<kp>100000</kp>
<kd>100</kd>
<min_depth>0.01</min_depth>
<max_vel>0.1</max_vel>
</ode>
</contact>

<friction>
<ode>
<mu>0.1</mu>
<mu2>0.1</mu2>
</ode>
</friction>
</surface>

</collision>

</link>

<plugin filename="libconveyor_plugin.so"
name="box_mover::BoxMoverPlugin"/>

</model>

</sdf>
64 changes: 64 additions & 0 deletions CustomRobots/conveyor_belt/sausage.sdf
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
<?xml version="1.0" ?>
<sdf version="1.9">

<model name="sausage">

<link name="link">

<pose>0 0 0 0 0 0</pose>

<gravity>true</gravity>

<inertial>
<mass>0.5</mass>
<inertia>
<ixx>0.0002</ixx>
<iyy>0.0002</iyy>
<izz>0.0002</izz>
</inertia>
</inertial>

<collision name="collision">

<geometry>
<box>
<size>0.04 0.12 0.04</size>
</box>
</geometry>

<surface>
<contact>
<ode>
<kp>100000</kp>
<kd>10</kd>
</ode>
</contact>

<friction>
<ode>
<mu>0.1</mu>
<mu2>0.1</mu2>
</ode>
</friction>
</surface>
</collision>

<visual name="visual">

<pose>0 0 -0.02 1.57 0 0</pose>

<geometry>
<mesh>
<uri>meshes/sausage.glb</uri>

<scale>0.01 0.01 0.01</scale>
</mesh>
</geometry>

</visual>

</link>

</model>

</sdf>
53 changes: 53 additions & 0 deletions CustomRobots/conveyor_belt/spawn_sausage.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
#!/usr/bin/env python3

import rclpy
from rclpy.node import Node
import subprocess
import time
import random
import math

class sausageSpawner(Node):

def __init__(self):
super().__init__('sausage_spawner')

time.sleep(5)
self.timer = self.create_timer(7.0, self.spawn_sausage)
self.counter = 0

def spawn_sausage(self):

name = f"box_{self.counter}"

x_random = random.uniform(-0.18, 0.18)
yaw = random.uniform(-2*math.pi, 2*math.pi)

cmd = [
"ros2", "run", "ros_gz_sim", "create",
"-name", name,
"-x", str(x_random),
"-y", "0.58",
"-z", "0.8",
"-R", "0",
"-P", "0",
"-Y", str(yaw),
"-file", "/home/ws/src/CustomRobots/conveyor_belt/sausage.sdf"
]

subprocess.run(cmd)

self.get_logger().info(f"Spawned {name}")
self.counter += 1


def main():
rclpy.init()
node = sausageSpawner()
rclpy.spin(node)
node.destroy_node()
rclpy.shutdown()


if __name__ == '__main__':
main()
62 changes: 62 additions & 0 deletions Industrial/conveyor_belt_plugin/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
cmake_minimum_required(VERSION 3.8)
project(conveyor_belt_plugin)

# ============================
# C++ standard
# ============================
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

# ============================
# Warnings
# ============================
if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
add_compile_options(-Wall -Wextra -Wpedantic)
endif()

# ============================
# Dependencies
# ============================
find_package(ament_cmake REQUIRED)
find_package(rclcpp REQUIRED)

find_package(gz-sim8 REQUIRED)
find_package(gz-plugin2 REQUIRED)

# ============================
# Plugin
# ============================
add_library(conveyor_plugin SHARED
src/conveyor_plugin.cpp
)

target_include_directories(conveyor_plugin PUBLIC include)

target_link_libraries(conveyor_plugin
gz-sim8::gz-sim8
gz-plugin2::gz-plugin2
)

ament_target_dependencies(conveyor_plugin
rclcpp
)

# ============================
# Install
# ============================
install(TARGETS conveyor_plugin
LIBRARY DESTINATION lib
)

install(
FILES env-hooks/conveyor_belt.dsv
DESTINATION share/${PROJECT_NAME}/environment
)

# ============================
# Export
# ============================
ament_export_libraries(conveyor_plugin)
ament_export_dependencies(gz-sim8 gz-plugin2 rclcpp)

ament_package()
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
prepend-non-duplicate;GZ_SIM_SYSTEM_PLUGIN_PATH;lib
20 changes: 20 additions & 0 deletions Industrial/conveyor_belt_plugin/package.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?xml version="1.0"?>
<package format="3">

<name>conveyor_belt_plugin</name>
<version>0.0.1</version>

<description>Gazebo Harmonic Conveyor Plugin</description>

<maintainer email="dev@todo.com">dev</maintainer>
<license>Apache-2.0</license>

<buildtool_depend>ament_cmake</buildtool_depend>

<depend>gz-sim</depend>

<export>
<build_type>ament_cmake</build_type>
</export>

</package>
Loading