remove gitignore

This commit is contained in:
Alexander Schaefer 2025-04-22 17:10:24 +02:00
parent 97cd67a008
commit 33f21d3096
519 changed files with 18046 additions and 0 deletions

43
MATLAB/log_plot.m Normal file
View File

@ -0,0 +1,43 @@
clear
close all
clc
folder_path = './samples/sample4/joint_states_logs';
files = dir(fullfile(folder_path, '*.csv'));
folder_path_trajectroy = './samples/sample4/joint_trajectories';
files_trajectroy = dir(fullfile(folder_path_trajectroy, '*.csv'));
l = 2.5;
u = 3.5;
for k = 1:length(files)
figure(k)
grid on
file_name = files(k).name;
file_path = fullfile(folder_path, file_name);
% Example: Read the file
state = readtable(file_path);
if k == 1
offset = state.timestamp(1);
end
for i = 1:length(state.timestamp)
state.timestamp(i)=state.timestamp(i)-offset;
end
hold on
for s = 1:length(files_trajectroy)
file_name_trajectroy = files_trajectroy(s).name;
file_path_trajectroy = fullfile(folder_path_trajectroy, file_name_trajectroy);
% Example: Read the file
T = readtable(file_path_trajectroy);
for i=1:length(T.timestamp)
T.timestamp(i)=T.timestamp(i)-offset;
end
plot(T.timestamp, T.(file_name(1:end-4)), 'Color', [0 0 0])
dy = diff(T.(file_name(1:end-4))) ./ diff(T.timestamp);
x_mid = T.timestamp(1:end-1) + diff(T.timestamp)/2; % midpoints between x-values
plot(x_mid,dy,'Color',[1 0 0])
end
end

43
MATLAB/log_plot_cart.m Normal file
View File

@ -0,0 +1,43 @@
clear
close all
clc
file = './samples/sample13/joint_states_cart_logs/cartesian.csv';
folder_path_trajectroy = './samples/sample13/joint_trajectories_cart';
files_trajectroy = dir(fullfile(folder_path_trajectroy, '*.csv'));
l = 0;
u = 60;
state = readtable(file);
offset = state.timestamp(1);
for i = 1:length(state.timestamp)
state.timestamp(i)=state.timestamp(i)-offset;
end
val = ["x","y","z","roll", "pitch", "yaw"];
for k = 1:6
figure(k)
grid on
hold on
plot(state.timestamp(state.timestamp >=l & state.timestamp <=u), state.(val(k))(state.timestamp >=l & state.timestamp <=u), 'Color',[1 0 0],'LineWidth',4, 'DisplayName','Transform');
title(val(k), 'FontSize',16)
xlabel('Time [s]', 'FontSize',30)
ylabel('Pos [m]', 'FontSize',30)
legend('FontSize',30)
legend show
for s = 1:length(files_trajectroy)
file_name_trajectroy = files_trajectroy(s).name;
file_path_trajectroy = fullfile(folder_path_trajectroy, file_name_trajectroy);
% Example: Read the file
T = readtable(file_path_trajectroy);
for i=1:length(T.timestamp)
T.timestamp(i)=T.timestamp(i)-offset;
end
plot(T.timestamp(T.timestamp >=l & T.timestamp <=u), T.(val(k))(T.timestamp >=l & T.timestamp <=u), 'Color', [0 0 0], 'HandleVisibility','off', 'LineWidth',2);
end
plot(T.timestamp(T.timestamp >=l & T.timestamp <=u), T.(val(k))(T.timestamp >=l & T.timestamp <=u), 'Color', [0 0 0], 'DisplayName','Trajectories', 'LineWidth',2);
end

View File

@ -0,0 +1,53 @@
clear
close all
clc
folder_path = './samples/sample13/joint_states_logs';
files = dir(fullfile(folder_path, '*.csv'));
folder_path_trajectroy = './samples/sample13/joint_trajectories';
files_trajectroy = dir(fullfile(folder_path_trajectroy, '*.csv'));
l = 0;
u = 60;
for k = 1:length(files)
figure(k)
grid on
file_name = files(k).name;
file_path = fullfile(folder_path, file_name);
% Example: Read the file
state = readtable(file_path);
if k == 1
offset = state.timestamp(1);
end
for i = 1:length(state.timestamp)
state.timestamp(i)=state.timestamp(i)-offset;
end
hold on
plot(state.timestamp(state.timestamp >=l & state.timestamp <=u), state.position(state.timestamp >=l & state.timestamp <=u), 'Color',[1 0 0], 'DisplayName', 'Position','LineWidth',4);
%plot(state.timestamp(state.timestamp >=l & state.timestamp <=u), state.velocity(state.timestamp >=l & state.timestamp <=u), 'Color',[0 1 0], 'DisplayName','Velocity')
%plot(state.timestamp(state.timestamp >=l & state.timestamp <=u), state.effort(state.timestamp >=l & state.timestamp <=u), 'Color',[0 0 1], 'DisplayName','Effort')
title(replace(file_name(1:end-4),'_',' '), 'FontSize',16)
xlabel('Time [s]', 'FontSize',30)
ylabel('Joint Angle [rad]', 'FontSize',30)
legend('FontSize',30)
legend show
for s = 1:length(files_trajectroy)
file_name_trajectroy = files_trajectroy(s).name;
file_path_trajectroy = fullfile(folder_path_trajectroy, file_name_trajectroy);
% Example: Read the file
T = readtable(file_path_trajectroy);
for i=1:length(T.timestamp)
T.timestamp(i)=T.timestamp(i)-offset;
end
if s == 1
plot(T.timestamp(T.timestamp >=l & T.timestamp <=u), T.(file_name(1:end-4))(T.timestamp >=l & T.timestamp <=u), 'Color', [0 0 0], 'DisplayName','Trajectories', 'LineWidth',2);
else
plot(T.timestamp(T.timestamp >=l & T.timestamp <=u), T.(file_name(1:end-4))(T.timestamp >=l & T.timestamp <=u), 'Color', [0 0 0], 'HandleVisibility','off', 'LineWidth',2);
end
end
plot(T.timestamp(T.timestamp >=l & T.timestamp <=u), T.(file_name(1:end-4))(T.timestamp >=l & T.timestamp <=u), 'Color', [0 0 0], 'DisplayName','Trajectories', 'LineWidth',2);
end

14
osc_recieve.py Normal file
View File

@ -0,0 +1,14 @@
from osc4py3.as_eventloop import *
from osc4py3 import oscmethod as osm
import time
def handler(*args):
print(args)
osc_startup()
osc_udp_server("0.0.0.0", 8000, "osc_server")
osc_method("/coordinates", handler, argscheme=osm.OSCARG_DATAUNPACK)
while True:
osc_process()
time.sleep(0.01)

38
painting_robot.urdf Normal file
View File

@ -0,0 +1,38 @@
<?xml version="1.0"?>
<robot name="painting_robot">
<!-- Base Link -->
<link name="base_link"/>
<!-- Link 1 -->
<link name="link1"/>
<joint name="joint1" type="revolute">
<parent link="base_link"/>
<child link="link1"/>
<origin xyz="0 0 0" rpy="0 0 0"/>
<axis xyz="0 0 1"/>
<limit effort="10.0" velocity="0.5" lower="-1.57" upper="1"/>
</joint>
<!-- Link 2 -->
<link name="link2"/>
<joint name="joint2" type="revolute">
<parent link="link1"/>
<child link="link2"/>
<origin xyz="0.4 0 0" rpy="0 0 0"/> <!-- 400.00mm from base -->
<axis xyz="0 0 1"/>
<limit effort="10.0" velocity="0.5" lower="0.02" upper="2.8"/>
</joint>
<!-- Tool endpoint -->
<link name="tool0"/>
<joint name="tool0_fixed_joint" type="fixed">
<parent link="link2"/>
<child link="tool0"/>
<origin xyz="0.25025 0 0" rpy="0 0 0"/> <!-- TCP 250.25mm from joint2 -->
</joint>
</robot>

View File

@ -0,0 +1 @@
1

View File

@ -0,0 +1,2 @@
# generated from colcon_core/shell/template/command_prefix.sh.em
. "/BA/ros2_ws/install/tutorial_interfaces/share/tutorial_interfaces/package.sh"

View File

@ -0,0 +1,9 @@
[0.000000] (-) TimerEvent: {}
[0.002185] (-) JobUnselected: {'identifier': 'more_interfaces'}
[0.002460] (-) JobUnselected: {'identifier': 'py_srvcli'}
[0.002627] (-) JobUnselected: {'identifier': 'python_parameters'}
[0.002684] (-) JobUnselected: {'identifier': 'tutorial_interfaces'}
[0.003313] (py_pubsub) JobQueued: {'identifier': 'py_pubsub', 'dependencies': OrderedDict([('tutorial_interfaces', '/BA/ros2_ws/install/tutorial_interfaces')])}
[0.003435] (py_pubsub) JobStarted: {'identifier': 'py_pubsub'}
[0.032318] (py_pubsub) JobEnded: {'identifier': 'py_pubsub', 'rc': 1}
[0.044342] (-) EventReactorShutdown: {}

View File

@ -0,0 +1,192 @@
[0.088s] DEBUG:colcon:Command line arguments: ['/usr/bin/colcon', 'build', '--packages-select', 'py_pubsub']
[0.088s] DEBUG:colcon:Parsed command line arguments: Namespace(log_base=None, log_level=None, verb_name='build', build_base='build', install_base='install', merge_install=False, symlink_install=False, test_result_base=None, continue_on_error=False, executor='parallel', parallel_workers=8, event_handlers=None, ignore_user_meta=False, metas=['./colcon.meta'], base_paths=['.'], packages_ignore=None, packages_ignore_regex=None, paths=None, packages_up_to=None, packages_up_to_regex=None, packages_above=None, packages_above_and_dependencies=None, packages_above_depth=None, packages_select_by_dep=None, packages_skip_by_dep=None, packages_skip_up_to=None, packages_select_build_failed=False, packages_skip_build_finished=False, packages_select_test_failures=False, packages_skip_test_passed=False, packages_select=['py_pubsub'], packages_skip=None, packages_select_regex=None, packages_skip_regex=None, packages_start=None, packages_end=None, cmake_args=None, cmake_target=None, cmake_target_skip_unavailable=False, cmake_clean_cache=False, cmake_clean_first=False, cmake_force_configure=False, ament_cmake_args=None, catkin_cmake_args=None, catkin_skip_building_tests=False, mixin_files=None, mixin=None, verb_parser=<colcon_mixin.mixin.mixin_argument.MixinArgumentDecorator object at 0x7ffffe1f40a0>, verb_extension=<colcon_core.verb.build.BuildVerb object at 0x7ffffe2f8fa0>, main=<bound method BuildVerb.main of <colcon_core.verb.build.BuildVerb object at 0x7ffffe2f8fa0>>, mixin_verb=('build',))
[0.168s] Level 1:colcon.colcon_core.package_discovery:discover_packages(colcon_meta) check parameters
[0.169s] INFO:colcon.colcon_metadata.package_discovery.colcon_meta:Using configuration from '/root/.colcon/metadata/default/Gazebo.meta'
[0.169s] INFO:colcon.colcon_metadata.package_discovery.colcon_meta:Using configuration from '/root/.colcon/metadata/default/fastrtps.meta'
[0.169s] Level 1:colcon.colcon_core.package_discovery:discover_packages(recursive) check parameters
[0.169s] Level 1:colcon.colcon_core.package_discovery:discover_packages(ignore) check parameters
[0.169s] Level 1:colcon.colcon_core.package_discovery:discover_packages(path) check parameters
[0.169s] Level 1:colcon.colcon_core.package_discovery:discover_packages(colcon_meta) discover
[0.169s] Level 1:colcon.colcon_core.package_discovery:discover_packages(recursive) discover
[0.169s] INFO:colcon.colcon_core.package_discovery:Crawling recursively for packages in '/BA/ros2_ws'
[0.170s] Level 1:colcon.colcon_core.package_identification:_identify(.) by extensions ['ignore', 'ignore_ament_install']
[0.170s] Level 1:colcon.colcon_core.package_identification:_identify(.) by extension 'ignore'
[0.170s] Level 1:colcon.colcon_core.package_identification:_identify(.) by extension 'ignore_ament_install'
[0.170s] Level 1:colcon.colcon_core.package_identification:_identify(.) by extensions ['colcon_pkg']
[0.170s] Level 1:colcon.colcon_core.package_identification:_identify(.) by extension 'colcon_pkg'
[0.170s] Level 1:colcon.colcon_core.package_identification:_identify(.) by extensions ['colcon_meta']
[0.170s] Level 1:colcon.colcon_core.package_identification:_identify(.) by extension 'colcon_meta'
[0.170s] Level 1:colcon.colcon_core.package_identification:_identify(.) by extensions ['ros']
[0.170s] Level 1:colcon.colcon_core.package_identification:_identify(.) by extension 'ros'
[0.181s] Level 1:colcon.colcon_core.package_identification:_identify(.) by extensions ['cmake', 'python']
[0.181s] Level 1:colcon.colcon_core.package_identification:_identify(.) by extension 'cmake'
[0.181s] Level 1:colcon.colcon_core.package_identification:_identify(.) by extension 'python'
[0.181s] Level 1:colcon.colcon_core.package_identification:_identify(.) by extensions ['python_setup_py']
[0.181s] Level 1:colcon.colcon_core.package_identification:_identify(.) by extension 'python_setup_py'
[0.182s] Level 1:colcon.colcon_core.package_identification:_identify(build) by extensions ['ignore', 'ignore_ament_install']
[0.182s] Level 1:colcon.colcon_core.package_identification:_identify(build) by extension 'ignore'
[0.183s] Level 1:colcon.colcon_core.package_identification:_identify(build) ignored
[0.184s] Level 1:colcon.colcon_core.package_identification:_identify(install) by extensions ['ignore', 'ignore_ament_install']
[0.184s] Level 1:colcon.colcon_core.package_identification:_identify(install) by extension 'ignore'
[0.185s] Level 1:colcon.colcon_core.package_identification:_identify(install) ignored
[0.185s] Level 1:colcon.colcon_core.package_identification:_identify(log) by extensions ['ignore', 'ignore_ament_install']
[0.185s] Level 1:colcon.colcon_core.package_identification:_identify(log) by extension 'ignore'
[0.185s] Level 1:colcon.colcon_core.package_identification:_identify(log) ignored
[0.186s] Level 1:colcon.colcon_core.package_identification:_identify(src) by extensions ['ignore', 'ignore_ament_install']
[0.186s] Level 1:colcon.colcon_core.package_identification:_identify(src) by extension 'ignore'
[0.186s] Level 1:colcon.colcon_core.package_identification:_identify(src) by extension 'ignore_ament_install'
[0.186s] Level 1:colcon.colcon_core.package_identification:_identify(src) by extensions ['colcon_pkg']
[0.186s] Level 1:colcon.colcon_core.package_identification:_identify(src) by extension 'colcon_pkg'
[0.186s] Level 1:colcon.colcon_core.package_identification:_identify(src) by extensions ['colcon_meta']
[0.186s] Level 1:colcon.colcon_core.package_identification:_identify(src) by extension 'colcon_meta'
[0.187s] Level 1:colcon.colcon_core.package_identification:_identify(src) by extensions ['ros']
[0.187s] Level 1:colcon.colcon_core.package_identification:_identify(src) by extension 'ros'
[0.187s] Level 1:colcon.colcon_core.package_identification:_identify(src) by extensions ['cmake', 'python']
[0.187s] Level 1:colcon.colcon_core.package_identification:_identify(src) by extension 'cmake'
[0.187s] Level 1:colcon.colcon_core.package_identification:_identify(src) by extension 'python'
[0.187s] Level 1:colcon.colcon_core.package_identification:_identify(src) by extensions ['python_setup_py']
[0.187s] Level 1:colcon.colcon_core.package_identification:_identify(src) by extension 'python_setup_py'
[0.189s] Level 1:colcon.colcon_core.package_identification:_identify(src/joint_states_control) by extensions ['ignore', 'ignore_ament_install']
[0.189s] Level 1:colcon.colcon_core.package_identification:_identify(src/joint_states_control) by extension 'ignore'
[0.190s] Level 1:colcon.colcon_core.package_identification:_identify(src/joint_states_control) by extension 'ignore_ament_install'
[0.190s] Level 1:colcon.colcon_core.package_identification:_identify(src/joint_states_control) by extensions ['colcon_pkg']
[0.190s] Level 1:colcon.colcon_core.package_identification:_identify(src/joint_states_control) by extension 'colcon_pkg'
[0.190s] Level 1:colcon.colcon_core.package_identification:_identify(src/joint_states_control) by extensions ['colcon_meta']
[0.190s] Level 1:colcon.colcon_core.package_identification:_identify(src/joint_states_control) by extension 'colcon_meta'
[0.190s] Level 1:colcon.colcon_core.package_identification:_identify(src/joint_states_control) by extensions ['ros']
[0.190s] Level 1:colcon.colcon_core.package_identification:_identify(src/joint_states_control) by extension 'ros'
[0.190s] Level 1:colcon.colcon_core.package_identification:_identify(src/joint_states_control) by extensions ['cmake', 'python']
[0.190s] Level 1:colcon.colcon_core.package_identification:_identify(src/joint_states_control) by extension 'cmake'
[0.190s] Level 1:colcon.colcon_core.package_identification:_identify(src/joint_states_control) by extension 'python'
[0.190s] Level 1:colcon.colcon_core.package_identification:_identify(src/joint_states_control) by extensions ['python_setup_py']
[0.190s] Level 1:colcon.colcon_core.package_identification:_identify(src/joint_states_control) by extension 'python_setup_py'
[0.191s] Level 1:colcon.colcon_core.package_identification:_identify(src/joint_states_control/__pycache__) by extensions ['ignore', 'ignore_ament_install']
[0.191s] Level 1:colcon.colcon_core.package_identification:_identify(src/joint_states_control/__pycache__) by extension 'ignore'
[0.191s] Level 1:colcon.colcon_core.package_identification:_identify(src/joint_states_control/__pycache__) by extension 'ignore_ament_install'
[0.191s] Level 1:colcon.colcon_core.package_identification:_identify(src/joint_states_control/__pycache__) by extensions ['colcon_pkg']
[0.191s] Level 1:colcon.colcon_core.package_identification:_identify(src/joint_states_control/__pycache__) by extension 'colcon_pkg'
[0.191s] Level 1:colcon.colcon_core.package_identification:_identify(src/joint_states_control/__pycache__) by extensions ['colcon_meta']
[0.191s] Level 1:colcon.colcon_core.package_identification:_identify(src/joint_states_control/__pycache__) by extension 'colcon_meta'
[0.191s] Level 1:colcon.colcon_core.package_identification:_identify(src/joint_states_control/__pycache__) by extensions ['ros']
[0.191s] Level 1:colcon.colcon_core.package_identification:_identify(src/joint_states_control/__pycache__) by extension 'ros'
[0.192s] Level 1:colcon.colcon_core.package_identification:_identify(src/joint_states_control/__pycache__) by extensions ['cmake', 'python']
[0.192s] Level 1:colcon.colcon_core.package_identification:_identify(src/joint_states_control/__pycache__) by extension 'cmake'
[0.192s] Level 1:colcon.colcon_core.package_identification:_identify(src/joint_states_control/__pycache__) by extension 'python'
[0.192s] Level 1:colcon.colcon_core.package_identification:_identify(src/joint_states_control/__pycache__) by extensions ['python_setup_py']
[0.192s] Level 1:colcon.colcon_core.package_identification:_identify(src/joint_states_control/__pycache__) by extension 'python_setup_py'
[0.192s] Level 1:colcon.colcon_core.package_identification:_identify(src/more_interfaces) by extensions ['ignore', 'ignore_ament_install']
[0.192s] Level 1:colcon.colcon_core.package_identification:_identify(src/more_interfaces) by extension 'ignore'
[0.193s] Level 1:colcon.colcon_core.package_identification:_identify(src/more_interfaces) by extension 'ignore_ament_install'
[0.193s] Level 1:colcon.colcon_core.package_identification:_identify(src/more_interfaces) by extensions ['colcon_pkg']
[0.193s] Level 1:colcon.colcon_core.package_identification:_identify(src/more_interfaces) by extension 'colcon_pkg'
[0.193s] Level 1:colcon.colcon_core.package_identification:_identify(src/more_interfaces) by extensions ['colcon_meta']
[0.193s] Level 1:colcon.colcon_core.package_identification:_identify(src/more_interfaces) by extension 'colcon_meta'
[0.193s] Level 1:colcon.colcon_core.package_identification:_identify(src/more_interfaces) by extensions ['ros']
[0.193s] Level 1:colcon.colcon_core.package_identification:_identify(src/more_interfaces) by extension 'ros'
[0.198s] DEBUG:colcon.colcon_core.package_identification:Package 'src/more_interfaces' with type 'ros.ament_cmake' and name 'more_interfaces'
[0.199s] Level 1:colcon.colcon_core.package_identification:_identify(src/py_pubsub) by extensions ['ignore', 'ignore_ament_install']
[0.199s] Level 1:colcon.colcon_core.package_identification:_identify(src/py_pubsub) by extension 'ignore'
[0.200s] Level 1:colcon.colcon_core.package_identification:_identify(src/py_pubsub) by extension 'ignore_ament_install'
[0.200s] Level 1:colcon.colcon_core.package_identification:_identify(src/py_pubsub) by extensions ['colcon_pkg']
[0.200s] Level 1:colcon.colcon_core.package_identification:_identify(src/py_pubsub) by extension 'colcon_pkg'
[0.200s] Level 1:colcon.colcon_core.package_identification:_identify(src/py_pubsub) by extensions ['colcon_meta']
[0.200s] Level 1:colcon.colcon_core.package_identification:_identify(src/py_pubsub) by extension 'colcon_meta'
[0.200s] Level 1:colcon.colcon_core.package_identification:_identify(src/py_pubsub) by extensions ['ros']
[0.200s] Level 1:colcon.colcon_core.package_identification:_identify(src/py_pubsub) by extension 'ros'
[0.201s] DEBUG:colcon.colcon_core.package_identification:Package 'src/py_pubsub' with type 'ros.ament_python' and name 'py_pubsub'
[0.202s] Level 1:colcon.colcon_core.package_identification:_identify(src/py_srvcli) by extensions ['ignore', 'ignore_ament_install']
[0.202s] Level 1:colcon.colcon_core.package_identification:_identify(src/py_srvcli) by extension 'ignore'
[0.202s] Level 1:colcon.colcon_core.package_identification:_identify(src/py_srvcli) by extension 'ignore_ament_install'
[0.202s] Level 1:colcon.colcon_core.package_identification:_identify(src/py_srvcli) by extensions ['colcon_pkg']
[0.202s] Level 1:colcon.colcon_core.package_identification:_identify(src/py_srvcli) by extension 'colcon_pkg'
[0.202s] Level 1:colcon.colcon_core.package_identification:_identify(src/py_srvcli) by extensions ['colcon_meta']
[0.202s] Level 1:colcon.colcon_core.package_identification:_identify(src/py_srvcli) by extension 'colcon_meta'
[0.202s] Level 1:colcon.colcon_core.package_identification:_identify(src/py_srvcli) by extensions ['ros']
[0.202s] Level 1:colcon.colcon_core.package_identification:_identify(src/py_srvcli) by extension 'ros'
[0.203s] DEBUG:colcon.colcon_core.package_identification:Package 'src/py_srvcli' with type 'ros.ament_python' and name 'py_srvcli'
[0.204s] Level 1:colcon.colcon_core.package_identification:_identify(src/python_parameters) by extensions ['ignore', 'ignore_ament_install']
[0.204s] Level 1:colcon.colcon_core.package_identification:_identify(src/python_parameters) by extension 'ignore'
[0.204s] Level 1:colcon.colcon_core.package_identification:_identify(src/python_parameters) by extension 'ignore_ament_install'
[0.204s] Level 1:colcon.colcon_core.package_identification:_identify(src/python_parameters) by extensions ['colcon_pkg']
[0.204s] Level 1:colcon.colcon_core.package_identification:_identify(src/python_parameters) by extension 'colcon_pkg'
[0.204s] Level 1:colcon.colcon_core.package_identification:_identify(src/python_parameters) by extensions ['colcon_meta']
[0.204s] Level 1:colcon.colcon_core.package_identification:_identify(src/python_parameters) by extension 'colcon_meta'
[0.204s] Level 1:colcon.colcon_core.package_identification:_identify(src/python_parameters) by extensions ['ros']
[0.204s] Level 1:colcon.colcon_core.package_identification:_identify(src/python_parameters) by extension 'ros'
[0.205s] DEBUG:colcon.colcon_core.package_identification:Package 'src/python_parameters' with type 'ros.ament_python' and name 'python_parameters'
[0.206s] Level 1:colcon.colcon_core.package_identification:_identify(src/tutorial_interfaces) by extensions ['ignore', 'ignore_ament_install']
[0.206s] Level 1:colcon.colcon_core.package_identification:_identify(src/tutorial_interfaces) by extension 'ignore'
[0.206s] Level 1:colcon.colcon_core.package_identification:_identify(src/tutorial_interfaces) by extension 'ignore_ament_install'
[0.206s] Level 1:colcon.colcon_core.package_identification:_identify(src/tutorial_interfaces) by extensions ['colcon_pkg']
[0.206s] Level 1:colcon.colcon_core.package_identification:_identify(src/tutorial_interfaces) by extension 'colcon_pkg'
[0.206s] Level 1:colcon.colcon_core.package_identification:_identify(src/tutorial_interfaces) by extensions ['colcon_meta']
[0.206s] Level 1:colcon.colcon_core.package_identification:_identify(src/tutorial_interfaces) by extension 'colcon_meta'
[0.206s] Level 1:colcon.colcon_core.package_identification:_identify(src/tutorial_interfaces) by extensions ['ros']
[0.206s] Level 1:colcon.colcon_core.package_identification:_identify(src/tutorial_interfaces) by extension 'ros'
[0.207s] DEBUG:colcon.colcon_core.package_identification:Package 'src/tutorial_interfaces' with type 'ros.ament_cmake' and name 'tutorial_interfaces'
[0.207s] Level 1:colcon.colcon_core.package_discovery:discover_packages(recursive) using defaults
[0.207s] Level 1:colcon.colcon_core.package_discovery:discover_packages(ignore) discover
[0.207s] Level 1:colcon.colcon_core.package_discovery:discover_packages(ignore) using defaults
[0.207s] Level 1:colcon.colcon_core.package_discovery:discover_packages(path) discover
[0.207s] Level 1:colcon.colcon_core.package_discovery:discover_packages(path) using defaults
[0.226s] INFO:colcon.colcon_core.package_selection:Skipping not selected package 'more_interfaces' in 'src/more_interfaces'
[0.226s] INFO:colcon.colcon_core.package_selection:Skipping not selected package 'python_parameters' in 'src/python_parameters'
[0.226s] INFO:colcon.colcon_core.package_selection:Skipping not selected package 'tutorial_interfaces' in 'src/tutorial_interfaces'
[0.226s] INFO:colcon.colcon_core.package_selection:Skipping not selected package 'py_srvcli' in 'src/py_srvcli'
[0.226s] Level 5:colcon.colcon_core.verb:set package 'py_pubsub' build argument 'cmake_args' from command line to 'None'
[0.226s] Level 5:colcon.colcon_core.verb:set package 'py_pubsub' build argument 'cmake_target' from command line to 'None'
[0.226s] Level 5:colcon.colcon_core.verb:set package 'py_pubsub' build argument 'cmake_target_skip_unavailable' from command line to 'False'
[0.226s] Level 5:colcon.colcon_core.verb:set package 'py_pubsub' build argument 'cmake_clean_cache' from command line to 'False'
[0.226s] Level 5:colcon.colcon_core.verb:set package 'py_pubsub' build argument 'cmake_clean_first' from command line to 'False'
[0.226s] Level 5:colcon.colcon_core.verb:set package 'py_pubsub' build argument 'cmake_force_configure' from command line to 'False'
[0.226s] Level 5:colcon.colcon_core.verb:set package 'py_pubsub' build argument 'ament_cmake_args' from command line to 'None'
[0.226s] Level 5:colcon.colcon_core.verb:set package 'py_pubsub' build argument 'catkin_cmake_args' from command line to 'None'
[0.226s] Level 5:colcon.colcon_core.verb:set package 'py_pubsub' build argument 'catkin_skip_building_tests' from command line to 'False'
[0.226s] DEBUG:colcon.colcon_core.verb:Building package 'py_pubsub' with the following arguments: {'ament_cmake_args': None, 'build_base': '/BA/ros2_ws/build/py_pubsub', 'catkin_cmake_args': None, 'catkin_skip_building_tests': False, 'cmake_args': None, 'cmake_clean_cache': False, 'cmake_clean_first': False, 'cmake_force_configure': False, 'cmake_target': None, 'cmake_target_skip_unavailable': False, 'install_base': '/BA/ros2_ws/install/py_pubsub', 'merge_install': False, 'path': '/BA/ros2_ws/src/py_pubsub', 'symlink_install': False, 'test_result_base': None}
[0.227s] INFO:colcon.colcon_core.executor:Executing jobs using 'parallel' executor
[0.229s] DEBUG:colcon.colcon_parallel_executor.executor.parallel:run_until_complete
[0.230s] INFO:colcon.colcon_ros.task.ament_python.build:Building ROS package in '/BA/ros2_ws/src/py_pubsub' with build type 'ament_python'
[0.231s] Level 1:colcon.colcon_core.shell:create_environment_hook('py_pubsub', 'ament_prefix_path')
[0.232s] INFO:colcon.colcon_core.plugin_system:Skipping extension 'colcon_core.shell.bat': Not used on non-Windows systems
[0.233s] INFO:colcon.colcon_core.shell:Creating environment hook '/BA/ros2_ws/install/py_pubsub/share/py_pubsub/hook/ament_prefix_path.ps1'
[0.236s] INFO:colcon.colcon_core.shell:Creating environment descriptor '/BA/ros2_ws/install/py_pubsub/share/py_pubsub/hook/ament_prefix_path.dsv'
[0.237s] INFO:colcon.colcon_core.shell:Creating environment hook '/BA/ros2_ws/install/py_pubsub/share/py_pubsub/hook/ament_prefix_path.sh'
[0.239s] INFO:colcon.colcon_core.shell:Skip shell extension 'powershell' for command environment: Not usable outside of PowerShell
[0.239s] DEBUG:colcon.colcon_core.shell:Skip shell extension 'dsv' for command environment
[0.262s] ERROR:colcon.colcon_core.shell:Exception in shell extension 'sh': Expected ['.', '/BA/ros2_ws/build/py_pubsub/colcon_command_prefix_setup_py.sh', '&&', 'env'] to pass: The build time path "/ros2_ws/install/tutorial_interfaces" doesn't exist. Either source a script for a different shell or set the environment variable "COLCON_CURRENT_PREFIX" explicitly.
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/colcon_core/shell/__init__.py", line 308, in get_command_environment
return await extension.generate_command_environment(
File "/usr/lib/python3/dist-packages/colcon_core/shell/sh.py", line 154, in generate_command_environment
env = await get_environment_variables(cmd, cwd=str(build_base))
File "/usr/lib/python3/dist-packages/colcon_core/shell/__init__.py", line 344, in get_environment_variables
output = await check_output(cmd, cwd=cwd, shell=shell)
File "/usr/lib/python3/dist-packages/colcon_core/subprocess.py", line 129, in check_output
assert not rc, f'Expected {args} to pass: {stderr_data}'
AssertionError: Expected ['.', '/BA/ros2_ws/build/py_pubsub/colcon_command_prefix_setup_py.sh', '&&', 'env'] to pass: The build time path "/ros2_ws/install/tutorial_interfaces" doesn't exist. Either source a script for a different shell or set the environment variable "COLCON_CURRENT_PREFIX" explicitly.
[0.263s] DEBUG:colcon.colcon_core.shell:Skip shell extension 'bash' for command environment
[0.263s] DEBUG:colcon.colcon_core.shell:Skip shell extension 'zsh' for command environment
[0.263s] ERROR:colcon.colcon_ros.task.ament_python.build:Could not find a shell extension for the command environment
[0.274s] DEBUG:colcon.colcon_parallel_executor.executor.parallel:closing loop
[0.275s] DEBUG:colcon.colcon_parallel_executor.executor.parallel:loop closed
[0.275s] DEBUG:colcon.colcon_parallel_executor.executor.parallel:run_until_complete finished with '1'
[0.275s] DEBUG:colcon.colcon_core.event_reactor:joining thread
[0.281s] INFO:colcon.colcon_core.plugin_system:Skipping extension 'colcon_notification.desktop_notification.notify_send': Could not find 'notify-send'
[0.281s] INFO:colcon.colcon_core.plugin_system:Skipping extension 'colcon_notification.desktop_notification.terminal_notifier': Not used on non-Darwin systems
[0.281s] INFO:colcon.colcon_core.plugin_system:Skipping extension 'colcon_notification.desktop_notification.win32': Not used on non-Windows systems
[0.281s] INFO:colcon.colcon_notification.desktop_notification:Sending desktop notification using 'notify2'
[0.283s] DEBUG:colcon.colcon_notification.desktop_notification.notify2:Failed to initialize notify2: org.freedesktop.DBus.Error.NotSupported: Unable to autolaunch a dbus-daemon without a $DISPLAY for X11
[0.283s] DEBUG:colcon.colcon_core.event_reactor:joined thread
[0.283s] INFO:colcon.colcon_core.shell:Creating prefix script '/BA/ros2_ws/install/local_setup.ps1'
[0.285s] INFO:colcon.colcon_core.shell:Creating prefix util module '/BA/ros2_ws/install/_local_setup_util_ps1.py'
[0.287s] INFO:colcon.colcon_core.shell:Creating prefix chain script '/BA/ros2_ws/install/setup.ps1'
[0.288s] INFO:colcon.colcon_core.shell:Creating prefix script '/BA/ros2_ws/install/local_setup.sh'
[0.289s] INFO:colcon.colcon_core.shell:Creating prefix util module '/BA/ros2_ws/install/_local_setup_util_sh.py'
[0.290s] INFO:colcon.colcon_core.shell:Creating prefix chain script '/BA/ros2_ws/install/setup.sh'
[0.291s] INFO:colcon.colcon_core.shell:Creating prefix script '/BA/ros2_ws/install/local_setup.bash'
[0.292s] INFO:colcon.colcon_core.shell:Creating prefix chain script '/BA/ros2_ws/install/setup.bash'
[0.293s] INFO:colcon.colcon_core.shell:Creating prefix script '/BA/ros2_ws/install/local_setup.zsh'
[0.294s] INFO:colcon.colcon_core.shell:Creating prefix chain script '/BA/ros2_ws/install/setup.zsh'

29
test/collision.py Normal file
View File

@ -0,0 +1,29 @@
import pybullet as p
# Start PyBullet simulation
physicsClient = p.connect(p.DIRECT) # or p.GUI for graphical interface
# Load your robot URDF
robot_id = p.loadURDF("/ur10e.urdf", useFixedBase=True)
# Set joint angles
joint_angles = [0, 0, 3.141/2, 0, 0, 0]
for i, angle in enumerate(joint_angles):
p.setJointMotorControl2(robot_id, i, p.POSITION_CONTROL, targetPosition=angle)
# Step the simulation to update the robot's state
p.stepSimulation()
# Check if any link is colliding
collision = False
for i in range(p.getNumBodies()):
contact_points = p.getContactPoints(robot_id)
print(contact_points)
if len(contact_points) > 0:
collision = True
break
if collision:
print("The robot has collided with itself.")
else:
print("No collision detected.")

View File

@ -0,0 +1,78 @@
import rclpy
from rclpy.node import Node
from sensor_msgs.msg import JointState
import csv
import os
import roboticstoolbox as rtb
class JointStateLogger(Node):
def __init__(self):
super().__init__('joint_state_logger_split')
# Subscribe to /joint_states topic
self.subscription = self.create_subscription(
JointState,
'/joint_states',
self.joint_states_callback,
1000
)
self.robot = rtb.ERobot.URDF('/BA/ur10e.urdf')
# Directory to store logs
self.log_dir = '/BA/joint_states_logs'
os.makedirs(self.log_dir, exist_ok=True)
self.log_dir_cart = '/BA/joint_states_cart_logs'
os.makedirs(self.log_dir_cart, exist_ok=True)
def joint_states_callback(self, msg: JointState):
# Use ROS time as timestamp
stamp = msg.header.stamp
timestamp = f"{stamp.sec}.{str(stamp.nanosec).zfill(9)}"
for i, name in enumerate(msg.name):
# File per joint
file_path = os.path.join(self.log_dir, f"{name}.csv")
# If file doesn't exist, create with header
if not os.path.exists(file_path):
with open(file_path, mode='w', newline='') as f:
writer = csv.writer(f)
writer.writerow(["timestamp", "position", "velocity", "effort"])
# Get values if they exist
position = msg.position[i] if i < len(msg.position) else ''
velocity = msg.velocity[i] if i < len(msg.velocity) else ''
effort = msg.effort[i] if i < len(msg.effort) else ''
# Append to joint-specific CSV
with open(file_path, mode='a', newline='') as f:
writer = csv.writer(f)
writer.writerow([timestamp, position, velocity, effort])
file_path_cart = os.path.join(self.log_dir_cart, "cartesian.csv")
if not os.path.exists(file_path_cart):
with open(file_path_cart, mode='w', newline='') as f:
writer = csv.writer(f)
writer.writerow(["timestamp", "x", "y", "z", "roll", "pitch", "yaw"])
with open(file_path_cart, mode='a', newline='') as f:
writer = csv.writer(f)
[x,y,z] = self.robot.fkine(list([msg.position[-1]])+list(msg.position[:4])).t
[roll, pitch, yaw] = self.robot.fkine(list([msg.position[-1]])+list(msg.position[:4])).rpy()
writer.writerow([timestamp, x, y, z, roll, pitch, yaw])
def main():
rclpy.init()
node = JointStateLogger()
try:
rclpy.spin(node)
except KeyboardInterrupt:
print("")
finally:
node.destroy_node()
rclpy.shutdown()
if __name__ == '__main__':
main()

View File

@ -0,0 +1,81 @@
import rclpy
from rclpy.node import Node
from trajectory_msgs.msg import JointTrajectory
import csv
import os
import roboticstoolbox as rtb
class JointTrajectoryLogger(Node):
def __init__(self):
super().__init__('joint_trajectory_logger_minimal')
# Folder to store CSV files
self.log_dir = '/BA/joint_trajectories'
os.makedirs(self.log_dir, exist_ok=True)
self.log_dir_cart = '/BA/joint_trajectories_cart'
os.makedirs(self.log_dir_cart, exist_ok=True)
# Subscriber to JointTrajectory messages
self.subscription = self.create_subscription(
JointTrajectory,
'/scaled_joint_trajectory_controller/joint_trajectory',
self.trajectory_callback,
10
)
self.counter = 0
self.robot = rtb.ERobot.URDF('/BA/ur10e.urdf')
def trajectory_callback(self, msg: JointTrajectory):
self.counter += 1
# Create a unique filename
filename = f"trajectory_{self.counter:04d}.csv"
file_path = os.path.join(self.log_dir, filename)
# Header: timestamp + joint names
header = ['timestamp'] + msg.joint_names
recive_time = msg.header.stamp.sec + msg.header.stamp.nanosec * 1e-9
with open(file_path, mode='w', newline='') as file:
writer = csv.writer(file)
writer.writerow(header)
for point in msg.points:
timestamp = recive_time + point.time_from_start.sec + point.time_from_start.nanosec * 1e-9
row = [timestamp] + list(point.positions)
writer.writerow(row)
filename_cart = f"trajectory_{self.counter:04d}_cart.csv"
file_path_cart = os.path.join(self.log_dir_cart, filename_cart)
header = ['timestamp', 'x', 'y', 'z', 'roll', 'pitch', 'yaw']
# Convert joint angles to cartesian coordinates
joint_angles = point.positions
# Write to CSV
with open(file_path_cart, mode='w', newline='') as file:
writer = csv.writer(file)
writer.writerow(header)
for point in msg.points:
timestamp = recive_time + point.time_from_start.sec + point.time_from_start.nanosec * 1e-9
T = self.robot.fkine(point.positions)
x = T.t[0]
y = T.t[1]
z = T.t[2]
roll, pitch, yaw = T.rpy()
row = [timestamp, x, y, z, roll, pitch, yaw]
writer.writerow(row)
def main():
rclpy.init()
node = JointTrajectoryLogger()
try:
rclpy.spin(node)
except KeyboardInterrupt:
print("")
finally:
node.destroy_node()
rclpy.shutdown()
if __name__ == '__main__':
main()

46
test/load_robot.py Normal file
View File

@ -0,0 +1,46 @@
import xml.etree.ElementTree as ET
import roboticstoolbox as rtb
def main():
"""Main function to get joint names and start the ROS 2 & OSC system."""
robot_urdf = input("Enter the path to the URDF file: ")
tree = ET.parse(robot_urdf)
root = tree.getroot()
joint_names = [joint.get('name') for joint in root.findall('joint') if joint.get('type') == 'revolute' or joint.get('type') == 'continuous' or joint.get('type') == 'prismatic']
robot = rtb.ERobot.URDF(robot_urdf)
joint_velocity_limits = {}
# Iterate over all joints in the URDF
for joint in root.findall('.//joint'):
joint_name = joint.get('name') # Get the name of the joint
# Look for the <limit> tag under each joint
limit = joint.find('limit')
if limit is not None:
# Extract the velocity limit (if it exists)
velocity_limit = limit.get('velocity')
if velocity_limit is not None:
joint_velocity_limits[joint_name] = float(velocity_limit)
while True:
try:
print("The cost mask determines which coordinates are used for the IK. Each element of the cost mask corresponds to a catesian coordinate [x, y, z, Rx, Ry, Rz].")
print("The cost mask [1, 1, 1, 0, 0, 0] means that the IK will only consider translation and no rotaion.")
cost_mask = [int(i) for i in input(f"Enter the cost mask (6 integers (1 or 0), of which <= {robot.n} are 1): ")]
if sum(cost_mask) <= robot.n and len(cost_mask) == 6:
break
else:
print(f"Invalid input. Expected 6 integers of which {robot.n if robot.n < 6 else 6} or less are 1.")
except ValueError:
print("Invalid input. Please enter integers only.")
print(f"Cost mask: {cost_mask}")
print(f'robot: {robot}')
print(f'joint names: {joint_names}')
print(f'joint velocity limits: {joint_velocity_limits}')
if __name__ == '__main__':
main()

61
test/log_recording.py Normal file
View File

@ -0,0 +1,61 @@
import rclpy
from rclpy.node import Node
from rcl_interfaces.msg import Log
import csv
import os
class RosoutLogger(Node):
def __init__(self):
super().__init__('rosout_logger_csv')
# Log file path
self.log_dir = '/BA/rosout_logs'
os.makedirs(self.log_dir, exist_ok=True)
self.csv_file_path = os.path.join(self.log_dir, 'rosout_log.csv')
# Initialize CSV with header if it doesn't exist
if not os.path.exists(self.csv_file_path):
with open(self.csv_file_path, mode='w', newline='') as f:
writer = csv.writer(f)
writer.writerow(['timestamp', 'level', 'logger_name', 'message'])
# Subscribe to /rosout
self.subscription = self.create_subscription(
Log,
'/rosout',
self.rosout_callback,
10
)
def rosout_callback(self, msg: Log):
# Format timestamp
timestamp = f"{msg.stamp.sec}.{str(msg.stamp.nanosec).zfill(9)}"
# Convert level integer to text
level_dict = {
Log.DEBUG: 'DEBUG',
Log.INFO: 'INFO',
Log.WARN: 'WARN',
Log.ERROR: 'ERROR',
Log.FATAL: 'FATAL'
}
level_text = level_dict.get(msg.level, f"LEVEL_{msg.level}")
# Write row to CSV
with open(self.csv_file_path, mode='a', newline='') as f:
writer = csv.writer(f)
writer.writerow([timestamp, level_text, msg.name, msg.msg])
def main():
rclpy.init()
node = RosoutLogger()
try:
rclpy.spin(node)
except KeyboardInterrupt:
node.get_logger().info("Interrupted by user.")
finally:
node.destroy_node()
rclpy.shutdown()
if __name__ == '__main__':
main()

0
test/rampfunction.py Normal file
View File

28
test/timetag_test_pub.py Normal file
View File

@ -0,0 +1,28 @@
# Import needed modules from osc4py3
from osc4py3.as_eventloop import *
from osc4py3 import oscbuildparse
import time
# Start the system.
osc_startup()
# Make client channels to send packets.
osc_udp_client("172.18.0.3", 8000, "aclientname")
# Buils a complete bundle, and postpone its executions by 10 sec.
exectime = time.time() + 10 # execute in 10 seconds
stamp = oscbuildparse.unixtime2timetag(exectime)
# Build a simple message and send it.
msg = oscbuildparse.OSCMessage("/test/me", ",sift", ["text", 672, 8.871, stamp])
osc_send(msg, "aclientname")
# Build a message with autodetection of data types, and send it.
msg = oscbuildparse.OSCMessage("/test/me", None, ["text", 672, 8.871])
osc_send(msg, "aclientname")
# …
osc_process()
# …
# Properly close the system.
osc_terminate()

19
test/timetag_test_sub.py Normal file
View File

@ -0,0 +1,19 @@
# Import needed modules from osc4py3
from osc4py3.as_allthreads import *
from osc4py3 import oscmethod as osm
from osc4py3 import oscbuildparse
def handlerfunction(*args):
# Will receive message data unpacked in s, x, y
print(args[-1].sec)
print(oscbuildparse.timetag2unixtime(args[-1]))
# Start the system.
osc_startup()
# Make server channels to receive packets.
osc_udp_server("0.0.0.0", 8000, "anotherserver")
# Associate Python functions with message address patterns, using default
# argument scheme OSCARG_DATAUNPACK.
osc_method("/test/me", handlerfunction, argscheme=osm.OSCARG_TYPETAGS + osm.OSCARG_DATAUNPACK)

542
ur10e.urdf Normal file
View File

@ -0,0 +1,542 @@
<?xml version="1.0" ?>
<!-- =================================================================================== -->
<!-- | This document was autogenerated by xacro from /opt/ros/humble/share/ur_description/urdf/ur.urdf.xacro | -->
<!-- | EDITING THIS FILE BY HAND IS NOT RECOMMENDED | -->
<!-- =================================================================================== -->
<robot name="ur10e">
<!--
Base UR robot series xacro macro.
NOTE this is NOT a URDF. It cannot directly be loaded by consumers
expecting a flattened '.urdf' file. See the top-level '.xacro' for that
(but note that .xacro must still be processed by the xacro command).
This file models the base kinematic chain of a UR robot, which then gets
parameterised by various configuration files to convert it into a UR3(e),
UR5(e), UR10(e) or UR16e.
NOTE the default kinematic parameters (i.e., link lengths, frame locations,
offsets, etc) do not correspond to any particular robot. They are defaults
only. There WILL be non-zero offsets between the Forward Kinematics results
in TF (i.e., robot_state_publisher) and the values reported by the Teach
Pendant.
For accurate (and robot-specific) transforms, the 'kinematics_parameters_file'
parameter MUST point to a .yaml file containing the appropriate values for
the targeted robot.
If using the UniversalRobots/Universal_Robots_ROS_Driver, follow the steps
described in the readme of that repository to extract the kinematic
calibration from the controller and generate the required .yaml file.
Main author of the migration to yaml configs Ludovic Delval.
Contributors to previous versions (in no particular order)
- Denis Stogl
- Lovro Ivanov
- Felix Messmer
- Kelsey Hawkins
- Wim Meeussen
- Shaun Edwards
- Nadia Hammoudeh Garcia
- Dave Hershberger
- G. vd. Hoorn
- Philip Long
- Dave Coleman
- Miguel Prada
- Mathias Luedtke
- Marcel Schnirring
- Felix von Drigalski
- Felix Exner
- Jimmy Da Silva
- Ajit Krisshna N L
- Muhammad Asif Rana
-->
<!--
NOTE the macro defined in this file is NOT part of the public API of this
package. Users CANNOT rely on this file being available, or stored in
this location. Nor can they rely on the existence of the macro.
-->
<!-- create link fixed to the "world" -->
<link name="world"/>
<ros2_control name="ur10e" type="system">
<hardware>
<plugin>ur_robot_driver/URPositionHardwareInterface</plugin>
<param name="robot_ip">172.18.0.2</param>
<param name="script_filename">/opt/ros/humble/share/ur_client_library/resources/external_control.urscript</param>
<param name="output_recipe_filename">/opt/ros/humble/share/ur_robot_driver/resources/rtde_output_recipe.txt</param>
<param name="input_recipe_filename">/opt/ros/humble/share/ur_robot_driver/resources/rtde_input_recipe.txt</param>
<param name="headless_mode">False</param>
<param name="reverse_port">50001</param>
<param name="script_sender_port">50002</param>
<param name="reverse_ip">0.0.0.0</param>
<param name="script_command_port">50004</param>
<param name="trajectory_port">50003</param>
<param name="tf_prefix"></param>
<param name="non_blocking_read">True</param>
<param name="servoj_gain">2000</param>
<param name="servoj_lookahead_time">0.03</param>
<param name="use_tool_communication">False</param>
<param name="kinematics/hash">calib_5119701370761913513</param>
<param name="tool_voltage">0</param>
<param name="tool_parity">0</param>
<param name="tool_baud_rate">115200</param>
<param name="tool_stop_bits">1</param>
<param name="tool_rx_idle_chars">1.5</param>
<param name="tool_tx_idle_chars">3.5</param>
<param name="tool_device_name">/tmp/ttyUR</param>
<param name="tool_tcp_port">54321</param>
<param name="keep_alive_count">2</param>
</hardware>
<joint name="shoulder_pan_joint">
<command_interface name="position"/>
<command_interface name="velocity"/>
<state_interface name="position">
<!-- initial position for the FakeSystem and simulation -->
<param name="initial_value">0.0</param>
</state_interface>
<state_interface name="velocity"/>
<state_interface name="effort"/>
</joint>
<joint name="shoulder_lift_joint">
<command_interface name="position"/>
<command_interface name="velocity"/>
<state_interface name="position">
<!-- initial position for the FakeSystem and simulation -->
<param name="initial_value">-1.57</param>
</state_interface>
<state_interface name="velocity"/>
<state_interface name="effort"/>
</joint>
<joint name="elbow_joint">
<command_interface name="position"/>
<command_interface name="velocity"/>
<state_interface name="position">
<!-- initial position for the FakeSystem and simulation -->
<param name="initial_value">0.0</param>
</state_interface>
<state_interface name="velocity"/>
<state_interface name="effort"/>
</joint>
<joint name="wrist_1_joint">
<command_interface name="position"/>
<command_interface name="velocity"/>
<state_interface name="position">
<!-- initial position for the FakeSystem and simulation -->
<param name="initial_value">-1.57</param>
</state_interface>
<state_interface name="velocity"/>
<state_interface name="effort"/>
</joint>
<joint name="wrist_2_joint">
<command_interface name="position"/>
<command_interface name="velocity"/>
<state_interface name="position">
<!-- initial position for the FakeSystem and simulation -->
<param name="initial_value">0.0</param>
</state_interface>
<state_interface name="velocity"/>
<state_interface name="effort"/>
</joint>
<joint name="wrist_3_joint">
<command_interface name="position"/>
<command_interface name="velocity"/>
<state_interface name="position">
<!-- initial position for the FakeSystem and simulation -->
<param name="initial_value">0.0</param>
</state_interface>
<state_interface name="velocity"/>
<state_interface name="effort"/>
</joint>
<sensor name="tcp_fts_sensor">
<state_interface name="force.x"/>
<state_interface name="force.y"/>
<state_interface name="force.z"/>
<state_interface name="torque.x"/>
<state_interface name="torque.y"/>
<state_interface name="torque.z"/>
</sensor>
<sensor name="tcp_pose">
<state_interface name="position.x"/>
<state_interface name="position.y"/>
<state_interface name="position.z"/>
<state_interface name="orientation.x"/>
<state_interface name="orientation.y"/>
<state_interface name="orientation.z"/>
<state_interface name="orientation.w"/>
</sensor>
<!-- NOTE The following are joints used only for testing with fake hardware and will change in the future -->
<gpio name="speed_scaling">
<state_interface name="speed_scaling_factor"/>
<param name="initial_speed_scaling_factor">1</param>
<command_interface name="target_speed_fraction_cmd"/>
<command_interface name="target_speed_fraction_async_success"/>
</gpio>
<gpio name="gpio">
<command_interface name="standard_digital_output_cmd_0"/>
<command_interface name="standard_digital_output_cmd_1"/>
<command_interface name="standard_digital_output_cmd_2"/>
<command_interface name="standard_digital_output_cmd_3"/>
<command_interface name="standard_digital_output_cmd_4"/>
<command_interface name="standard_digital_output_cmd_5"/>
<command_interface name="standard_digital_output_cmd_6"/>
<command_interface name="standard_digital_output_cmd_7"/>
<command_interface name="standard_digital_output_cmd_8"/>
<command_interface name="standard_digital_output_cmd_9"/>
<command_interface name="standard_digital_output_cmd_10"/>
<command_interface name="standard_digital_output_cmd_11"/>
<command_interface name="standard_digital_output_cmd_12"/>
<command_interface name="standard_digital_output_cmd_13"/>
<command_interface name="standard_digital_output_cmd_14"/>
<command_interface name="standard_digital_output_cmd_15"/>
<command_interface name="standard_digital_output_cmd_16"/>
<command_interface name="standard_digital_output_cmd_17"/>
<command_interface name="standard_analog_output_cmd_0"/>
<command_interface name="standard_analog_output_cmd_1"/>
<command_interface name="analog_output_domain_cmd"/>
<command_interface name="tool_voltage_cmd"/>
<command_interface name="io_async_success"/>
<state_interface name="digital_output_0"/>
<state_interface name="digital_output_1"/>
<state_interface name="digital_output_2"/>
<state_interface name="digital_output_3"/>
<state_interface name="digital_output_4"/>
<state_interface name="digital_output_5"/>
<state_interface name="digital_output_6"/>
<state_interface name="digital_output_7"/>
<state_interface name="digital_output_8"/>
<state_interface name="digital_output_9"/>
<state_interface name="digital_output_10"/>
<state_interface name="digital_output_11"/>
<state_interface name="digital_output_12"/>
<state_interface name="digital_output_13"/>
<state_interface name="digital_output_14"/>
<state_interface name="digital_output_15"/>
<state_interface name="digital_output_16"/>
<state_interface name="digital_output_17"/>
<state_interface name="digital_input_0"/>
<state_interface name="digital_input_1"/>
<state_interface name="digital_input_2"/>
<state_interface name="digital_input_3"/>
<state_interface name="digital_input_4"/>
<state_interface name="digital_input_5"/>
<state_interface name="digital_input_6"/>
<state_interface name="digital_input_7"/>
<state_interface name="digital_input_8"/>
<state_interface name="digital_input_9"/>
<state_interface name="digital_input_10"/>
<state_interface name="digital_input_11"/>
<state_interface name="digital_input_12"/>
<state_interface name="digital_input_13"/>
<state_interface name="digital_input_14"/>
<state_interface name="digital_input_15"/>
<state_interface name="digital_input_16"/>
<state_interface name="digital_input_17"/>
<state_interface name="standard_analog_output_0"/>
<state_interface name="standard_analog_output_1"/>
<state_interface name="standard_analog_input_0"/>
<state_interface name="standard_analog_input_1"/>
<state_interface name="analog_io_type_0"/>
<state_interface name="analog_io_type_1"/>
<state_interface name="analog_io_type_2"/>
<state_interface name="analog_io_type_3"/>
<state_interface name="tool_mode"/>
<state_interface name="tool_output_voltage"/>
<state_interface name="tool_output_current"/>
<state_interface name="tool_temperature"/>
<state_interface name="tool_analog_input_0"/>
<state_interface name="tool_analog_input_1"/>
<state_interface name="tool_analog_input_type_0"/>
<state_interface name="tool_analog_input_type_1"/>
<state_interface name="robot_mode"/>
<state_interface name="robot_status_bit_0"/>
<state_interface name="robot_status_bit_1"/>
<state_interface name="robot_status_bit_2"/>
<state_interface name="robot_status_bit_3"/>
<state_interface name="safety_mode"/>
<state_interface name="safety_status_bit_0"/>
<state_interface name="safety_status_bit_1"/>
<state_interface name="safety_status_bit_2"/>
<state_interface name="safety_status_bit_3"/>
<state_interface name="safety_status_bit_4"/>
<state_interface name="safety_status_bit_5"/>
<state_interface name="safety_status_bit_6"/>
<state_interface name="safety_status_bit_7"/>
<state_interface name="safety_status_bit_8"/>
<state_interface name="safety_status_bit_9"/>
<state_interface name="safety_status_bit_10"/>
<state_interface name="program_running"/>
</gpio>
<gpio name="payload">
<command_interface name="mass"/>
<command_interface name="cog.x"/>
<command_interface name="cog.y"/>
<command_interface name="cog.z"/>
<command_interface name="payload_async_success"/>
</gpio>
<gpio name="resend_robot_program">
<command_interface name="resend_robot_program_cmd"/>
<command_interface name="resend_robot_program_async_success"/>
</gpio>
<gpio name="hand_back_control">
<command_interface name="hand_back_control_cmd"/>
<command_interface name="hand_back_control_async_success"/>
</gpio>
<gpio name="zero_ftsensor">
<command_interface name="zero_ftsensor_cmd"/>
<command_interface name="zero_ftsensor_async_success"/>
</gpio>
<gpio name="system_interface">
<state_interface name="initialized"/>
</gpio>
<gpio name="get_robot_software_version">
<state_interface name="get_version_major"/>
<state_interface name="get_version_minor"/>
<state_interface name="get_version_build"/>
<state_interface name="get_version_bugfix"/>
</gpio>
</ros2_control>
<!-- Add URDF transmission elements (for ros_control) -->
<!--<xacro:ur_arm_transmission prefix="${prefix}" hw_interface="${transmission_hw_interface}" />-->
<!-- Placeholder for ros2_control transmission which don't yet exist -->
<!-- links - main serial chain -->
<link name="base_link"/>
<link name="base_link_inertia">
<visual>
<origin rpy="0 0 3.141592653589793" xyz="0 0 0"/>
<geometry>
<mesh filename="/opt/ros/humble/share/ur_description/meshes/ur10e/visual/base.dae"/>
</geometry>
</visual>
<collision>
<origin rpy="0 0 3.141592653589793" xyz="0 0 0"/>
<geometry>
<mesh filename="/opt/ros/humble/share/ur_description/meshes/ur10e/collision/base.stl"/>
</geometry>
</collision>
<inertial>
<mass value="4.0"/>
<origin rpy="0 0 0" xyz="0 0 0"/>
<inertia ixx="0.0061063308908" ixy="0.0" ixz="0.0" iyy="0.0061063308908" iyz="0.0" izz="0.01125"/>
</inertial>
</link>
<link name="shoulder_link">
<visual>
<origin rpy="0 0 3.141592653589793" xyz="0 0 0"/>
<geometry>
<mesh filename="/opt/ros/humble/share/ur_description/meshes/ur10e/visual/shoulder.dae"/>
</geometry>
</visual>
<collision>
<origin rpy="0 0 3.141592653589793" xyz="0 0 0"/>
<geometry>
<mesh filename="/opt/ros/humble/share/ur_description/meshes/ur10e/collision/shoulder.stl"/>
</geometry>
</collision>
<inertial>
<mass value="7.369"/>
<origin rpy="1.570796326794897 0 0" xyz="0.021 -0.027 0.0"/>
<inertia ixx="0.03408" ixy="2e-05" ixz="-0.00425" iyy="0.03529" iyz="8e-05" izz="0.02156"/>
</inertial>
</link>
<link name="upper_arm_link">
<visual>
<origin rpy="1.5707963267948966 0 -1.5707963267948966" xyz="0 0 0.1762"/>
<geometry>
<mesh filename="/opt/ros/humble/share/ur_description/meshes/ur10e/visual/upperarm.dae"/>
</geometry>
</visual>
<collision>
<origin rpy="1.5707963267948966 0 -1.5707963267948966" xyz="0 0 0.1762"/>
<geometry>
<mesh filename="/opt/ros/humble/share/ur_description/meshes/ur10e/collision/upperarm.stl"/>
</geometry>
</collision>
<inertial>
<mass value="13.051"/>
<origin rpy="0 0 0" xyz="-0.2327 0.0 0.158"/>
<inertia ixx="0.02814" ixy="5e-05" ixz="-0.01561" iyy="0.77068" iyz="2e-05" izz="0.76943"/>
</inertial>
</link>
<link name="forearm_link">
<visual>
<origin rpy="1.5707963267948966 0 -1.5707963267948966" xyz="0 0 0.0393"/>
<geometry>
<mesh filename="/opt/ros/humble/share/ur_description/meshes/ur10e/visual/forearm.dae"/>
</geometry>
</visual>
<collision>
<origin rpy="1.5707963267948966 0 -1.5707963267948966" xyz="0 0 0.0393"/>
<geometry>
<mesh filename="/opt/ros/humble/share/ur_description/meshes/ur10e/collision/forearm.stl"/>
</geometry>
</collision>
<inertial>
<mass value="3.989"/>
<origin rpy="0 0 0" xyz="-0.33155 0.0 0.068"/>
<inertia ixx="0.01014" ixy="8e-05" ixz="0.00916" iyy="0.30928" iyz="0.0" izz="0.30646"/>
</inertial>
</link>
<link name="wrist_1_link">
<visual>
<origin rpy="1.5707963267948966 0 0" xyz="0 0 -0.135"/>
<geometry>
<mesh filename="/opt/ros/humble/share/ur_description/meshes/ur10e/visual/wrist1.dae"/>
</geometry>
</visual>
<collision>
<origin rpy="1.5707963267948966 0 0" xyz="0 0 -0.135"/>
<geometry>
<mesh filename="/opt/ros/humble/share/ur_description/meshes/ur10e/collision/wrist1.stl"/>
</geometry>
</collision>
<inertial>
<mass value="2.1"/>
<origin rpy="1.570796326794897 0 0" xyz="0.0 -0.018 0.007"/>
<inertia ixx="0.00296" ixy="-1e-05" ixz="0.0" iyy="0.00222" iyz="-0.00024" izz="0.00258"/>
</inertial>
</link>
<link name="wrist_2_link">
<visual>
<origin rpy="0 0 0" xyz="0 0 -0.12"/>
<geometry>
<mesh filename="/opt/ros/humble/share/ur_description/meshes/ur10e/visual/wrist2.dae"/>
</geometry>
</visual>
<collision>
<origin rpy="0 0 0" xyz="0 0 -0.12"/>
<geometry>
<mesh filename="/opt/ros/humble/share/ur_description/meshes/ur10e/collision/wrist2.stl"/>
</geometry>
</collision>
<inertial>
<mass value="1.98"/>
<origin rpy="-1.570796326794897 0 0" xyz="0.0 0.018 -0.007"/>
<inertia ixx="0.00296" ixy="-1e-05" ixz="0.0" iyy="0.00222" iyz="-0.00024" izz="0.00258"/>
</inertial>
</link>
<link name="wrist_3_link">
<visual>
<origin rpy="1.5707963267948966 0 0" xyz="0 0 -0.1168"/>
<geometry>
<mesh filename="/opt/ros/humble/share/ur_description/meshes/ur10e/visual/wrist3.dae"/>
</geometry>
</visual>
<collision>
<origin rpy="1.5707963267948966 0 0" xyz="0 0 -0.1168"/>
<geometry>
<mesh filename="/opt/ros/humble/share/ur_description/meshes/ur10e/collision/wrist3.stl"/>
</geometry>
</collision>
<inertial>
<mass value="0.615"/>
<origin rpy="0 0 0" xyz="0.0 0.0 -0.026"/>
<inertia ixx="0.0004" ixy="0.0" ixz="0.0" iyy="0.00041" iyz="0.0" izz="0.00034"/>
</inertial>
</link>
<!-- base_joint fixes base_link to the environment -->
<joint name="base_joint" type="fixed">
<origin rpy="0 0 0" xyz="0 0 0"/>
<parent link="world"/>
<child link="base_link"/>
</joint>
<!-- joints - main serial chain -->
<joint name="base_link-base_link_inertia" type="fixed">
<parent link="base_link"/>
<child link="base_link_inertia"/>
<!-- 'base_link' is REP-103 aligned (so X+ forward), while the internal
frames of the robot/controller have X+ pointing backwards.
Use the joint between 'base_link' and 'base_link_inertia' (a dummy
link/frame) to introduce the necessary rotation over Z (of pi rad).
-->
<origin rpy="0 0 3.141592653589793" xyz="0 0 0"/>
</joint>
<joint name="shoulder_pan_joint" type="revolute">
<parent link="base_link_inertia"/>
<child link="shoulder_link"/>
<origin rpy="0 0 0" xyz="0 0 0.1807"/>
<axis xyz="0 0 1"/>
<limit effort="330.0" lower="-6.283185307179586" upper="6.283185307179586" velocity="2.0943951023931953"/>
<safety_controller k_position="20" k_velocity="0.0" soft_lower_limit="-6.133185307179586" soft_upper_limit="6.133185307179586"/>
<dynamics damping="0" friction="0"/>
</joint>
<joint name="shoulder_lift_joint" type="revolute">
<parent link="shoulder_link"/>
<child link="upper_arm_link"/>
<origin rpy="1.570796327 0 0" xyz="0 0 0"/>
<axis xyz="0 0 1"/>
<limit effort="330.0" lower="-6.283185307179586" upper="6.283185307179586" velocity="2.0943951023931953"/>
<safety_controller k_position="20" k_velocity="0.0" soft_lower_limit="-6.133185307179586" soft_upper_limit="6.133185307179586"/>
<dynamics damping="0" friction="0"/>
</joint>
<joint name="elbow_joint" type="revolute">
<parent link="upper_arm_link"/>
<child link="forearm_link"/>
<origin rpy="0 0 0" xyz="-0.6127 0 0"/>
<axis xyz="0 0 1"/>
<limit effort="150.0" lower="-3.141592653589793" upper="3.141592653589793" velocity="3.141592653589793"/>
<safety_controller k_position="20" k_velocity="0.0" soft_lower_limit="-2.991592653589793" soft_upper_limit="2.991592653589793"/>
<dynamics damping="0" friction="0"/>
</joint>
<joint name="wrist_1_joint" type="revolute">
<parent link="forearm_link"/>
<child link="wrist_1_link"/>
<origin rpy="0 0 0" xyz="-0.57155 0 0.17415"/>
<axis xyz="0 0 1"/>
<limit effort="54.0" lower="-6.283185307179586" upper="6.283185307179586" velocity="3.141592653589793"/>
<safety_controller k_position="20" k_velocity="0.0" soft_lower_limit="-6.133185307179586" soft_upper_limit="6.133185307179586"/>
<dynamics damping="0" friction="0"/>
</joint>
<joint name="wrist_2_joint" type="revolute">
<parent link="wrist_1_link"/>
<child link="wrist_2_link"/>
<origin rpy="1.570796327 0 0" xyz="0 -0.11985 -2.458164590756244e-11"/>
<axis xyz="0 0 1"/>
<limit effort="54.0" lower="-6.283185307179586" upper="6.283185307179586" velocity="3.141592653589793"/>
<safety_controller k_position="20" k_velocity="0.0" soft_lower_limit="-6.133185307179586" soft_upper_limit="6.133185307179586"/>
<dynamics damping="0" friction="0"/>
</joint>
<joint name="wrist_3_joint" type="revolute">
<parent link="wrist_2_link"/>
<child link="wrist_3_link"/>
<origin rpy="1.570796326589793 3.141592653589793 3.141592653589793" xyz="0 0.11655 -2.390480459346185e-11"/>
<axis xyz="0 0 1"/>
<limit effort="54.0" lower="-6.283185307179586" upper="6.283185307179586" velocity="3.141592653589793"/>
<safety_controller k_position="20" k_velocity="0.0" soft_lower_limit="-6.133185307179586" soft_upper_limit="6.133185307179586"/>
<dynamics damping="0" friction="0"/>
</joint>
<link name="ft_frame"/>
<joint name="wrist_3_link-ft_frame" type="fixed">
<parent link="wrist_3_link"/>
<child link="ft_frame"/>
<origin rpy="3.141592653589793 0 0" xyz="0 0 0"/>
</joint>
<!-- ROS-Industrial 'base' frame - base_link to UR 'Base' Coordinates transform -->
<link name="base"/>
<joint name="base_link-base_fixed_joint" type="fixed">
<!-- Note the rotation over Z of pi radians - as base_link is REP-103
aligned (i.e., has X+ forward, Y+ left and Z+ up), this is needed
to correctly align 'base' with the 'Base' coordinate system of
the UR controller.
-->
<origin rpy="0 0 3.141592653589793" xyz="0 0 0"/>
<parent link="base_link"/>
<child link="base"/>
</joint>
<!-- ROS-Industrial 'flange' frame - attachment point for EEF models -->
<link name="flange"/>
<joint name="wrist_3-flange" type="fixed">
<parent link="wrist_3_link"/>
<child link="flange"/>
<origin rpy="0 -1.5707963267948966 -1.5707963267948966" xyz="0 0 0"/>
</joint>
<!-- ROS-Industrial 'tool0' frame - all-zeros tool frame -->
<link name="tool0"/>
<joint name="flange-tool0" type="fixed">
<!-- default toolframe - X+ left, Y+ up, Z+ front -->
<origin rpy="1.5707963267948966 0 1.5707963267948966" xyz="0 0 0"/>
<parent link="flange"/>
<child link="tool0"/>
</joint>
</robot>

542
ur5.urdf Normal file
View File

@ -0,0 +1,542 @@
<?xml version="1.0" ?>
<!-- =================================================================================== -->
<!-- | This document was autogenerated by xacro from /opt/ros/humble/share/ur_description/urdf/ur.urdf.xacro | -->
<!-- | EDITING THIS FILE BY HAND IS NOT RECOMMENDED | -->
<!-- =================================================================================== -->
<robot name="ur5">
<!--
Base UR robot series xacro macro.
NOTE this is NOT a URDF. It cannot directly be loaded by consumers
expecting a flattened '.urdf' file. See the top-level '.xacro' for that
(but note that .xacro must still be processed by the xacro command).
This file models the base kinematic chain of a UR robot, which then gets
parameterised by various configuration files to convert it into a UR3(e),
UR5(e), UR10(e) or UR16e.
NOTE the default kinematic parameters (i.e., link lengths, frame locations,
offsets, etc) do not correspond to any particular robot. They are defaults
only. There WILL be non-zero offsets between the Forward Kinematics results
in TF (i.e., robot_state_publisher) and the values reported by the Teach
Pendant.
For accurate (and robot-specific) transforms, the 'kinematics_parameters_file'
parameter MUST point to a .yaml file containing the appropriate values for
the targeted robot.
If using the UniversalRobots/Universal_Robots_ROS_Driver, follow the steps
described in the readme of that repository to extract the kinematic
calibration from the controller and generate the required .yaml file.
Main author of the migration to yaml configs Ludovic Delval.
Contributors to previous versions (in no particular order)
- Denis Stogl
- Lovro Ivanov
- Felix Messmer
- Kelsey Hawkins
- Wim Meeussen
- Shaun Edwards
- Nadia Hammoudeh Garcia
- Dave Hershberger
- G. vd. Hoorn
- Philip Long
- Dave Coleman
- Miguel Prada
- Mathias Luedtke
- Marcel Schnirring
- Felix von Drigalski
- Felix Exner
- Jimmy Da Silva
- Ajit Krisshna N L
- Muhammad Asif Rana
-->
<!--
NOTE the macro defined in this file is NOT part of the public API of this
package. Users CANNOT rely on this file being available, or stored in
this location. Nor can they rely on the existence of the macro.
-->
<!-- create link fixed to the "world" -->
<link name="world"/>
<ros2_control name="ur5" type="system">
<hardware>
<plugin>ur_robot_driver/URPositionHardwareInterface</plugin>
<param name="robot_ip">172.18.0.2</param>
<param name="script_filename">/opt/ros/humble/share/ur_client_library/resources/external_control.urscript</param>
<param name="output_recipe_filename">/opt/ros/humble/share/ur_robot_driver/resources/rtde_output_recipe.txt</param>
<param name="input_recipe_filename">/opt/ros/humble/share/ur_robot_driver/resources/rtde_input_recipe.txt</param>
<param name="headless_mode">False</param>
<param name="reverse_port">50001</param>
<param name="script_sender_port">50002</param>
<param name="reverse_ip">0.0.0.0</param>
<param name="script_command_port">50004</param>
<param name="trajectory_port">50003</param>
<param name="tf_prefix"></param>
<param name="non_blocking_read">True</param>
<param name="servoj_gain">2000</param>
<param name="servoj_lookahead_time">0.03</param>
<param name="use_tool_communication">False</param>
<param name="kinematics/hash">calib_209549117540498681</param>
<param name="tool_voltage">0</param>
<param name="tool_parity">0</param>
<param name="tool_baud_rate">115200</param>
<param name="tool_stop_bits">1</param>
<param name="tool_rx_idle_chars">1.5</param>
<param name="tool_tx_idle_chars">3.5</param>
<param name="tool_device_name">/tmp/ttyUR</param>
<param name="tool_tcp_port">54321</param>
<param name="keep_alive_count">2</param>
</hardware>
<joint name="shoulder_pan_joint">
<command_interface name="position"/>
<command_interface name="velocity"/>
<state_interface name="position">
<!-- initial position for the FakeSystem and simulation -->
<param name="initial_value">0.0</param>
</state_interface>
<state_interface name="velocity"/>
<state_interface name="effort"/>
</joint>
<joint name="shoulder_lift_joint">
<command_interface name="position"/>
<command_interface name="velocity"/>
<state_interface name="position">
<!-- initial position for the FakeSystem and simulation -->
<param name="initial_value">-1.57</param>
</state_interface>
<state_interface name="velocity"/>
<state_interface name="effort"/>
</joint>
<joint name="elbow_joint">
<command_interface name="position"/>
<command_interface name="velocity"/>
<state_interface name="position">
<!-- initial position for the FakeSystem and simulation -->
<param name="initial_value">0.0</param>
</state_interface>
<state_interface name="velocity"/>
<state_interface name="effort"/>
</joint>
<joint name="wrist_1_joint">
<command_interface name="position"/>
<command_interface name="velocity"/>
<state_interface name="position">
<!-- initial position for the FakeSystem and simulation -->
<param name="initial_value">-1.57</param>
</state_interface>
<state_interface name="velocity"/>
<state_interface name="effort"/>
</joint>
<joint name="wrist_2_joint">
<command_interface name="position"/>
<command_interface name="velocity"/>
<state_interface name="position">
<!-- initial position for the FakeSystem and simulation -->
<param name="initial_value">0.0</param>
</state_interface>
<state_interface name="velocity"/>
<state_interface name="effort"/>
</joint>
<joint name="wrist_3_joint">
<command_interface name="position"/>
<command_interface name="velocity"/>
<state_interface name="position">
<!-- initial position for the FakeSystem and simulation -->
<param name="initial_value">0.0</param>
</state_interface>
<state_interface name="velocity"/>
<state_interface name="effort"/>
</joint>
<sensor name="tcp_fts_sensor">
<state_interface name="force.x"/>
<state_interface name="force.y"/>
<state_interface name="force.z"/>
<state_interface name="torque.x"/>
<state_interface name="torque.y"/>
<state_interface name="torque.z"/>
</sensor>
<sensor name="tcp_pose">
<state_interface name="position.x"/>
<state_interface name="position.y"/>
<state_interface name="position.z"/>
<state_interface name="orientation.x"/>
<state_interface name="orientation.y"/>
<state_interface name="orientation.z"/>
<state_interface name="orientation.w"/>
</sensor>
<!-- NOTE The following are joints used only for testing with fake hardware and will change in the future -->
<gpio name="speed_scaling">
<state_interface name="speed_scaling_factor"/>
<param name="initial_speed_scaling_factor">1</param>
<command_interface name="target_speed_fraction_cmd"/>
<command_interface name="target_speed_fraction_async_success"/>
</gpio>
<gpio name="gpio">
<command_interface name="standard_digital_output_cmd_0"/>
<command_interface name="standard_digital_output_cmd_1"/>
<command_interface name="standard_digital_output_cmd_2"/>
<command_interface name="standard_digital_output_cmd_3"/>
<command_interface name="standard_digital_output_cmd_4"/>
<command_interface name="standard_digital_output_cmd_5"/>
<command_interface name="standard_digital_output_cmd_6"/>
<command_interface name="standard_digital_output_cmd_7"/>
<command_interface name="standard_digital_output_cmd_8"/>
<command_interface name="standard_digital_output_cmd_9"/>
<command_interface name="standard_digital_output_cmd_10"/>
<command_interface name="standard_digital_output_cmd_11"/>
<command_interface name="standard_digital_output_cmd_12"/>
<command_interface name="standard_digital_output_cmd_13"/>
<command_interface name="standard_digital_output_cmd_14"/>
<command_interface name="standard_digital_output_cmd_15"/>
<command_interface name="standard_digital_output_cmd_16"/>
<command_interface name="standard_digital_output_cmd_17"/>
<command_interface name="standard_analog_output_cmd_0"/>
<command_interface name="standard_analog_output_cmd_1"/>
<command_interface name="analog_output_domain_cmd"/>
<command_interface name="tool_voltage_cmd"/>
<command_interface name="io_async_success"/>
<state_interface name="digital_output_0"/>
<state_interface name="digital_output_1"/>
<state_interface name="digital_output_2"/>
<state_interface name="digital_output_3"/>
<state_interface name="digital_output_4"/>
<state_interface name="digital_output_5"/>
<state_interface name="digital_output_6"/>
<state_interface name="digital_output_7"/>
<state_interface name="digital_output_8"/>
<state_interface name="digital_output_9"/>
<state_interface name="digital_output_10"/>
<state_interface name="digital_output_11"/>
<state_interface name="digital_output_12"/>
<state_interface name="digital_output_13"/>
<state_interface name="digital_output_14"/>
<state_interface name="digital_output_15"/>
<state_interface name="digital_output_16"/>
<state_interface name="digital_output_17"/>
<state_interface name="digital_input_0"/>
<state_interface name="digital_input_1"/>
<state_interface name="digital_input_2"/>
<state_interface name="digital_input_3"/>
<state_interface name="digital_input_4"/>
<state_interface name="digital_input_5"/>
<state_interface name="digital_input_6"/>
<state_interface name="digital_input_7"/>
<state_interface name="digital_input_8"/>
<state_interface name="digital_input_9"/>
<state_interface name="digital_input_10"/>
<state_interface name="digital_input_11"/>
<state_interface name="digital_input_12"/>
<state_interface name="digital_input_13"/>
<state_interface name="digital_input_14"/>
<state_interface name="digital_input_15"/>
<state_interface name="digital_input_16"/>
<state_interface name="digital_input_17"/>
<state_interface name="standard_analog_output_0"/>
<state_interface name="standard_analog_output_1"/>
<state_interface name="standard_analog_input_0"/>
<state_interface name="standard_analog_input_1"/>
<state_interface name="analog_io_type_0"/>
<state_interface name="analog_io_type_1"/>
<state_interface name="analog_io_type_2"/>
<state_interface name="analog_io_type_3"/>
<state_interface name="tool_mode"/>
<state_interface name="tool_output_voltage"/>
<state_interface name="tool_output_current"/>
<state_interface name="tool_temperature"/>
<state_interface name="tool_analog_input_0"/>
<state_interface name="tool_analog_input_1"/>
<state_interface name="tool_analog_input_type_0"/>
<state_interface name="tool_analog_input_type_1"/>
<state_interface name="robot_mode"/>
<state_interface name="robot_status_bit_0"/>
<state_interface name="robot_status_bit_1"/>
<state_interface name="robot_status_bit_2"/>
<state_interface name="robot_status_bit_3"/>
<state_interface name="safety_mode"/>
<state_interface name="safety_status_bit_0"/>
<state_interface name="safety_status_bit_1"/>
<state_interface name="safety_status_bit_2"/>
<state_interface name="safety_status_bit_3"/>
<state_interface name="safety_status_bit_4"/>
<state_interface name="safety_status_bit_5"/>
<state_interface name="safety_status_bit_6"/>
<state_interface name="safety_status_bit_7"/>
<state_interface name="safety_status_bit_8"/>
<state_interface name="safety_status_bit_9"/>
<state_interface name="safety_status_bit_10"/>
<state_interface name="program_running"/>
</gpio>
<gpio name="payload">
<command_interface name="mass"/>
<command_interface name="cog.x"/>
<command_interface name="cog.y"/>
<command_interface name="cog.z"/>
<command_interface name="payload_async_success"/>
</gpio>
<gpio name="resend_robot_program">
<command_interface name="resend_robot_program_cmd"/>
<command_interface name="resend_robot_program_async_success"/>
</gpio>
<gpio name="hand_back_control">
<command_interface name="hand_back_control_cmd"/>
<command_interface name="hand_back_control_async_success"/>
</gpio>
<gpio name="zero_ftsensor">
<command_interface name="zero_ftsensor_cmd"/>
<command_interface name="zero_ftsensor_async_success"/>
</gpio>
<gpio name="system_interface">
<state_interface name="initialized"/>
</gpio>
<gpio name="get_robot_software_version">
<state_interface name="get_version_major"/>
<state_interface name="get_version_minor"/>
<state_interface name="get_version_build"/>
<state_interface name="get_version_bugfix"/>
</gpio>
</ros2_control>
<!-- Add URDF transmission elements (for ros_control) -->
<!--<xacro:ur_arm_transmission prefix="${prefix}" hw_interface="${transmission_hw_interface}" />-->
<!-- Placeholder for ros2_control transmission which don't yet exist -->
<!-- links - main serial chain -->
<link name="base_link"/>
<link name="base_link_inertia">
<visual>
<origin rpy="0 0 3.141592653589793" xyz="0 0 0"/>
<geometry>
<mesh filename="package://ur_description/meshes/ur5/visual/base.dae"/>
</geometry>
</visual>
<collision>
<origin rpy="0 0 3.141592653589793" xyz="0 0 0"/>
<geometry>
<mesh filename="package://ur_description/meshes/ur5/collision/base.stl"/>
</geometry>
</collision>
<inertial>
<mass value="4.0"/>
<origin rpy="0 0 0" xyz="0 0 0"/>
<inertia ixx="0.00443333156" ixy="0.0" ixz="0.0" iyy="0.00443333156" iyz="0.0" izz="0.0072"/>
</inertial>
</link>
<link name="shoulder_link">
<visual>
<origin rpy="0 0 3.141592653589793" xyz="0 0 0"/>
<geometry>
<mesh filename="package://ur_description/meshes/ur5/visual/shoulder.dae"/>
</geometry>
</visual>
<collision>
<origin rpy="0 0 3.141592653589793" xyz="0 0 0"/>
<geometry>
<mesh filename="package://ur_description/meshes/ur5/collision/shoulder.stl"/>
</geometry>
</collision>
<inertial>
<mass value="3.7"/>
<origin rpy="0 0 0" xyz="0.0 -0.00193 -0.02561"/>
<inertia ixx="0.014972358333333331" ixy="0" ixz="0" iyy="0.014972358333333331" iyz="0" izz="0.01040625"/>
</inertial>
</link>
<link name="upper_arm_link">
<visual>
<origin rpy="1.5707963267948966 0 -1.5707963267948966" xyz="0 0 0.13585"/>
<geometry>
<mesh filename="package://ur_description/meshes/ur5/visual/upperarm.dae"/>
</geometry>
</visual>
<collision>
<origin rpy="1.5707963267948966 0 -1.5707963267948966" xyz="0 0 0.13585"/>
<geometry>
<mesh filename="package://ur_description/meshes/ur5/collision/upperarm.stl"/>
</geometry>
</collision>
<inertial>
<mass value="8.393"/>
<origin rpy="0 1.570796326794897 0" xyz="-0.2125 0.0 0.11336"/>
<inertia ixx="0.13388583541666665" ixy="0" ixz="0" iyy="0.13388583541666665" iyz="0" izz="0.0151074"/>
</inertial>
</link>
<link name="forearm_link">
<visual>
<origin rpy="1.5707963267948966 0 -1.5707963267948966" xyz="0 0 0.0165"/>
<geometry>
<mesh filename="package://ur_description/meshes/ur5/visual/forearm.dae"/>
</geometry>
</visual>
<collision>
<origin rpy="1.5707963267948966 0 -1.5707963267948966" xyz="0 0 0.0165"/>
<geometry>
<mesh filename="package://ur_description/meshes/ur5/collision/forearm.stl"/>
</geometry>
</collision>
<inertial>
<mass value="2.33"/>
<origin rpy="0 1.570796326794897 0" xyz="-0.24225 0.0 0.0265"/>
<inertia ixx="0.031216803515624995" ixy="0" ixz="0" iyy="0.031216803515624995" iyz="0" izz="0.004095"/>
</inertial>
</link>
<link name="wrist_1_link">
<visual>
<origin rpy="1.5707963267948966 0 0" xyz="0 0 -0.093"/>
<geometry>
<mesh filename="package://ur_description/meshes/ur5/visual/wrist1.dae"/>
</geometry>
</visual>
<collision>
<origin rpy="1.5707963267948966 0 0" xyz="0 0 -0.093"/>
<geometry>
<mesh filename="package://ur_description/meshes/ur5/collision/wrist1.stl"/>
</geometry>
</collision>
<inertial>
<mass value="1.219"/>
<origin rpy="0 0 0" xyz="0.0 -0.01634 -0.0018"/>
<inertia ixx="0.002013889583333333" ixy="0" ixz="0" iyy="0.002013889583333333" iyz="0" izz="0.0021942"/>
</inertial>
</link>
<link name="wrist_2_link">
<visual>
<origin rpy="0 0 0" xyz="0 0 -0.095"/>
<geometry>
<mesh filename="package://ur_description/meshes/ur5/visual/wrist2.dae"/>
</geometry>
</visual>
<collision>
<origin rpy="0 0 0" xyz="0 0 -0.095"/>
<geometry>
<mesh filename="package://ur_description/meshes/ur5/collision/wrist2.stl"/>
</geometry>
</collision>
<inertial>
<mass value="1.219"/>
<origin rpy="0 0 0" xyz="0.0 0.01634 -0.0018"/>
<inertia ixx="0.0018310395833333333" ixy="0" ixz="0" iyy="0.0018310395833333333" iyz="0" izz="0.0021942"/>
</inertial>
</link>
<link name="wrist_3_link">
<visual>
<origin rpy="1.5707963267948966 0 0" xyz="0 0 -0.0818"/>
<geometry>
<mesh filename="package://ur_description/meshes/ur5/visual/wrist3.dae"/>
</geometry>
</visual>
<collision>
<origin rpy="1.5707963267948966 0 0" xyz="0 0 -0.0818"/>
<geometry>
<mesh filename="package://ur_description/meshes/ur5/collision/wrist3.stl"/>
</geometry>
</collision>
<inertial>
<mass value="0.1879"/>
<origin rpy="0 0 0" xyz="0.0 0.0 -0.001159"/>
<inertia ixx="8.062475833333332e-05" ixy="0" ixz="0" iyy="8.062475833333332e-05" iyz="0" izz="0.0001321171875"/>
</inertial>
</link>
<!-- base_joint fixes base_link to the environment -->
<joint name="base_joint" type="fixed">
<origin rpy="0 0 0" xyz="0 0 0"/>
<parent link="world"/>
<child link="base_link"/>
</joint>
<!-- joints - main serial chain -->
<joint name="base_link-base_link_inertia" type="fixed">
<parent link="base_link"/>
<child link="base_link_inertia"/>
<!-- 'base_link' is REP-103 aligned (so X+ forward), while the internal
frames of the robot/controller have X+ pointing backwards.
Use the joint between 'base_link' and 'base_link_inertia' (a dummy
link/frame) to introduce the necessary rotation over Z (of pi rad).
-->
<origin rpy="0 0 3.141592653589793" xyz="0 0 0"/>
</joint>
<joint name="shoulder_pan_joint" type="revolute">
<parent link="base_link_inertia"/>
<child link="shoulder_link"/>
<origin rpy="0 0 0" xyz="0 0 0.089159"/>
<axis xyz="0 0 1"/>
<limit effort="150.0" lower="-6.283185307179586" upper="6.283185307179586" velocity="3.141592653589793"/>
<safety_controller k_position="20" k_velocity="0.0" soft_lower_limit="-6.133185307179586" soft_upper_limit="6.133185307179586"/>
<dynamics damping="0" friction="0"/>
</joint>
<joint name="shoulder_lift_joint" type="revolute">
<parent link="shoulder_link"/>
<child link="upper_arm_link"/>
<origin rpy="1.570796327 0 0" xyz="0 0 0"/>
<axis xyz="0 0 1"/>
<limit effort="150.0" lower="-6.283185307179586" upper="6.283185307179586" velocity="3.141592653589793"/>
<safety_controller k_position="20" k_velocity="0.0" soft_lower_limit="-6.133185307179586" soft_upper_limit="6.133185307179586"/>
<dynamics damping="0" friction="0"/>
</joint>
<joint name="elbow_joint" type="revolute">
<parent link="upper_arm_link"/>
<child link="forearm_link"/>
<origin rpy="0 0 0" xyz="-0.425 0 0"/>
<axis xyz="0 0 1"/>
<limit effort="150.0" lower="-3.141592653589793" upper="3.141592653589793" velocity="3.141592653589793"/>
<safety_controller k_position="20" k_velocity="0.0" soft_lower_limit="-2.991592653589793" soft_upper_limit="2.991592653589793"/>
<dynamics damping="0" friction="0"/>
</joint>
<joint name="wrist_1_joint" type="revolute">
<parent link="forearm_link"/>
<child link="wrist_1_link"/>
<origin rpy="0 0 0" xyz="-0.39225 0 0.10915"/>
<axis xyz="0 0 1"/>
<limit effort="28.0" lower="-6.283185307179586" upper="6.283185307179586" velocity="3.141592653589793"/>
<safety_controller k_position="20" k_velocity="0.0" soft_lower_limit="-6.133185307179586" soft_upper_limit="6.133185307179586"/>
<dynamics damping="0" friction="0"/>
</joint>
<joint name="wrist_2_joint" type="revolute">
<parent link="wrist_1_link"/>
<child link="wrist_2_link"/>
<origin rpy="1.570796327 0 0" xyz="0 -0.09465 -1.941303950897609e-11"/>
<axis xyz="0 0 1"/>
<limit effort="28.0" lower="-6.283185307179586" upper="6.283185307179586" velocity="3.141592653589793"/>
<safety_controller k_position="20" k_velocity="0.0" soft_lower_limit="-6.133185307179586" soft_upper_limit="6.133185307179586"/>
<dynamics damping="0" friction="0"/>
</joint>
<joint name="wrist_3_joint" type="revolute">
<parent link="wrist_2_link"/>
<child link="wrist_3_link"/>
<origin rpy="1.570796326589793 3.141592653589793 3.141592653589793" xyz="0 0.0823 -1.688001216681175e-11"/>
<axis xyz="0 0 1"/>
<limit effort="28.0" lower="-6.283185307179586" upper="6.283185307179586" velocity="3.141592653589793"/>
<safety_controller k_position="20" k_velocity="0.0" soft_lower_limit="-6.133185307179586" soft_upper_limit="6.133185307179586"/>
<dynamics damping="0" friction="0"/>
</joint>
<link name="ft_frame"/>
<joint name="wrist_3_link-ft_frame" type="fixed">
<parent link="wrist_3_link"/>
<child link="ft_frame"/>
<origin rpy="3.141592653589793 0 0" xyz="0 0 0"/>
</joint>
<!-- ROS-Industrial 'base' frame - base_link to UR 'Base' Coordinates transform -->
<link name="base"/>
<joint name="base_link-base_fixed_joint" type="fixed">
<!-- Note the rotation over Z of pi radians - as base_link is REP-103
aligned (i.e., has X+ forward, Y+ left and Z+ up), this is needed
to correctly align 'base' with the 'Base' coordinate system of
the UR controller.
-->
<origin rpy="0 0 3.141592653589793" xyz="0 0 0"/>
<parent link="base_link"/>
<child link="base"/>
</joint>
<!-- ROS-Industrial 'flange' frame - attachment point for EEF models -->
<link name="flange"/>
<joint name="wrist_3-flange" type="fixed">
<parent link="wrist_3_link"/>
<child link="flange"/>
<origin rpy="0 -1.5707963267948966 -1.5707963267948966" xyz="0 0 0"/>
</joint>
<!-- ROS-Industrial 'tool0' frame - all-zeros tool frame -->
<link name="tool0"/>
<joint name="flange-tool0" type="fixed">
<!-- default toolframe - X+ left, Y+ up, Z+ front -->
<origin rpy="1.5707963267948966 0 1.5707963267948966" xyz="0 0 0"/>
<parent link="flange"/>
<child link="tool0"/>
</joint>
</robot>

BIN
workspace/.DS_Store vendored Normal file

Binary file not shown.

View File

@ -0,0 +1,108 @@
import rclpy
from rclpy.node import Node
from trajectory_msgs.msg import JointTrajectory, JointTrajectoryPoint
from osc4py3.as_eventloop import *
from osc4py3 import oscmethod as osm
import roboticstoolbox as rtb
import spatialmath as sm
import xml.etree.ElementTree as ET
import time
class ScaledJointTrajectoryPublisher(Node):
"""Node to publish joint trajectories based on OSC messages."""
def __init__(self, robot, joint_names):
super().__init__('scaled_joint_trajectory_publisher')
# ROS2 Publisher
self.publisher = self.create_publisher(
JointTrajectory,
'/scaled_joint_trajectory_controller/joint_trajectory',
10
)
# Store received joint positions
self.joint_positions = [0.0] * len(joint_names)
self.joint_names = joint_names
self.robot = robot
osc_startup()
osc_udp_server("0.0.0.0", 8000, "osc_server")
print("Server started on 0.0.0.0:8000 \nready to receive messages in the following format: /tcp_coordinates [x, y, z, roll, pitch, yaw] optional: duration as last argument: /tcp_coordinates [x, y, z, roll, pitch, yaw, duration]")
# Register OSC handler
osc_method("/tcp_coordinates", self.tcp_coordinates_handler, argscheme=osm.OSCARG_DATAUNPACK)
def tcp_coordinates_handler(self, *args):
"""Handles incoming OSC messages for tcp position."""
time1 = time.time()
if len(args) == len(self.joint_positions):
x, y, z, roll, pitch, yaw = args
duration = 4.0 # Default duration
elif len(args) == len(self.joint_positions) + 1:
x, y, z, roll, pitch, yaw, duration = args
else:
print("Invalid number of arguments")
return
# Create the desired end-effector pose
Tep = sm.SE3(x, y, z) * sm.SE3.RPY([roll, pitch, yaw], order='xyz')
# Compute the inverse kinematics to get the joint angles
#time1 = time.time()
#sol = self.robot.ikine_LM(Tep)
#print(f"Time taken for ERobot: {time.time() - time1}")
#time1 = time.time()
#sol = self.robot.ikine_LM(Tep, q0=self.joint_positions)
#print(f"Time taken for ERobot with initial guess: {time.time() - time1}")
#time1 = time.time()
#sol = self.robot.ets().ikine_LM(Tep)
#print(f"Time taken for ETS: {time.time() - time1}")
#time1 = time.time()
sol = self.robot.ik_LM(Tep, q0=self.joint_positions)
#print(f"Time taken for ETS with initial guess: {time.time() - time1}")
if sol[1]:
joint_positions = list(sol[0])
self.send_trajectory(joint_positions, duration)
#print(f"Computed joint positions: {joint_positions}")
else:
print("Inverse kinematics failed")
print(f"Frequency: {1/(time.time() - time1)} Hz")
def send_trajectory(self, joint_positions, duration=4.0):
"""Publish a joint trajectory command to move the robot."""
msg = JointTrajectory()
msg.joint_names = self.joint_names
point = JointTrajectoryPoint()
point.positions = joint_positions # Updated joint positions
point.time_from_start.sec = int(duration)
point.time_from_start.nanosec = int((duration - int(duration)) * 1e9)
msg.points.append(point)
self.publisher.publish(msg)
print(f"Updated joint positions: {joint_positions}")
def main():
"""Main function to get joint names and start the ROS 2 & OSC system."""
tree = ET.parse('/BA/robot.urdf')
root = tree.getroot()
joint_names = [joint.get('name') for joint in root.findall('joint') if joint.get('type') == 'revolute' or joint.get('type') == 'continuous' or joint.get('type') == 'prismatic']
robot = rtb.ERobot.URDF('/BA/robot.urdf')
rclpy.init()
node = ScaledJointTrajectoryPublisher(robot.ets(), joint_names)
# Run both ROS 2 and OSC Server together
try:
while rclpy.ok():
osc_process() # Handle one OSC request at a time
rclpy.spin_once(node, timeout_sec=0.1) # Process ROS callbacks
except KeyboardInterrupt:
print("")
finally:
node.destroy_node()
rclpy.shutdown()
osc_terminate()
if __name__ == '__main__':
main()

View File

@ -0,0 +1,80 @@
import rclpy
from rclpy.node import Node
from trajectory_msgs.msg import JointTrajectory, JointTrajectoryPoint
from osc4py3.as_eventloop import *
from osc4py3 import oscmethod as osm
import xml.etree.ElementTree as ET
class ScaledJointTrajectoryPublisher(Node):
"""Node to publish joint trajectories based on OSC messages."""
def __init__(self, joint_names):
super().__init__('scaled_joint_trajectory_publisher')
# ROS2 Publisher
self.publisher = self.create_publisher(
JointTrajectory,
'/scaled_joint_trajectory_controller/joint_trajectory',
10
)
# Store received joint positions
self.joint_positions = [0.0] * len(joint_names)
self.joint_names = joint_names
osc_startup()
osc_udp_server("0.0.0.0", 8000, "osc_server")
print("Server started on 0.0.0.0:8000 \nready to receive messages in the following format: \n /joint_angles [joint_positions]; optional: duration as last element, default is 3sec")
# Register OSC handler
osc_method("/joint_angles", self.joint_angles_handler, argscheme=osm.OSCARG_DATAUNPACK)
def joint_angles_handler(self, *args):
"""Handles incoming OSC messages for joint positions."""
if len(args) == len(self.joint_positions):
self.joint_positions = args
self.send_trajectory(self.joint_positions)
elif len(args) == len(self.joint_positions) + 1:
self.joint_positions = args[:-1]
self.send_trajectory(self.joint_positions, args[-1])
print(f'Duration: {args[-1]}')
def send_trajectory(self, joint_positions, duration=3.0):
"""Publish a joint trajectory command to move the robot."""
msg = JointTrajectory()
msg.joint_names = self.joint_names
point = JointTrajectoryPoint()
point.positions = joint_positions # Updated joint positions
point.time_from_start.sec = int(duration)
point.time_from_start.nanosec = int((duration - int(duration)) * 1e9)
msg.points.append(point)
self.publisher.publish(msg)
print(f"Updated joint positions: {self.joint_positions}")
def main():
"""Main function to get joint names and start the ROS 2 & OSC system."""
tree = ET.parse('/BA/robot.urdf')
root = tree.getroot()
joint_names = [joint.get('name') for joint in root.findall('joint') if joint.get('type') == 'revolute' or joint.get('type') == 'continuous' or joint.get('type') == 'prismatic']
rclpy.init()
node = ScaledJointTrajectoryPublisher(joint_names)
# Run both ROS 2 and OSC Server together
try:
while rclpy.ok():
osc_process() # Handle one OSC request at a time
rclpy.spin_once(node, timeout_sec=0.1) # Process ROS callbacks
except KeyboardInterrupt:
print("")
finally:
node.destroy_node()
rclpy.shutdown()
osc_terminate()
if __name__ == '__main__':
main()

View File

@ -0,0 +1,78 @@
import rclpy
from rclpy.node import Node
from trajectory_msgs.msg import JointTrajectory, JointTrajectoryPoint
from osc4py3.as_eventloop import *
from osc4py3 import oscmethod as osm
import xml.etree.ElementTree as ET
class ScaledJointTrajectoryPublisher(Node):
"""Node to publish joint trajectories based on OSC messages."""
def __init__(self, joint_names):
super().__init__('scaled_joint_trajectory_publisher')
# ROS2 Publisher
self.publisher = self.create_publisher(
JointTrajectory,
'/scaled_joint_trajectory_controller/joint_trajectory',
10
)
# Store received joint positions
self.joint_positions = []
self.joint_names = joint_names
osc_startup()
osc_udp_server("0.0.0.0", 8000, "osc_server")
print("Server started on 0.0.0.0:8000 \n ready to receive messages in the following format: /joint_trajectroy [joint_positions] optional: duration as last argument")
# Register OSC handler
osc_method("/joint_angles", self.joint_angles_handler, argscheme=osm.OSCARG_DATAUNPACK)
def joint_angles_handler(self, *args):
"""Handles incoming OSC messages for joint positions."""
msg = JointTrajectory()
msg.joint_names = self.joint_names
n=2
for arg in args:
if len(arg) == len(self.joint_names):
point = JointTrajectoryPoint()
point.positions = list(arg)
point.time_from_start.sec = n
n+=2
point.time_from_start.nanosec = 0
msg.points.append(point)
elif len(arg) == len(self.joint_names) + 1:
point = JointTrajectoryPoint()
point.positions = list(arg[:-1])
point.time_from_start.sec = int(arg[-1])
point.time_from_start.nanosec = int((arg[-1] - int(arg[-1])) * 1e9)
msg.points.append(point)
self.publisher.publish(msg)
print("published joint positions")
def main():
"""Main function to get joint names and start the ROS 2 & OSC system."""
tree = ET.parse('/BA/robot.urdf')
root = tree.getroot()
joint_names = [joint.get('name') for joint in root.findall('joint') if joint.get('type') == 'revolute' or joint.get('type') == 'continuous' or joint.get('type') == 'prismatic']
rclpy.init()
node = ScaledJointTrajectoryPublisher(joint_names)
# Run both ROS 2 and OSC Server together
try:
while rclpy.ok():
osc_process() # Handle one OSC request at a time
rclpy.spin_once(node, timeout_sec=0.1) # Process ROS callbacks
except KeyboardInterrupt:
print("")
finally:
node.destroy_node()
rclpy.shutdown()
osc_terminate()
if __name__ == '__main__':
main()

View File

@ -0,0 +1,106 @@
import rclpy
from rclpy.node import Node
from trajectory_msgs.msg import JointTrajectory, JointTrajectoryPoint
from osc4py3.as_eventloop import *
from osc4py3 import oscmethod as osm
import xml.etree.ElementTree as ET
import roboticstoolbox as rtb
import spatialmath as sm
import numpy as np
import time
class ScaledJointTrajectoryPublisher(Node):
"""Node to publish joint trajectories based on OSC messages."""
def __init__(self, joint_names, robot):
super().__init__('scaled_joint_trajectory_publisher')
self.robot = robot
# ROS2 Publisher
self.publisher = self.create_publisher(
JointTrajectory,
'/scaled_joint_trajectory_controller/joint_trajectory',
10
)
# Store received joint positions
self.joint_names = joint_names
osc_startup()
osc_udp_server("0.0.0.0", 6080, "osc_server")
print("Server started on 0.0.0.0:8000 \n ready to receive messages in the following format: /joint_trajectroy [tcp_coordinates0, tcp_coordinates1, ...] optional: timestamp as last element of each tcp_coordinates")
# Register OSC handler
osc_method("/joint_trajectory", self.joint_angles_handler, argscheme=osm.OSCARG_DATAUNPACK)
def joint_angles_handler(self, *args):
"""Handles incoming OSC messages for joint positions."""
time1 = time.time()
print("Received joint positions")
msg = JointTrajectory()
msg.joint_names = self.joint_names
joint_positions = [0.0] * len(self.joint_names)
steps = 30
vel = 0.4
if len(args[0]) == len(self.joint_names):
n=2.0
for i in range(len(args)-1):
x, y, z, roll, pitch, yaw = args[i]
Tep1 = sm.SE3(x, y, z) * sm.SE3.RPY([roll, pitch, yaw], order='xyz')
x, y, z, roll, pitch, yaw = args[i+1]
Tep2 = sm.SE3(x, y, z) * sm.SE3.RPY([roll, pitch, yaw], order='xyz')
cart_traj = rtb.ctraj(Tep1, Tep2, steps)
for j in range(steps-1):
sol = self.robot.ik_LM(cart_traj[j], q0=joint_positions)
dist = np.linalg.norm(cart_traj[j].t - cart_traj[j+1].t)
point = JointTrajectoryPoint()
point.positions = list(sol[0])
joint_positions = list(sol[0])
point.time_from_start.sec = int(n)
point.time_from_start.nanosec = int((n - int(n)) * 1e9)
n+=dist/vel
n+=0.1
msg.points.append(point)
elif len(args[0]) == len(self.joint_names) + 1:
for i in range(len(args)):
x, y, z, roll, pitch, yaw, timetag = args[i]
Tep = sm.SE3(x, y, z) * sm.SE3.RPY([roll, pitch, yaw], order='xyz')
x, y, z, roll, pitch, yaw = args[i+1][:-1]
Tep2 = sm.SE3(x, y, z) * sm.SE3.RPY([roll, pitch, yaw], order='xyz')
cart_traj = rtb.ctraj(Tep, Tep2, steps)
for Tep in cart_traj:
sol = self.robot.ik_LM(Tep, q0=joint_positions)
else:
print("Invalid number or format of arguments")
self.publisher.publish(msg)
print("published joint positions")
print(f'Frequency: {round(1/(time.time()-time1),2)} Hz')
def main():
"""Main function to get joint names and start the ROS 2 & OSC system."""
tree = ET.parse('/BA/robot.urdf')
root = tree.getroot()
joint_names = [joint.get('name') for joint in root.findall('joint') if joint.get('type') == 'revolute' or joint.get('type') == 'continuous' or joint.get('type') == 'prismatic']
robot = rtb.ERobot.URDF('/BA/robot.urdf')
rclpy.init()
node = ScaledJointTrajectoryPublisher(joint_names, robot)
# Run both ROS 2 and OSC Server together
try:
while rclpy.ok():
osc_process() # Handle one OSC request at a time
rclpy.spin_once(node, timeout_sec=0.1) # Process ROS callbacks
except KeyboardInterrupt:
print("")
finally:
node.destroy_node()
rclpy.shutdown()
osc_terminate()
if __name__ == '__main__':
main()

View File

@ -0,0 +1,101 @@
import rclpy
from rclpy.node import Node
from sensor_msgs.msg import JointState
from osc4py3.as_eventloop import *
from osc4py3 import oscbuildparse
class JointStateOSC(Node):
def __init__(self):
super().__init__('joint_states_osc')
# Create a ROS 2 subscriber to /joint_states topic
self.subscription = self.create_subscription(
JointState,
'/joint_states',
self.joint_states_callback,
1 # Queue size
)
# Open Sound Control (OSC) Client settings
self.osc_ip = "127.0.0.1" # Replace with the target IP
self.osc_port = 8000 # Replace with the target port
# Start the OSC system
osc_startup()
# Make client channels to send packets
osc_udp_client(self.osc_ip, self.osc_port, "osc_client")
def joint_states_callback(self, msg):
"""Callback function to handle incoming joint states."""
header = msg.header
joint_names = msg.name
joint_positions = msg.position
joint_velocity = msg.velocity
joint_effort = msg.effort
joint_names_str = "\n- ".join(joint_names)
joint_positions_str = "\n- ".join(map(str, joint_positions))
joint_velocity_str = "\n- ".join(map(str, joint_velocity))
joint_effort_str = "\n- ".join(map(str, joint_effort))
info = f"""
---
header:
stamp:
sec: {header.stamp.sec}
nanosec: {header.stamp.nanosec}
name:
- {joint_names_str}
position:
- {joint_positions_str}
velocity:
- {joint_velocity_str}
effort:
- {joint_effort_str}
---"""
# Send the info message
msg_info = oscbuildparse.OSCMessage("/joint_states", None, [info])
msg_name = oscbuildparse.OSCMessage("/joint_states/name", None, [i for i in joint_names])
msg_position = oscbuildparse.OSCMessage("/joint_states/position", None, [i for i in joint_positions])
msg_velocity = oscbuildparse.OSCMessage("/joint_states/velocity", None, [i for i in joint_velocity])
msg_effort = oscbuildparse.OSCMessage("/joint_states/effort", None, [i for i in joint_effort])
bun = oscbuildparse.OSCBundle(oscbuildparse.OSC_IMMEDIATELY, [msg_info, msg_name, msg_position, msg_velocity, msg_effort])
osc_send(bun, "osc_client")
osc_process()
#print(f"Publishing: {info}")
'''
# Send each joint state as an OSC message
for i, name in enumerate(joint_names):
#msg_sec = oscbuildparse.OSCMessage(f"/joint_states/header/sec", None, [header.stamp.sec])
#msg_nanosec = oscbuildparse.OSCMessage(f"/joint_states/header/nanosec", None, [header.stamp.nanosec])
msg_position = oscbuildparse.OSCMessage(f"/joint_states/{name}/position", None, [joint_positions[i]])
msg_velocity = oscbuildparse.OSCMessage(f"/joint_states/{name}/velocity", None, [joint_velocity[i]])
msg_effort = oscbuildparse.OSCMessage(f"/joint_states/{name}/effort", None, [joint_effort[i]])
bun = oscbuildparse.OSCBundle(oscbuildparse.unixtime2timetag(header.stamp.sec + header.stamp.nanosec), [msg_position, msg_velocity, msg_effort])
#bun = oscbuildparse.OSCBundle(oscbuildparse.OSC_IMMEDIATELY , [msg_position, msg_velocity, msg_effort])
osc_send(bun, "osc_client")
osc_process()
#print(f"OSC bundle sent for joint {name}")
'''
def main():
rclpy.init()
node = JointStateOSC()
print(f"Publishing joint states to OSC on {node.osc_ip}:{node.osc_port}...")
try:
rclpy.spin(node)
except KeyboardInterrupt:
print("shutting down...")
finally:
node.destroy_node()
rclpy.shutdown()
osc_terminate()
if __name__ == '__main__':
main()

View File

@ -0,0 +1,41 @@
from osc4py3.as_eventloop import *
from osc4py3 import oscmethod as osm
import time
def joint_states_handler(address, *args):
"""Handler function to process incoming joint states."""
#print([i*180/3.141 for i in args]) # for printing joint angles in degrees
if address == "/joint_states":
print(args[0])
def main():
ip = "0.0.0.0" # IP address to listen on
port = 8000 # Port to listen on
# Start the OSC system
osc_startup()
# Make server channels to receive packets
osc_udp_server(ip, port, "osc_server")
# Associate Python functions with message address patterns
osc_method("/joint_states", joint_states_handler, argscheme=osm.OSCARG_ADDRESS + osm.OSCARG_DATAUNPACK)
print(f"Listening for OSC messages on {ip}:{port}...")
try:
# Run the event loop
while True:
osc_process() # Process OSC messages
time.sleep(0.01) # Sleep to avoid high CPU usage
except KeyboardInterrupt:
print("")
finally:
# Properly close the system
osc_terminate()
if __name__ == "__main__":
main()

View File

@ -0,0 +1,75 @@
import rclpy
from rclpy.node import Node
from sensor_msgs.msg import JointState
from osc4py3.as_eventloop import *
from osc4py3 import oscbuildparse
import roboticstoolbox as rtb
import xml.etree.ElementTree as ET
import numpy as np
from scipy.spatial.transform import Rotation as R
class JointStateOSC(Node):
def __init__(self, robot, joint_names):
super().__init__('joint_states_osc')
self.joint_names_urdf = joint_names
self.robot = robot
# Create a ROS 2 subscriber to /joint_states topic
self.subscription = self.create_subscription(
JointState,
'/joint_states',
self.joint_states_callback,
1 # Queue size
)
# Open Sound Control (OSC) Client settings
self.osc_ip = "127.0.0.1" # Replace with the target IP
self.osc_port = 8000 # Replace with the target port
# Start the OSC system
osc_startup()
# Make client channels to send packets
osc_udp_client(self.osc_ip, self.osc_port, "osc_client")
def joint_states_callback(self, msg):
"""Callback function to handle incoming joint states."""
header = msg.header
joint_names = msg.name
joint_positions = msg.position
joint_positions = [joint_positions[joint_names.index(joint)] for joint in self.joint_names_urdf]
tcp_pos = self.robot.fkine(joint_positions) #, end='ft_frame')
tcp_xyz = tcp_pos.t
tcp_rot = tcp_pos.R
rotation_vector = R.from_matrix(tcp_rot).as_rotvec()
translation = oscbuildparse.OSCMessage("/tcp_position_t", None, tcp_xyz.tolist())
osc_send(translation, "osc_client")
rotation = oscbuildparse.OSCMessage("/tcp_position_R", None, rotation_vector.tolist())
osc_send(rotation, "osc_client")
osc_process()
#print(f"Published TCP position: {tcp_pos}")
def main():
rclpy.init()
robot = rtb.ERobot.URDF('/BA/robot.urdf')
tree = ET.parse('/BA/robot.urdf')
root = tree.getroot()
joint_names = [joint.get('name') for joint in root.findall('joint') if joint.get('type') == 'revolute' or joint.get('type') == 'continuous' or joint.get('type') == 'prismatic']
node = JointStateOSC(robot, joint_names)
print(f"Publishing TCP coordinates to OSC on {node.osc_ip}:{node.osc_port}...")
try:
rclpy.spin(node)
except KeyboardInterrupt:
print("shutting down...")
finally:
node.destroy_node()
rclpy.shutdown()
osc_terminate()
if __name__ == '__main__':
main()

View File

@ -0,0 +1,63 @@
import rclpy
from rclpy.node import Node
from sensor_msgs.msg import JointState
from trajectory_msgs.msg import JointTrajectory, JointTrajectoryPoint
import numpy as np
import time
class RobotNode(Node):
def __init__(self):
super().__init__('robot_node')
self.l1 = 0.5
self.l2 = 0.3
self.x = self.l1 + self.l2
self.y = 0.0
self.theta1 = 0.0
self.theta2 = 0.0
self.publisher = self.create_publisher(
JointState,
'/joint_states',
10
)
timer_period = 0.5 # seconds
self.timer = self.create_timer(timer_period, self.timer_callback)
self.i = 0
def timer_callback(self):
msg = JointState()
msg.name = ['joint1', 'joint2']
msg.position = [self.theta1, self.theta2]
self.publisher.publish(msg)
self.get_logger().info(f'x = {self.x}, y = {self.y}, theta1 = {self.theta1}, theta2 = {self.theta2}')
self.subcriber = self.create_subscription(
JointTrajectory,
'/joint_trajectory_controller/joint_trajectory',
self.joint_trajectory_callback,
10
)
def joint_trajectory_callback(self, msg):
joint_names = msg.joint_names
duration = 0
for point in msg.points:
duration = msg.time_from_start_sec + msg.time_from_start_nanosec / 1e9 - duration
for i in range(duration *10):
self.theta1 += (point.positions[0] - self.theta1) / 10
self.theta2 += (point.positions[1] - self.theta2) / 10
self.x = self.l1 * np.cos(self.theta1) + self.l2 * np.cos(self.theta1 + self.theta2)
self.y = self.l1 * np.sin(self.theta1) + self.l2 * np.sin(self.theta1 + self.theta2)
time.sleep(0.1)
def main(args=None):
rclpy.init(args=args)
node = RobotNode()
rclpy.spin(node)
rclpy.shutdown()

View File

@ -0,0 +1 @@
0

View File

@ -0,0 +1 @@
# generated from colcon_core/shell/template/command_prefix.sh.em

View File

@ -0,0 +1,20 @@
AMENT_PREFIX_PATH=/BA/workspace/install/painting_robot_control:/BA/workspace/install/mock_robot:/BA/workspace/install/joint_info:/BA/workspace/install/joint_control:/opt/ros/humble
COLCON=1
COLCON_PREFIX_PATH=/BA/workspace/install
HOME=/root
HOSTNAME=0e38e264ac6b
LANG=C.UTF-8
LC_ALL=C.UTF-8
LD_LIBRARY_PATH=/opt/ros/humble/opt/rviz_ogre_vendor/lib:/opt/ros/humble/lib/x86_64-linux-gnu:/opt/ros/humble/lib
LS_COLORS=rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=00:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arc=01;31:*.arj=01;31:*.taz=01;31:*.lha=01;31:*.lz4=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.tzo=01;31:*.t7z=01;31:*.zip=01;31:*.z=01;31:*.dz=01;31:*.gz=01;31:*.lrz=01;31:*.lz=01;31:*.lzo=01;31:*.xz=01;31:*.zst=01;31:*.tzst=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.alz=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.cab=01;31:*.wim=01;31:*.swm=01;31:*.dwm=01;31:*.esd=01;31:*.jpg=01;35:*.jpeg=01;35:*.mjpg=01;35:*.mjpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.webp=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.m4a=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.oga=00;36:*.opus=00;36:*.spx=00;36:*.xspf=00;36:
OLDPWD=/BA/workspace/src
PATH=/opt/ros/humble/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
PWD=/BA/workspace/build/mock_robot
PYTHONPATH=/BA/workspace/build/painting_robot_control:/BA/workspace/install/painting_robot_control/lib/python3.10/site-packages:/BA/workspace/build/mock_robot:/BA/workspace/install/mock_robot/lib/python3.10/site-packages:/BA/workspace/install/joint_info/lib/python3.10/site-packages:/BA/workspace/build/joint_control:/BA/workspace/install/joint_control/lib/python3.10/site-packages:/opt/ros/humble/lib/python3.10/site-packages:/opt/ros/humble/local/lib/python3.10/dist-packages
ROS_DISTRO=humble
ROS_LOCALHOST_ONLY=0
ROS_PYTHON_VERSION=3
ROS_VERSION=2
SHLVL=1
TERM=xterm
_=/usr/bin/colcon

View File

@ -0,0 +1 @@
/BA/workspace/src/mock_robot/mock_robot

View File

@ -0,0 +1,12 @@
Metadata-Version: 2.1
Name: mock-robot
Version: 0.0.0
Summary: TODO: Package description
Home-page: UNKNOWN
Maintainer: root
Maintainer-email: root@todo.todo
License: TODO: License declaration
Platform: UNKNOWN
UNKNOWN

View File

@ -0,0 +1,20 @@
package.xml
setup.cfg
setup.py
../../build/mock_robot/mock_robot.egg-info/PKG-INFO
../../build/mock_robot/mock_robot.egg-info/SOURCES.txt
../../build/mock_robot/mock_robot.egg-info/dependency_links.txt
../../build/mock_robot/mock_robot.egg-info/entry_points.txt
../../build/mock_robot/mock_robot.egg-info/requires.txt
../../build/mock_robot/mock_robot.egg-info/top_level.txt
../../build/mock_robot/mock_robot.egg-info/zip-safe
mock_robot/__init__.py
mock_robot/robot_node.py
mock_robot.egg-info/PKG-INFO
mock_robot.egg-info/SOURCES.txt
mock_robot.egg-info/dependency_links.txt
mock_robot.egg-info/entry_points.txt
mock_robot.egg-info/requires.txt
mock_robot.egg-info/top_level.txt
mock_robot.egg-info/zip-safe
resource/mock_robot

View File

@ -0,0 +1,3 @@
[console_scripts]
mock_robot = mock_robot.robot_node:main

View File

@ -0,0 +1 @@
setuptools

View File

@ -0,0 +1 @@
mock_robot

View File

@ -0,0 +1 @@

View File

@ -0,0 +1 @@
/BA/workspace/src/mock_robot/package.xml

View File

@ -0,0 +1,4 @@
import sys
if sys.prefix == '/usr':
sys.real_prefix = sys.prefix
sys.prefix = sys.exec_prefix = '/BA/workspace/install/mock_robot'

View File

@ -0,0 +1 @@
/BA/workspace/src/mock_robot/resource/mock_robot

View File

@ -0,0 +1 @@
/BA/workspace/src/mock_robot/setup.cfg

View File

@ -0,0 +1 @@
/BA/workspace/src/mock_robot/setup.py

View File

@ -0,0 +1 @@
prepend-non-duplicate;PYTHONPATH;/BA/workspace/build/mock_robot

View File

@ -0,0 +1,3 @@
# generated from colcon_powershell/shell/template/hook_prepend_value.ps1.em
colcon_prepend_unique_value PYTHONPATH "$env:COLCON_CURRENT_PREFIX\/BA/workspace/build/mock_robot"

View File

@ -0,0 +1,3 @@
# generated from colcon_core/shell/template/hook_prepend_value.sh.em
_colcon_prepend_unique_value PYTHONPATH "/BA/workspace/build/mock_robot"

View File

@ -0,0 +1 @@
0

View File

@ -0,0 +1 @@
# generated from colcon_core/shell/template/command_prefix.sh.em

View File

@ -0,0 +1,20 @@
AMENT_PREFIX_PATH=/BA/workspace/install/painting_robot_control:/BA/workspace/install/mock_robot:/BA/workspace/install/joint_info:/BA/workspace/install/joint_control:/opt/ros/humble
COLCON=1
COLCON_PREFIX_PATH=/BA/workspace/install
HOME=/root
HOSTNAME=0e38e264ac6b
LANG=C.UTF-8
LC_ALL=C.UTF-8
LD_LIBRARY_PATH=/opt/ros/humble/opt/rviz_ogre_vendor/lib:/opt/ros/humble/lib/x86_64-linux-gnu:/opt/ros/humble/lib
LS_COLORS=rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=00:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arc=01;31:*.arj=01;31:*.taz=01;31:*.lha=01;31:*.lz4=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.tzo=01;31:*.t7z=01;31:*.zip=01;31:*.z=01;31:*.dz=01;31:*.gz=01;31:*.lrz=01;31:*.lz=01;31:*.lzo=01;31:*.xz=01;31:*.zst=01;31:*.tzst=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.alz=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.cab=01;31:*.wim=01;31:*.swm=01;31:*.dwm=01;31:*.esd=01;31:*.jpg=01;35:*.jpeg=01;35:*.mjpg=01;35:*.mjpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.webp=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.m4a=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.oga=00;36:*.opus=00;36:*.spx=00;36:*.xspf=00;36:
OLDPWD=/BA/workspace/src
PATH=/opt/ros/humble/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
PWD=/BA/workspace/build/painting_robot_control
PYTHONPATH=/BA/workspace/build/painting_robot_control:/BA/workspace/install/painting_robot_control/lib/python3.10/site-packages:/BA/workspace/build/mock_robot:/BA/workspace/install/mock_robot/lib/python3.10/site-packages:/BA/workspace/install/joint_info/lib/python3.10/site-packages:/BA/workspace/build/joint_control:/BA/workspace/install/joint_control/lib/python3.10/site-packages:/opt/ros/humble/lib/python3.10/site-packages:/opt/ros/humble/local/lib/python3.10/dist-packages
ROS_DISTRO=humble
ROS_LOCALHOST_ONLY=0
ROS_PYTHON_VERSION=3
ROS_VERSION=2
SHLVL=1
TERM=xterm
_=/usr/bin/colcon

View File

@ -0,0 +1 @@
/BA/workspace/src/painting_robot_control/package.xml

View File

@ -0,0 +1 @@
/BA/workspace/src/painting_robot_control/painting_robot_control

View File

@ -0,0 +1,12 @@
Metadata-Version: 2.1
Name: painting-robot-control
Version: 0.0.0
Summary: TODO: Package description
Home-page: UNKNOWN
Maintainer: root
Maintainer-email: root@todo.todo
License: TODO: License declaration
Platform: UNKNOWN
UNKNOWN

View File

@ -0,0 +1,13 @@
package.xml
setup.cfg
setup.py
painting_robot_control/__init__.py
painting_robot_control/com_node.py
painting_robot_control.egg-info/PKG-INFO
painting_robot_control.egg-info/SOURCES.txt
painting_robot_control.egg-info/dependency_links.txt
painting_robot_control.egg-info/entry_points.txt
painting_robot_control.egg-info/requires.txt
painting_robot_control.egg-info/top_level.txt
painting_robot_control.egg-info/zip-safe
resource/painting_robot_control

View File

@ -0,0 +1,3 @@
[console_scripts]
painting_robot_controller = painting_robot_control.com_node:main

View File

@ -0,0 +1 @@
painting_robot_control

View File

@ -0,0 +1,4 @@
import sys
if sys.prefix == '/usr':
sys.real_prefix = sys.prefix
sys.prefix = sys.exec_prefix = '/BA/workspace/install/painting_robot_control'

View File

@ -0,0 +1 @@
/BA/workspace/src/painting_robot_control/resource/painting_robot_control

View File

@ -0,0 +1 @@
/BA/workspace/src/painting_robot_control/setup.cfg

View File

@ -0,0 +1 @@
/BA/workspace/src/painting_robot_control/setup.py

View File

@ -0,0 +1 @@
prepend-non-duplicate;PYTHONPATH;/BA/workspace/build/painting_robot_control

View File

@ -0,0 +1,3 @@
# generated from colcon_powershell/shell/template/hook_prepend_value.ps1.em
colcon_prepend_unique_value PYTHONPATH "$env:COLCON_CURRENT_PREFIX\/BA/workspace/build/painting_robot_control"

View File

@ -0,0 +1,3 @@
# generated from colcon_core/shell/template/hook_prepend_value.sh.em
_colcon_prepend_unique_value PYTHONPATH "/BA/workspace/build/painting_robot_control"

View File

@ -0,0 +1,33 @@
#!/usr/bin/python3
# EASY-INSTALL-ENTRY-SCRIPT: 'joint-control','console_scripts','joint_control'
import re
import sys
# for compatibility with easy_install; see #2198
__requires__ = 'joint-control'
try:
from importlib.metadata import distribution
except ImportError:
try:
from importlib_metadata import distribution
except ImportError:
from pkg_resources import load_entry_point
def importlib_load_entry_point(spec, group, name):
dist_name, _, _ = spec.partition('==')
matches = (
entry_point
for entry_point in distribution(dist_name).entry_points
if entry_point.group == group and entry_point.name == name
)
return next(matches).load()
globals().setdefault('load_entry_point', importlib_load_entry_point)
if __name__ == '__main__':
sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0])
sys.exit(load_entry_point('joint-control', 'console_scripts', 'joint_control')())

View File

@ -0,0 +1,33 @@
#!/usr/bin/python3
# EASY-INSTALL-ENTRY-SCRIPT: 'joint-control','console_scripts','plugdata'
import re
import sys
# for compatibility with easy_install; see #2198
__requires__ = 'joint-control'
try:
from importlib.metadata import distribution
except ImportError:
try:
from importlib_metadata import distribution
except ImportError:
from pkg_resources import load_entry_point
def importlib_load_entry_point(spec, group, name):
dist_name, _, _ = spec.partition('==')
matches = (
entry_point
for entry_point in distribution(dist_name).entry_points
if entry_point.group == group and entry_point.name == name
)
return next(matches).load()
globals().setdefault('load_entry_point', importlib_load_entry_point)
if __name__ == '__main__':
sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0])
sys.exit(load_entry_point('joint-control', 'console_scripts', 'plugdata')())

View File

@ -0,0 +1,33 @@
#!/usr/bin/python3
# EASY-INSTALL-ENTRY-SCRIPT: 'joint-control','console_scripts','plugdata2'
import re
import sys
# for compatibility with easy_install; see #2198
__requires__ = 'joint-control'
try:
from importlib.metadata import distribution
except ImportError:
try:
from importlib_metadata import distribution
except ImportError:
from pkg_resources import load_entry_point
def importlib_load_entry_point(spec, group, name):
dist_name, _, _ = spec.partition('==')
matches = (
entry_point
for entry_point in distribution(dist_name).entry_points
if entry_point.group == group and entry_point.name == name
)
return next(matches).load()
globals().setdefault('load_entry_point', importlib_load_entry_point)
if __name__ == '__main__':
sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0])
sys.exit(load_entry_point('joint-control', 'console_scripts', 'plugdata2')())

View File

@ -0,0 +1,33 @@
#!/usr/bin/python3
# EASY-INSTALL-ENTRY-SCRIPT: 'joint-control','console_scripts','plugdata3'
import re
import sys
# for compatibility with easy_install; see #2198
__requires__ = 'joint-control'
try:
from importlib.metadata import distribution
except ImportError:
try:
from importlib_metadata import distribution
except ImportError:
from pkg_resources import load_entry_point
def importlib_load_entry_point(spec, group, name):
dist_name, _, _ = spec.partition('==')
matches = (
entry_point
for entry_point in distribution(dist_name).entry_points
if entry_point.group == group and entry_point.name == name
)
return next(matches).load()
globals().setdefault('load_entry_point', importlib_load_entry_point)
if __name__ == '__main__':
sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0])
sys.exit(load_entry_point('joint-control', 'console_scripts', 'plugdata3')())

View File

@ -0,0 +1,33 @@
#!/usr/bin/python3
# EASY-INSTALL-ENTRY-SCRIPT: 'joint-control','console_scripts','plugdata_cart'
import re
import sys
# for compatibility with easy_install; see #2198
__requires__ = 'joint-control'
try:
from importlib.metadata import distribution
except ImportError:
try:
from importlib_metadata import distribution
except ImportError:
from pkg_resources import load_entry_point
def importlib_load_entry_point(spec, group, name):
dist_name, _, _ = spec.partition('==')
matches = (
entry_point
for entry_point in distribution(dist_name).entry_points
if entry_point.group == group and entry_point.name == name
)
return next(matches).load()
globals().setdefault('load_entry_point', importlib_load_entry_point)
if __name__ == '__main__':
sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0])
sys.exit(load_entry_point('joint-control', 'console_scripts', 'plugdata_cart')())

View File

@ -0,0 +1,33 @@
#!/usr/bin/python3
# EASY-INSTALL-ENTRY-SCRIPT: 'joint-control','console_scripts','plugdata_cart_fix'
import re
import sys
# for compatibility with easy_install; see #2198
__requires__ = 'joint-control'
try:
from importlib.metadata import distribution
except ImportError:
try:
from importlib_metadata import distribution
except ImportError:
from pkg_resources import load_entry_point
def importlib_load_entry_point(spec, group, name):
dist_name, _, _ = spec.partition('==')
matches = (
entry_point
for entry_point in distribution(dist_name).entry_points
if entry_point.group == group and entry_point.name == name
)
return next(matches).load()
globals().setdefault('load_entry_point', importlib_load_entry_point)
if __name__ == '__main__':
sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0])
sys.exit(load_entry_point('joint-control', 'console_scripts', 'plugdata_cart_fix')())

View File

@ -0,0 +1,33 @@
#!/usr/bin/python3
# EASY-INSTALL-ENTRY-SCRIPT: 'joint-control','console_scripts','plugdata_cart_smooth'
import re
import sys
# for compatibility with easy_install; see #2198
__requires__ = 'joint-control'
try:
from importlib.metadata import distribution
except ImportError:
try:
from importlib_metadata import distribution
except ImportError:
from pkg_resources import load_entry_point
def importlib_load_entry_point(spec, group, name):
dist_name, _, _ = spec.partition('==')
matches = (
entry_point
for entry_point in distribution(dist_name).entry_points
if entry_point.group == group and entry_point.name == name
)
return next(matches).load()
globals().setdefault('load_entry_point', importlib_load_entry_point)
if __name__ == '__main__':
sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0])
sys.exit(load_entry_point('joint-control', 'console_scripts', 'plugdata_cart_smooth')())

View File

@ -0,0 +1,33 @@
#!/usr/bin/python3
# EASY-INSTALL-ENTRY-SCRIPT: 'joint-control','console_scripts','test'
import re
import sys
# for compatibility with easy_install; see #2198
__requires__ = 'joint-control'
try:
from importlib.metadata import distribution
except ImportError:
try:
from importlib_metadata import distribution
except ImportError:
from pkg_resources import load_entry_point
def importlib_load_entry_point(spec, group, name):
dist_name, _, _ = spec.partition('==')
matches = (
entry_point
for entry_point in distribution(dist_name).entry_points
if entry_point.group == group and entry_point.name == name
)
return next(matches).load()
globals().setdefault('load_entry_point', importlib_load_entry_point)
if __name__ == '__main__':
sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0])
sys.exit(load_entry_point('joint-control', 'console_scripts', 'test')())

View File

@ -0,0 +1,33 @@
#!/usr/bin/python3
# EASY-INSTALL-ENTRY-SCRIPT: 'joint-control','console_scripts','trajectory_server'
import re
import sys
# for compatibility with easy_install; see #2198
__requires__ = 'joint-control'
try:
from importlib.metadata import distribution
except ImportError:
try:
from importlib_metadata import distribution
except ImportError:
from pkg_resources import load_entry_point
def importlib_load_entry_point(spec, group, name):
dist_name, _, _ = spec.partition('==')
matches = (
entry_point
for entry_point in distribution(dist_name).entry_points
if entry_point.group == group and entry_point.name == name
)
return next(matches).load()
globals().setdefault('load_entry_point', importlib_load_entry_point)
if __name__ == '__main__':
sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0])
sys.exit(load_entry_point('joint-control', 'console_scripts', 'trajectory_server')())

View File

@ -0,0 +1,33 @@
#!/usr/bin/python3
# EASY-INSTALL-ENTRY-SCRIPT: 'joint-control','console_scripts','trajectory_server_cart_fast'
import re
import sys
# for compatibility with easy_install; see #2198
__requires__ = 'joint-control'
try:
from importlib.metadata import distribution
except ImportError:
try:
from importlib_metadata import distribution
except ImportError:
from pkg_resources import load_entry_point
def importlib_load_entry_point(spec, group, name):
dist_name, _, _ = spec.partition('==')
matches = (
entry_point
for entry_point in distribution(dist_name).entry_points
if entry_point.group == group and entry_point.name == name
)
return next(matches).load()
globals().setdefault('load_entry_point', importlib_load_entry_point)
if __name__ == '__main__':
sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0])
sys.exit(load_entry_point('joint-control', 'console_scripts', 'trajectory_server_cart_fast')())

View File

@ -0,0 +1,33 @@
#!/usr/bin/python3
# EASY-INSTALL-ENTRY-SCRIPT: 'joint-control','console_scripts','trajectory_server_cart_fast_1'
import re
import sys
# for compatibility with easy_install; see #2198
__requires__ = 'joint-control'
try:
from importlib.metadata import distribution
except ImportError:
try:
from importlib_metadata import distribution
except ImportError:
from pkg_resources import load_entry_point
def importlib_load_entry_point(spec, group, name):
dist_name, _, _ = spec.partition('==')
matches = (
entry_point
for entry_point in distribution(dist_name).entry_points
if entry_point.group == group and entry_point.name == name
)
return next(matches).load()
globals().setdefault('load_entry_point', importlib_load_entry_point)
if __name__ == '__main__':
sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0])
sys.exit(load_entry_point('joint-control', 'console_scripts', 'trajectory_server_cart_fast_1')())

View File

@ -0,0 +1,33 @@
#!/usr/bin/python3
# EASY-INSTALL-ENTRY-SCRIPT: 'joint-control','console_scripts','trajectory_server_cart_fast_max_acc'
import re
import sys
# for compatibility with easy_install; see #2198
__requires__ = 'joint-control'
try:
from importlib.metadata import distribution
except ImportError:
try:
from importlib_metadata import distribution
except ImportError:
from pkg_resources import load_entry_point
def importlib_load_entry_point(spec, group, name):
dist_name, _, _ = spec.partition('==')
matches = (
entry_point
for entry_point in distribution(dist_name).entry_points
if entry_point.group == group and entry_point.name == name
)
return next(matches).load()
globals().setdefault('load_entry_point', importlib_load_entry_point)
if __name__ == '__main__':
sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0])
sys.exit(load_entry_point('joint-control', 'console_scripts', 'trajectory_server_cart_fast_max_acc')())

View File

@ -0,0 +1,33 @@
#!/usr/bin/python3
# EASY-INSTALL-ENTRY-SCRIPT: 'joint-control','console_scripts','trajectory_server_cart_fast_smooth'
import re
import sys
# for compatibility with easy_install; see #2198
__requires__ = 'joint-control'
try:
from importlib.metadata import distribution
except ImportError:
try:
from importlib_metadata import distribution
except ImportError:
from pkg_resources import load_entry_point
def importlib_load_entry_point(spec, group, name):
dist_name, _, _ = spec.partition('==')
matches = (
entry_point
for entry_point in distribution(dist_name).entry_points
if entry_point.group == group and entry_point.name == name
)
return next(matches).load()
globals().setdefault('load_entry_point', importlib_load_entry_point)
if __name__ == '__main__':
sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0])
sys.exit(load_entry_point('joint-control', 'console_scripts', 'trajectory_server_cart_fast_smooth')())

View File

@ -0,0 +1,33 @@
#!/usr/bin/python3
# EASY-INSTALL-ENTRY-SCRIPT: 'joint-control','console_scripts','trajectory_server_new'
import re
import sys
# for compatibility with easy_install; see #2198
__requires__ = 'joint-control'
try:
from importlib.metadata import distribution
except ImportError:
try:
from importlib_metadata import distribution
except ImportError:
from pkg_resources import load_entry_point
def importlib_load_entry_point(spec, group, name):
dist_name, _, _ = spec.partition('==')
matches = (
entry_point
for entry_point in distribution(dist_name).entry_points
if entry_point.group == group and entry_point.name == name
)
return next(matches).load()
globals().setdefault('load_entry_point', importlib_load_entry_point)
if __name__ == '__main__':
sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0])
sys.exit(load_entry_point('joint-control', 'console_scripts', 'trajectory_server_new')())

View File

@ -0,0 +1,33 @@
#!/usr/bin/python3
# EASY-INSTALL-ENTRY-SCRIPT: 'joint-control','console_scripts','trajectory_server_new_cart'
import re
import sys
# for compatibility with easy_install; see #2198
__requires__ = 'joint-control'
try:
from importlib.metadata import distribution
except ImportError:
try:
from importlib_metadata import distribution
except ImportError:
from pkg_resources import load_entry_point
def importlib_load_entry_point(spec, group, name):
dist_name, _, _ = spec.partition('==')
matches = (
entry_point
for entry_point in distribution(dist_name).entry_points
if entry_point.group == group and entry_point.name == name
)
return next(matches).load()
globals().setdefault('load_entry_point', importlib_load_entry_point)
if __name__ == '__main__':
sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0])
sys.exit(load_entry_point('joint-control', 'console_scripts', 'trajectory_server_new_cart')())

View File

@ -0,0 +1,33 @@
#!/usr/bin/python3
# EASY-INSTALL-ENTRY-SCRIPT: 'joint-control','console_scripts','trajectory_server_trapezoidal'
import re
import sys
# for compatibility with easy_install; see #2198
__requires__ = 'joint-control'
try:
from importlib.metadata import distribution
except ImportError:
try:
from importlib_metadata import distribution
except ImportError:
from pkg_resources import load_entry_point
def importlib_load_entry_point(spec, group, name):
dist_name, _, _ = spec.partition('==')
matches = (
entry_point
for entry_point in distribution(dist_name).entry_points
if entry_point.group == group and entry_point.name == name
)
return next(matches).load()
globals().setdefault('load_entry_point', importlib_load_entry_point)
if __name__ == '__main__':
sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0])
sys.exit(load_entry_point('joint-control', 'console_scripts', 'trajectory_server_trapezoidal')())

View File

@ -0,0 +1,21 @@
<?xml version="1.0"?>
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
<package format="3">
<name>joint_control</name>
<version>0.0.0</version>
<description>TODO: Package description</description>
<maintainer email="root@todo.todo">root</maintainer>
<license>TODO: License declaration</license>
<test_depend>ament_copyright</test_depend>
<test_depend>ament_flake8</test_depend>
<test_depend>ament_pep257</test_depend>
<test_depend>python3-pytest</test_depend>
<depend>osc4py3</depend>
<depend>trajectory_msgs</depend>
<depend>xml</depend>
<export>
<build_type>ament_python</build_type>
</export>
</package>

View File

@ -0,0 +1,21 @@
<?xml version="1.0"?>
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
<package format="3">
<name>joint_control</name>
<version>0.0.0</version>
<description>TODO: Package description</description>
<maintainer email="root@todo.todo">root</maintainer>
<license>TODO: License declaration</license>
<test_depend>ament_copyright</test_depend>
<test_depend>ament_flake8</test_depend>
<test_depend>ament_pep257</test_depend>
<test_depend>python3-pytest</test_depend>
<depend>osc4py3</depend>
<depend>trajectory_msgs</depend>
<depend>xml</depend>
<export>
<build_type>ament_python</build_type>
</export>
</package>

View File

@ -0,0 +1,33 @@
#!/usr/bin/python3
# EASY-INSTALL-ENTRY-SCRIPT: 'joint-info','console_scripts','joint_states_pub'
import re
import sys
# for compatibility with easy_install; see #2198
__requires__ = 'joint-info'
try:
from importlib.metadata import distribution
except ImportError:
try:
from importlib_metadata import distribution
except ImportError:
from pkg_resources import load_entry_point
def importlib_load_entry_point(spec, group, name):
dist_name, _, _ = spec.partition('==')
matches = (
entry_point
for entry_point in distribution(dist_name).entry_points
if entry_point.group == group and entry_point.name == name
)
return next(matches).load()
globals().setdefault('load_entry_point', importlib_load_entry_point)
if __name__ == '__main__':
sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0])
sys.exit(load_entry_point('joint-info', 'console_scripts', 'joint_states_pub')())

View File

@ -0,0 +1,33 @@
#!/usr/bin/python3
# EASY-INSTALL-ENTRY-SCRIPT: 'joint-info','console_scripts','joint_states_sub'
import re
import sys
# for compatibility with easy_install; see #2198
__requires__ = 'joint-info'
try:
from importlib.metadata import distribution
except ImportError:
try:
from importlib_metadata import distribution
except ImportError:
from pkg_resources import load_entry_point
def importlib_load_entry_point(spec, group, name):
dist_name, _, _ = spec.partition('==')
matches = (
entry_point
for entry_point in distribution(dist_name).entry_points
if entry_point.group == group and entry_point.name == name
)
return next(matches).load()
globals().setdefault('load_entry_point', importlib_load_entry_point)
if __name__ == '__main__':
sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0])
sys.exit(load_entry_point('joint-info', 'console_scripts', 'joint_states_sub')())

View File

@ -0,0 +1,33 @@
#!/usr/bin/python3
# EASY-INSTALL-ENTRY-SCRIPT: 'joint-info','console_scripts','tcp_cart_pos'
import re
import sys
# for compatibility with easy_install; see #2198
__requires__ = 'joint-info'
try:
from importlib.metadata import distribution
except ImportError:
try:
from importlib_metadata import distribution
except ImportError:
from pkg_resources import load_entry_point
def importlib_load_entry_point(spec, group, name):
dist_name, _, _ = spec.partition('==')
matches = (
entry_point
for entry_point in distribution(dist_name).entry_points
if entry_point.group == group and entry_point.name == name
)
return next(matches).load()
globals().setdefault('load_entry_point', importlib_load_entry_point)
if __name__ == '__main__':
sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0])
sys.exit(load_entry_point('joint-info', 'console_scripts', 'tcp_cart_pos')())

View File

@ -0,0 +1,24 @@
<?xml version="1.0"?>
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
<package format="3">
<name>joint_info</name>
<version>0.0.0</version>
<description>TODO: Package description</description>
<maintainer email="root@todo.todo">root</maintainer>
<license>TODO: License declaration</license>
<depend>rclpy</depend>
<depend>sensor_msgs</depend>
<depend>osc4py3</depend>
<depend>roboticstoolbox</depend>
<test_depend>ament_copyright</test_depend>
<test_depend>ament_flake8</test_depend>
<test_depend>ament_pep257</test_depend>
<test_depend>python3-pytest</test_depend>
<export>
<build_type>ament_python</build_type>
</export>
</package>

View File

@ -0,0 +1,24 @@
<?xml version="1.0"?>
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
<package format="3">
<name>joint_info</name>
<version>0.0.0</version>
<description>TODO: Package description</description>
<maintainer email="root@todo.todo">root</maintainer>
<license>TODO: License declaration</license>
<depend>rclpy</depend>
<depend>sensor_msgs</depend>
<depend>osc4py3</depend>
<depend>roboticstoolbox</depend>
<test_depend>ament_copyright</test_depend>
<test_depend>ament_flake8</test_depend>
<test_depend>ament_pep257</test_depend>
<test_depend>python3-pytest</test_depend>
<export>
<build_type>ament_python</build_type>
</export>
</package>

View File

@ -0,0 +1,33 @@
#!/usr/bin/python3
# EASY-INSTALL-ENTRY-SCRIPT: 'mock-robot','console_scripts','mock_robot'
import re
import sys
# for compatibility with easy_install; see #2198
__requires__ = 'mock-robot'
try:
from importlib.metadata import distribution
except ImportError:
try:
from importlib_metadata import distribution
except ImportError:
from pkg_resources import load_entry_point
def importlib_load_entry_point(spec, group, name):
dist_name, _, _ = spec.partition('==')
matches = (
entry_point
for entry_point in distribution(dist_name).entry_points
if entry_point.group == group and entry_point.name == name
)
return next(matches).load()
globals().setdefault('load_entry_point', importlib_load_entry_point)
if __name__ == '__main__':
sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0])
sys.exit(load_entry_point('mock-robot', 'console_scripts', 'mock_robot')())

View File

@ -0,0 +1,33 @@
#!/usr/bin/python3
# EASY-INSTALL-ENTRY-SCRIPT: 'mock-robot','console_scripts','mock_robot_2'
import re
import sys
# for compatibility with easy_install; see #2198
__requires__ = 'mock-robot'
try:
from importlib.metadata import distribution
except ImportError:
try:
from importlib_metadata import distribution
except ImportError:
from pkg_resources import load_entry_point
def importlib_load_entry_point(spec, group, name):
dist_name, _, _ = spec.partition('==')
matches = (
entry_point
for entry_point in distribution(dist_name).entry_points
if entry_point.group == group and entry_point.name == name
)
return next(matches).load()
globals().setdefault('load_entry_point', importlib_load_entry_point)
if __name__ == '__main__':
sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0])
sys.exit(load_entry_point('mock-robot', 'console_scripts', 'mock_robot_2')())

Some files were not shown because too many files have changed in this diff Show More