Skip to content

Commit

Permalink
style: cleanup code base
Browse files Browse the repository at this point in the history
  • Loading branch information
rickstaa committed Dec 10, 2021
1 parent 29bb59c commit ba9b922
Show file tree
Hide file tree
Showing 16 changed files with 253 additions and 252 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Configuration file that contains the configuration values for setting up the panda
# trajectory controllers that can control a joint effort hardware interface
panda_arm_controller:
effort_joint_trajectory_controller:
type: effort_controllers/JointTrajectoryController
joints:
- panda_joint1
Expand All @@ -10,21 +10,21 @@ panda_arm_controller:
- panda_joint5
- panda_joint6
- panda_joint7
constraints:
goal_time: 0.5
stopped_velocity_tolerance: 0 # Added because of wrong PID gains see #9
panda_joint1: { goal: 0.05 }
panda_joint2: { goal: 0.05 }
panda_joint3: { goal: 0.05 }
panda_joint4: { goal: 0.05 }
panda_joint5: { goal: 0.05 }
panda_joint6: { goal: 0.05 }
panda_joint7: { goal: 0.05 }
gains:
panda_joint1: { p: 600, d: 30, i: 0.0 }
panda_joint2: { p: 600, d: 30, i: 0.0 }
panda_joint3: { p: 600, d: 30, i: 0.0 }
panda_joint4: { p: 600, d: 30, i: 0.0 }
panda_joint5: { p: 250, d: 10, i: 0 }
panda_joint6: { p: 150, d: 10, i: 0 }
panda_joint7: { p: 50, d: 5, i: 0 }
panda_joint7: { p: 50, d: 5, i: 0 }
constraints:
goal_time: 0.5
stopped_velocity_tolerance: 0 # Added because of wrong PID gains see #9
panda_joint1: { goal: 0.005 }
panda_joint2: { goal: 0.005 }
panda_joint3: { goal: 0.005 }
panda_joint4: { goal: 0.005 }
panda_joint5: { goal: 0.005 }
panda_joint6: { goal: 0.005 }
panda_joint7: { goal: 0.005 }
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,3 @@ move_group:
default: true
joints:
- panda_finger_joint1
- panda_finger_joint2
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Configuration file that contains the configuration values for setting up the panda
# trajectory controllers
panda_arm_controller:
position_joint_trajectory_controller:
type: position_controllers/JointTrajectoryController
joints:
- panda_joint1
Expand All @@ -12,10 +12,10 @@ panda_arm_controller:
- panda_joint7
constraints:
goal_time: 0.5
panda_joint1: { goal: 0.05 }
panda_joint2: { goal: 0.05 }
panda_joint3: { goal: 0.05 }
panda_joint4: { goal: 0.05 }
panda_joint5: { goal: 0.05 }
panda_joint6: { goal: 0.05 }
panda_joint7: { goal: 0.05 }
panda_joint1: { goal: 0.005 }
panda_joint2: { goal: 0.005 }
panda_joint3: { goal: 0.005 }
panda_joint4: { goal: 0.005 }
panda_joint5: { goal: 0.005 }
panda_joint6: { goal: 0.005 }
panda_joint7: { goal: 0.005 }
58 changes: 29 additions & 29 deletions panda_gazebo/launch/load_controllers.launch
Original file line number Diff line number Diff line change
@@ -1,37 +1,37 @@
<!--Launch file loads the control parameters and controllers-->
<launch>
<arg name="moveit" default="true" />
<arg name="load_gripper" default="true"/>
<!--Control arguments-->
<!-- The control type used for controlling the robot (Options: Trajectory, position, effort)-->
<arg name="control_type" default="trajectory"/>
<arg name="moveit" default="true" doc="Start MoveIt"/>
<arg name="load_gripper" default="true" doc="Load the gripper"/>
<!--Control arguments-->
<!-- The control type used for controlling the robot (Options: Trajectory, position, effort)-->
<arg name="control_type" default="trajectory" doc="The type of control used for controlling the arm. Options: trajectory, position, effort"/>

<!--Load control parameters-->
<!-- Load general Gazebo control configuration values-->
<rosparam file="$(find panda_gazebo)/cfg/controllers/gazebo_ros_control.yaml" command="load" />
<!-- Load general ros_control configuration values-->
<rosparam file="$(find panda_gazebo)/cfg/controllers/ros_control.yaml" command="load"/>
<!-- Load Moveit control configuration values-->
<rosparam if="$(eval arg('moveit') and arg('load_gripper'))" file="$(find panda_gazebo)/cfg/controllers/moveit_ros_control_gripper.yaml" command="load"/>
<rosparam unless="$(eval arg('moveit') and arg('load_gripper'))" file="$(find panda_gazebo)/cfg/controllers/moveit_ros_control.yaml" command="load"/>
<!--Load control parameters-->
<!-- Load general Gazebo control configuration values-->
<rosparam file="$(find panda_gazebo)/cfg/controllers/gazebo_ros_control.yaml" command="load" />
<!-- Load general ros_control configuration values-->
<rosparam file="$(find panda_gazebo)/cfg/controllers/ros_control.yaml" command="load"/>
<!-- Load Moveit control configuration values-->
<rosparam if="$(eval arg('moveit') and arg('load_gripper'))" file="$(find panda_gazebo)/cfg/controllers/moveit_ros_control_gripper.yaml" command="load"/>
<rosparam unless="$(eval arg('moveit') and arg('load_gripper'))" file="$(find panda_gazebo)/cfg/controllers/moveit_ros_control.yaml" command="load"/>

<!--Load controllers-->
<!--Joint position controllers-->
<group if="$(eval arg('control_type') == 'position')">
<include file="$(find panda_gazebo)/launch/load_joint_position_controllers.launch"/>
<!--Load joint_trajectory controller in stopped mode
<!--Load controllers-->
<!--Joint position controllers-->
<group if="$(eval arg('control_type') == 'position')">
<include file="$(find panda_gazebo)/launch/load_joint_position_controllers.launch"/>
<!--Load joint_trajectory controller in stopped mode
NOTE: This enabled us to set the initial robot pose using euclidean coordinates.
-->
<include file="$(find panda_gazebo)/launch/load_position_joint_trajectory_controllers.launch">
<arg name="stopped" value="true"/>
</include>
</group>
<!--Joint effort controllers-->
<group if="$(eval arg('control_type') == 'effort')">
<include file="$(find panda_gazebo)/launch/load_joint_effort_controllers.launch"/>
</group>
<!--Joint_trajectory controller-->
<include unless="$(eval arg('control_type') == 'position')" file="$(find panda_gazebo)/launch/load_effort_joint_trajectory_controllers.launch">
<arg name="stopped" value="$(eval arg('control_type') == 'effort')"/>
<include file="$(find panda_gazebo)/launch/load_position_joint_trajectory_controllers.launch">
<arg name="stopped" value="true"/>
</include>
</group>
<!--Joint effort controllers-->
<group if="$(eval arg('control_type') == 'effort')">
<include file="$(find panda_gazebo)/launch/load_joint_effort_controllers.launch"/>
</group>
<!--Joint_trajectory controller-->
<include unless="$(eval arg('control_type') == 'position')" file="$(find panda_gazebo)/launch/load_effort_joint_trajectory_controllers.launch">
<arg name="stopped" value="$(eval arg('control_type') == 'effort')"/>
</include>
</launch>
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<!-- Launch file for launching the robot controllers -->
<launch>
<arg name="stopped" default="false"/>
<arg name="stopped" default="false" doc="Spawn the controllers in stoped mode"/>

<!--Load controller parameters-->
<rosparam file="$(find panda_gazebo)/cfg/controllers/effort_joint_trajectory_controllers.yaml" command="load"/>
<!--Load controller parameters-->
<rosparam file="$(find panda_gazebo)/cfg/controllers/effort_joint_trajectory_controllers.yaml" command="load"/>

<!--Load the controllers-->
<arg if="$(arg stopped)" name="command_args" value="--stopped"/>
<arg unless="$(arg stopped)" name="command_args" value=""/>
<!--Load the controllers-->
<arg if="$(arg stopped)" name="command_args" value="--stopped"/>
<arg unless="$(arg stopped)" name="command_args" value=""/>

<node name="effort_joint_trajectory_controller_spawner" pkg="controller_manager" type="spawner" respawn="false" output="screen" args="$(arg command_args) panda_arm_controller"/>
<node name="effort_joint_trajectory_controller_spawner" pkg="controller_manager" type="spawner" respawn="false" output="screen" args="$(arg command_args) panda_arm_controller"/>
</launch>
14 changes: 7 additions & 7 deletions panda_gazebo/launch/load_joint_effort_controllers.launch
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<!-- Launch file for launching the robot controllers -->
<launch>
<arg name="stopped" default="false"/>
<arg name="stopped" default="false" doc="Spawn the controllers in stoped mode"/>

<!--Load controller parameters-->
<rosparam file="$(find panda_gazebo)/cfg/controllers/joint_effort_controllers.yaml" command="load"/>
<!--Load controller parameters-->
<rosparam file="$(find panda_gazebo)/cfg/controllers/joint_effort_controllers.yaml" command="load"/>

<!--Load the controllers-->
<arg if="$(arg stopped)" name="command_args" value="--stopped"/>
<arg unless="$(arg stopped)" name="command_args" value="" />
<node name="joint_effort_controller_spawner" pkg="controller_manager" type="spawner" respawn="false" output="screen" args="$(arg command_args) panda_arm_joint1_effort_controller panda_arm_joint2_effort_controller
<!--Load the controllers-->
<arg if="$(arg stopped)" name="command_args" value="--stopped"/>
<arg unless="$(arg stopped)" name="command_args" value="" />
<node name="joint_effort_controller_spawner" pkg="controller_manager" type="spawner" respawn="false" output="screen" args="$(arg command_args) panda_arm_joint1_effort_controller panda_arm_joint2_effort_controller
panda_arm_joint3_effort_controller panda_arm_joint4_effort_controller panda_arm_joint5_effort_controller panda_arm_joint6_effort_controller panda_arm_joint7_effort_controller"/>
</launch>
14 changes: 7 additions & 7 deletions panda_gazebo/launch/load_joint_position_controllers.launch
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<!-- Launch file for launching the robot controllers -->
<launch>
<arg name="stopped" default="false"/>
<arg name="stopped" default="false" doc="Spawn the controllers in stoped mode"/>

<!--Load controller parameters-->
<rosparam file="$(find panda_gazebo)/cfg/controllers/joint_position_controllers.yaml" command="load"/>
<!--Load controller parameters-->
<rosparam file="$(find panda_gazebo)/cfg/controllers/joint_position_controllers.yaml" command="load"/>

<!--Load the controllers-->
<arg if="$(arg stopped)" name="command_args" value="--stopped"/>
<arg unless="$(arg stopped)" name="command_args" value=""/>
<node name="joint_position_controller_spawner" pkg="controller_manager" type="spawner" respawn="false" output="screen" args="$(arg command_args) panda_arm_joint1_position_controller panda_arm_joint2_position_controller
<!--Load the controllers-->
<arg if="$(arg stopped)" name="command_args" value="--stopped"/>
<arg unless="$(arg stopped)" name="command_args" value=""/>
<node name="joint_position_controller_spawner" pkg="controller_manager" type="spawner" respawn="false" output="screen" args="$(arg command_args) panda_arm_joint1_position_controller panda_arm_joint2_position_controller
panda_arm_joint3_position_controller panda_arm_joint4_position_controller panda_arm_joint5_position_controller panda_arm_joint6_position_controller panda_arm_joint7_position_controller"/>
</launch>
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<!-- Launch file for launching the robot controllers -->
<launch>
<arg name="stopped" default="false"/>
<arg name="stopped" default="false"/>

<!--Load controller parameters-->
<rosparam file="$(find panda_gazebo)/cfg/controllers/position_joint_trajectory_controllers.yaml" command="load"/>
<!--Load controller parameters-->
<rosparam file="$(find panda_gazebo)/cfg/controllers/position_joint_trajectory_controllers.yaml" command="load"/>

<!--Load the controllers-->
<arg if="$(arg stopped)" name="command_args" value="--stopped"/>
<arg unless="$(arg stopped)" name="command_args" value=""/>
<node name="position_joint_trajectory_controller_spawner" pkg="controller_manager" type="spawner" respawn="false" output="screen" args="$(arg command_args) panda_arm_controller"/>
<!--Load the controllers-->
<arg if="$(arg stopped)" name="command_args" value="--stopped"/>
<arg unless="$(arg stopped)" name="command_args" value=""/>
<node name="position_joint_trajectory_controller_spawner" pkg="controller_manager" type="spawner" respawn="false" output="screen" args="$(arg command_args) panda_arm_controller"/>
</launch>
28 changes: 14 additions & 14 deletions panda_gazebo/launch/panda_rviz.launch
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
<!-- Launch file for loading RVIZ -->
<launch>
<!-- GDB Debug Option -->
<arg name="debug" default="false"/>
<arg unless="$(arg debug)" name="launch_prefix" value=""/>
<arg if="$(arg debug)" name="launch_prefix" value="gdb --ex run --args"/>
<!-- rviz launch arguments -->
<arg name="moveit" default="false" />
<arg unless="$(arg moveit)" name="rviz_file_default" value="$(find panda_gazebo)/launch/includes/rviz/panda.rviz"/>
<arg if="$(arg moveit)" name="rviz_file_default" value="$(find panda_gazebo)/launch/includes/rviz/panda_moveit.rviz"/>
<arg name="rviz_file" default="$(arg rviz_file_default)"/>
<arg name="command_args" value="-d $(arg rviz_file)" />
<!-- GDB Debug Option -->
<arg name="debug" default="false" doc="Add gdb debug flag"/>
<arg unless="$(arg debug)" name="launch_prefix" value=""/>
<arg if="$(arg debug)" name="launch_prefix" value="gdb --ex run --args"/>
<!-- rviz launch arguments -->
<arg name="moveit" default="false" doc="Start MoveIt"/>
<arg unless="$(arg moveit)" name="rviz_file_default" value="$(find panda_gazebo)/launch/includes/rviz/panda.rviz"/>
<arg if="$(arg moveit)" name="rviz_file_default" value="$(find panda_gazebo)/launch/includes/rviz/panda_moveit.rviz"/>
<arg name="rviz_file" default="$(arg rviz_file_default)" doc="Path to the Rviz configuration file"/>
<arg name="command_args" value="-d $(arg rviz_file)" />

<!-- launch rviz -->
<node name="$(anon rviz)" launch-prefix="$(arg launch_prefix)" pkg="rviz" type="rviz" respawn="false" args="$(arg command_args)" output="screen">
<rosparam command="load" file="$(find panda_moveit_config)/config/kinematics.yaml"/>
</node>
<!-- launch rviz -->
<node name="$(anon rviz)" launch-prefix="$(arg launch_prefix)" pkg="rviz" type="rviz" respawn="false" args="$(arg command_args)" output="screen">
<rosparam command="load" file="$(find panda_moveit_config)/config/kinematics.yaml"/>
</node>
</launch>
Loading

0 comments on commit ba9b922

Please sign in to comment.