diff --git a/ros2_ws/src/simple_robot_1dof/launch/kuka_rviz_simulation_1dof_launch.py b/ros2_ws/src/simple_robot_1dof/launch/kuka_rviz_simulation_1dof_launch.py index aeefeca663d19b825a232a89a73c0b2b4f7e3145..57b00f99c5aa35aee21f168ea9d980a39084f92a 100644 --- a/ros2_ws/src/simple_robot_1dof/launch/kuka_rviz_simulation_1dof_launch.py +++ b/ros2_ws/src/simple_robot_1dof/launch/kuka_rviz_simulation_1dof_launch.py @@ -16,7 +16,7 @@ def generate_launch_description(): 'forward_kinematics_simulations.rviz' ) - velocity_launch_arg = DeclareLaunchArgument('velocity', default_value = '0.015') # constant: 0.015 acceleration: 0.005 + velocity_launch_arg = DeclareLaunchArgument('velocity', default_value = '0.015') velocity = LaunchConfiguration('velocity') acceleration_launch_arg = DeclareLaunchArgument('acceleration', default_value = '0.0004') diff --git a/ros2_ws/src/simple_robot_1dof/simple_robot_1dof/reference_node_1dof.py b/ros2_ws/src/simple_robot_1dof/simple_robot_1dof/reference_node_1dof.py index e870f1abfe24654fe00c7acc7977866f99b94c62..785aaee39269dd1f8de63802f7d9cfbc12d54a60 100644 --- a/ros2_ws/src/simple_robot_1dof/simple_robot_1dof/reference_node_1dof.py +++ b/ros2_ws/src/simple_robot_1dof/simple_robot_1dof/reference_node_1dof.py @@ -48,17 +48,11 @@ class Reference_Node_1DoF(Node): if self.phi < self.slope: self.phi = self.phi + self.velocity self.velocity = self.velocity + self.acceleration - self.get_logger().info('Acceleration phase') - self.get_logger().info('%f' % self.velocity) elif self.phi > 1 - self.slope: self.phi = self.phi + self.velocity self.velocity = self.velocity - self.decelaration - self.get_logger().info('Decelaration phase') - self.get_logger().info('%f' % self.velocity) else: self.phi = self.phi + self.velocity - self.get_logger().info('Constant speed phase') - self.get_logger().info('%f' % self.velocity) #setting back to 0 if self.phi>self.phi_end: