Skip to content
Snippets Groups Projects
Commit c392a609 authored by uquzq's avatar uquzq
Browse files

Add launch file for the 1dof simulation

parent 1ced7bbe
No related branches found
No related tags found
No related merge requests found
import os
from launch import LaunchDescription
from launch_ros.actions import Node
from launch.actions import ExecuteProcess
from ament_index_python.packages import get_package_share_directory
def generate_launch_description():
package_name = 'simple_robot_1dof'
rviz_config_file = os.path.join(
get_package_share_directory(package_name),
'rviz',
'forward_kinematics_simulations.rviz'
)
return LaunchDescription([
Node(
package = package_name,
executable = 'forward_kinematics_node_1dof',
name = 'forward_kinematics_node',
output = 'screen',
parameters = []
),
Node(
package = package_name,
executable = 'reference_node_1dof',
name = 'reference_node',
output = 'screen',
parameters = []
),
Node(
package='rviz2',
executable='rviz2',
name='rviz2',
output='screen',
arguments=['-d', rviz_config_file]
)
])
\ No newline at end of file
......@@ -6,9 +6,9 @@ Panels:
Expanded:
- /Global Options1
- /Status1
- /Path1
- /Marker1
- /Marker1/Topic1
- /Path1
Splitter Ratio: 0.5
Tree Height: 696
- Class: rviz_common/Selection
......@@ -50,19 +50,6 @@ Visualization Manager:
Plane Cell Count: 10
Reference Frame: <Fixed Frame>
Value: true
- Class: rviz_default_plugins/Marker
Enabled: true
Name: Marker
Namespaces:
"": true
Topic:
Depth: 5
Durability Policy: Volatile
Filter size: 10
History Policy: Keep Last
Reliability Policy: Reliable
Value: /simple_robot/visualization_marker
Value: true
- Alpha: 1
Buffer Length: 1
Class: rviz_default_plugins/Path
......@@ -91,6 +78,19 @@ Visualization Manager:
Reliability Policy: Reliable
Value: /simple_robot/visualization_path
Value: true
- Class: rviz_default_plugins/Marker
Enabled: true
Name: Marker
Namespaces:
"": true
Topic:
Depth: 5
Durability Policy: Volatile
Filter size: 10
History Policy: Keep Last
Reliability Policy: Reliable
Value: /simple_robot/visualization_marker
Value: true
Enabled: true
Global Options:
Background Color: 48; 48; 48
......@@ -137,25 +137,25 @@ Visualization Manager:
Views:
Current:
Class: rviz_default_plugins/Orbit
Distance: 6.6957197189331055
Distance: 4.086756229400635
Enable Stereo Rendering:
Stereo Eye Separation: 0.05999999865889549
Stereo Focal Distance: 1
Swap Stereo Eyes: false
Value: false
Focal Point:
X: -0.861002504825592
Y: 0.12668320536613464
Z: 0.19602636992931366
X: 0
Y: 0
Z: 0
Focal Shape Fixed Size: true
Focal Shape Size: 0.05000000074505806
Invert Z Axis: false
Name: Current View
Near Clip Distance: 0.009999999776482582
Pitch: 1.2197964191436768
Pitch: 1.5697963237762451
Target Frame: <Fixed Frame>
Value: Orbit (rviz)
Yaw: 4.693583011627197
Yaw: 4.688580513000488
Saved: ~
Window Geometry:
Displays:
......@@ -173,5 +173,5 @@ Window Geometry:
Views:
collapsed: false
Width: 1908
X: -75
Y: -25
X: 0
Y: 0
......@@ -10,6 +10,8 @@ setup(
('share/ament_index/resource_index/packages',
['resource/' + package_name]),
('share/' + package_name, ['package.xml']),
('share/' + package_name + '/launch', ['launch/forward_kinematics_1dof_launch.py']),
('share/' + package_name + '/rviz', ['rviz/forward_kinematics_simulations.rviz']),
],
install_requires=['setuptools'],
zip_safe=True,
......@@ -20,8 +22,10 @@ setup(
tests_require=['pytest'],
entry_points={
'console_scripts': [
'publisher = simple_robot_1dof.reference_node_1dof:main',
'subscriber = simple_robot_1dof.forward_kinematics_node_1dof:main',
#'publisher = simple_robot_1dof.reference_node_1dof:main',
#'subscriber = simple_robot_1dof.forward_kinematics_node_1dof:main',
'forward_kinematics_node_1dof = simple_robot_1dof.forward_kinematics_node_1dof:main',
'reference_node_1dof = simple_robot_1dof.reference_node_1dof:main',
],
},
)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment