Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: remove 'panda_moveit_config' submodule #185

Merged
merged 1 commit into from
Nov 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
[submodule "panda_moveit_config"]
path = panda_moveit_config
url = ../panda_moveit_config.git

[submodule "franka_ros"]
path = franka_ros
url = ../franka_ros.git
17 changes: 9 additions & 8 deletions panda_gazebo/launch/load_controllers.launch.xml
Original file line number Diff line number Diff line change
@@ -1,36 +1,37 @@
<!--Launch file that loads the control parameters and controllers-->
<launch>
<!--General arguments-->
<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)-->
<!-- 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-->
<!-- Load general Gazebo control configuration parameters-->
<rosparam file="$(find panda_gazebo)/cfg/controllers/gazebo_ros_control.yaml" command="load" />
<!-- Load general ros_control configuration values-->
<!-- Load general ros_control configuration parameters-->
<rosparam file="$(find panda_gazebo)/cfg/controllers/ros_control.yaml" command="load"/>
<!-- Load Moveit control configuration values-->
<!-- Load Moveit control configuration parameters-->
<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-->
<!-- Joint position controllers-->
<group if="$(eval arg('control_type') == 'position')">
<include file="$(find panda_gazebo)/launch/load_joint_group_position_controller.launch.xml"/>
<!--Load joint_trajectory controller in stopped mode
<!-- 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_controller.launch.xml">
<arg name="stopped" value="true"/>
</include>
</group>
<!--Joint effort controllers-->
<!-- Joint effort controllers-->
<group if="$(eval arg('control_type') == 'effort')">
<include file="$(find panda_gazebo)/launch/load_joint_group_effort_controller.launch.xml"/>
</group>
<!--Joint_trajectory controller-->
<!-- Joint_trajectory controller-->
<include unless="$(eval arg('control_type') == 'position')" file="$(find panda_gazebo)/launch/load_effort_joint_trajectory_controller.launch.xml">
<arg name="stopped" value="$(eval arg('control_type') == 'effort')"/>
</include>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,8 @@
<!--Load controller parameters-->
<rosparam file="$(find panda_gazebo)/cfg/controllers/effort_joint_trajectory_controllers.yaml" command="load"/>

<!--Load the controllers-->
<!--Load (and start) the controller-->
<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"/>
</launch>
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<!--Load controller parameters-->
<rosparam file="$(find panda_gazebo)/cfg/controllers/joint_group_effort_controller.yaml" command="load"/>

<!--Load the controllers-->
<!--Load (and start) the controller-->
<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_joint_effort_controller"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<!--Load controller parameters-->
<rosparam file="$(find panda_gazebo)/cfg/controllers/joint_group_position_controller.yaml" command="load"/>

<!--Load the controllers-->
<!--Load (and start) the controller-->
<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_joint_position_controller"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<!--Load controller parameters-->
<rosparam file="$(find panda_gazebo)/cfg/controllers/position_joint_trajectory_controllers.yaml" command="load"/>

<!--Load the controllers-->
<!--Load (and start) the controller-->
<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"/>
Expand Down
4 changes: 2 additions & 2 deletions panda_gazebo/launch/panda_rviz.launch.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@
<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-->
<!--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-->
<!--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>
Expand Down
38 changes: 21 additions & 17 deletions panda_gazebo/launch/put_robot_in_world.launch
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<!--Launch file for adding the panda robot to the gazebo world-->
<launch>
<!--General arguments-->
<arg name="rviz" default="true" doc="Start Rviz"/>
<arg name="load_gripper" default="true" doc="Load the gripper"/>
<arg name="debug" default="false" doc="Add gdb debug flag"/>
Expand All @@ -23,18 +24,17 @@
<arg name="roll" default="0" doc="How much to rotate the base of the robot around its X-axis in [rad]?"/>
<arg name="pitch" default="0" doc="How much to rotate the base of the robot around its Y-axis in [rad]?"/>
<arg name="yaw" default="0" doc="How much to rotate the base of the robot around its Z-axis in [rad]?"/>
<!--Phyics engines: dart|ode-->
<!-- The used phyics engine (options: dart and ode)-->
<arg name="physics" default="dart" doc="The physics engine used by gazebo"/>
<!--Control arguments-->
<!-- The control type used for controlling the robot (Options: Trajectory, position, effort)-->
<!-- 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"/>
<arg name="brute_force_grasping" default="false" doc="Disable the gripper width reached check when grasping."/>

<!--Spawn the Panda robot-->
<!--Start Gazebo and spawn the robot-->
<include file="$(find franka_gazebo)/launch/panda.launch">
<arg name="gazebo" value="$(arg gazebo)"/>
<arg unless="$(arg gazebo_gui)" name="headless" value="true"/>
<arg if="$(arg gazebo_gui)" name="headless" value="false"/>
<arg name="headless" value="$(eval not arg('gazebo_gui'))" />
<arg name="paused" value="$(arg paused)"/>
<arg name="world" value="$(arg world)"/>
<arg name="use_gripper" default="$(arg load_gripper)"/>
Expand All @@ -47,23 +47,27 @@
<arg name="physics" value="$(arg physics)"/>
</include>

<!--Set panda_gazebo parameters-->
<!-- Disable franka action console logs-->
<node pkg="panda_gazebo" type="set_franka_gripper_logging_level.py" name="set_franka_gripper_logger_level" output="$(arg output)"/>
<node if="$(arg disable_franka_gazebo_logs)" pkg="panda_gazebo" type="set_franka_gazebo_logging_level.py" name="set_franka_gazebo_logger_level" output="$(arg output)"/>
<!--Change 'franka_ros' nodes logging levels-->
<node pkg="panda_gazebo" type="set_ros_node_logging_level.py" name="set_logging_level" output="$(arg output)">
<param name="level" value="warn"/>
<param name="name" value="ros.franka_gazebo.FrankaGripperSim"/>
</node>
<node if="$(arg disable_franka_gazebo_logs)" pkg="panda_gazebo" type="set_logging_level.py" name="set_ros_node_logging_level" output="$(arg output)">
<param name="level" value="error"/>
<param name="name" value="ros.franka_gazebo"/>
</node>

<!--Run the main MoveIt! executable without trajectory execution (we do not have controllers configured by default)-->
<include if="$(arg moveit)" file="$(find panda_moveit_config)/launch/move_group.launch">
<arg name="info" value="true"/>
<!--Start MoveIt-->
<include file="$(find panda_moveit_config)/launch/demo.launch" pass_all_args="true">
<arg name="debug" value="$(arg debug)"/>
<arg name="pipeline" value="$(arg pipeline)" />
<arg name="allow_trajectory_execution" value="true"/>
<arg name="fake_execution" value="false"/>
<arg name="load_gripper" value="$(arg load_gripper)"/>
<arg name="load_robot_description" value="false"/>
<arg name="moveit_controller_manager" value="simple"/>
<arg name="use_rviz" value="false"/>
</include>

<!--Load Moveit configuration values-->
<!--Set MoveIt configuration values-->
<rosparam if="$(arg moveit)" file="$(find panda_gazebo)/cfg/controllers/moveit.yaml" command="load" />

<!--Load and start the controllers-->
Expand All @@ -73,7 +77,7 @@
<arg name="load_gripper" value="$(arg load_gripper)"/>
</include>

<!--Load Moveit control services-->
<!--Load the 'panda_gazebo' MoveIt server-->
<!--Retrieve the right transmission for the control type-->
<arg if="$(eval arg('control_type') == 'trajectory')" name="load_set_ee_pose_service" value="true"/>
<arg unless="$(eval arg('control_type') == 'trajectory')" name="load_set_ee_pose_service" value="false"/>
Expand All @@ -85,7 +89,7 @@
<param name="load_set_ee_pose_service" value="$(arg load_set_ee_pose_service)"/>
</node>

<!--Load ros_control service-->
<!--Load the 'panda_Gazebo' ROS control server-->
<arg if="$(eval arg('control_type') == 'trajectory')" name="load_set_joint_commands_service" value="false"/>
<arg if="$(eval arg('control_type') == 'trajectory')" name="load_arm_follow_joint_trajectory_action" value="true"/>
<arg unless="$(eval arg('control_type') == 'trajectory')" name="load_set_joint_commands_service" value="true"/>
Expand Down
4 changes: 2 additions & 2 deletions panda_gazebo/launch/start_pick_and_place_world.launch
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
<arg name="paused" default="true" doc="Start gazebo paused"/>
<arg name="verbose" default="false" doc="Enable Gazebo verbose mode"/>
<arg name="gazebo_gui" default="true" doc="Start the gazebo GUI"/>
<!--Phyics engines: dart|ode-->
<!-- The used phyics engine (options: dart and ode)-->
<arg name="physics" default="dart" doc="The physics engine used by gazebo"/>

<!--Start the gazebo world-->
<!--Start the Gazebo world-->
<include file="$(find panda_gazebo)/launch/start_world.launch.xml">
<arg name="world" value="$(arg world)"/>
<arg name="verbose" value="$(arg verbose)"/>
Expand Down
4 changes: 2 additions & 2 deletions panda_gazebo/launch/start_push_world.launch
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
<arg name="paused" default="true" doc="Start gazebo paused"/>
<arg name="verbose" default="false" doc="Enable Gazebo verbose mode"/>
<arg name="gazebo_gui" default="true" doc="Start the gazebo GUI"/>
<!--Phyics engines: dart|ode-->
<!-- The used phyics engine (options: dart and ode)-->
<arg name="physics" default="dart" doc="The physics engine used by gazebo"/>

<!--Start the gazebo world-->
<!--Start the Gazebo world-->
<include file="$(find panda_gazebo)/launch/start_world.launch.xml">
<arg name="world" value="$(arg world)"/>
<arg name="verbose" value="$(arg verbose)"/>
Expand Down
4 changes: 2 additions & 2 deletions panda_gazebo/launch/start_reach_world.launch
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
<arg name="paused" default="true" doc="Start gazebo paused"/>
<arg name="verbose" default="false" doc="Enable Gazebo verbose mode"/>
<arg name="gazebo_gui" default="true" doc="Start the gazebo GUI"/>
<!--Phyics engines: dart|ode-->
<!-- The used phyics engine (options: dart and ode)-->
<arg name="physics" default="dart" doc="The physics engine used by gazebo"/>

<!--Start the gazebo world-->
<!--Start the Gazebo world-->
<include file="$(find panda_gazebo)/launch/start_world.launch.xml">
<arg name="world" value="$(arg world)"/>
<arg name="verbose" value="$(arg verbose)"/>
Expand Down
7 changes: 4 additions & 3 deletions panda_gazebo/launch/start_simulation.launch
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@
<!--Starts the panda gazebo simulation-->
<launch>
<!--General arguments-->
<arg name="rviz" default="true" doc="Start Rviz"/>
<arg name="moveit" default="true" doc="Start MoveIt"/>
<!--Simulation arguments-->
<arg name="world" default="$(find panda_gazebo)/resources/worlds/empty.world" doc="Path to the world file"/>
<arg name="paused" default="true" doc="Start gazebo paused"/>
<arg name="verbose" default="false" doc="Enable Gazebo verbose mode"/>
<arg name="gazebo_gui" default="true" doc="Start the gazebo GUI"/>
<!--Phyics engines: dart|ode-->
<!-- The used phyics engine (options: dart and ode)-->
<arg name="physics" default="dart" doc="The physics engine used by gazebo"/>
<!--Control arguments-->
<!-- The control type used for controlling the robot (Options: Trajectory, position, effort)-->
<!-- 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"/>

<!--Launch gazebo environment-->
<!--Start the Gazebo world-->
<include file="$(find panda_gazebo)/launch/start_world.launch.xml">
<arg name="world" value="$(arg world)"/>
<arg name="paused" value="$(arg paused)"/>
Expand Down
4 changes: 2 additions & 2 deletions panda_gazebo/launch/start_slide_world.launch
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
<arg name="paused" default="true" doc="Start gazebo paused"/>
<arg name="verbose" default="false" doc="Enable Gazebo verbose mode"/>
<arg name="gazebo_gui" default="true" doc="Start the gazebo GUI"/>
<!--Phyics engines: dart|ode-->
<!-- The used phyics engine (options: dart and ode)-->
<arg name="physics" default="dart" doc="The physics engine used by gazebo"/>

<!--Start the gazebo world-->
<!--Start the Gazebo world-->
<include file="$(find panda_gazebo)/launch/start_world.launch.xml">
<arg name="world" value="$(arg world)"/>
<arg name="verbose" value="$(arg verbose)"/>
Expand Down
1 change: 1 addition & 0 deletions panda_gazebo/launch/start_world.launch.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<arg name="paused" default="true" doc="Start gazebo paused"/>
<arg name="verbose" default="false" doc="Enable Gazebo verbose mode"/>
<arg name="gazebo_gui" default="true" doc="Start the gazebo GUI"/>
<!-- The used phyics engine (options: dart and ode)-->
<arg name="physics" default="dart" doc="The physics engine used by gazebo"/> <!--Phyics engines: dart|ode-->

<!--Start the gazebo world-->
Expand Down
1 change: 1 addition & 0 deletions panda_gazebo/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@
<exec_depend>position_controllers</exec_depend>
<exec_depend>effort_controllers</exec_depend>
<exec_depend>joint_trajectory_controller</exec_depend>
<exec_depend>panda_moveit_config</exec_depend>

<!--Extra run dependencies
NOTE: Disabled by default as they are only needed for some test scripts.
Expand Down
35 changes: 0 additions & 35 deletions panda_gazebo/scripts/set_franka_gripper_logging_level.py

This file was deleted.

19 changes: 8 additions & 11 deletions ...cripts/set_franka_gazebo_logging_level.py → panda_gazebo/scripts/set_logging_level.py
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,23 +1,22 @@
#!/usr/bin/env python
"""Small python ROS node that can be used to set the logging level of the
`franka_gazebo`_ node.

.. _franka_gazebo: https://github.com/frankaemika/franka_ros/tree/develop/franka_gazebo
"""
"""Small python ROS node that can be used to set the logging level of a ROS logger."""
import argparse
import sys

import rospy
from roscpp.srv import SetLoggerLevel, SetLoggerLevelRequest

if __name__ == "__main__":
rospy.init_node("set_franka_gazebo_logger_level")
rospy.init_node("set_logger_level")

# Get input argument.
parser = argparse.ArgumentParser(description="Retrieve log level")
# Get input arguments.
parser = argparse.ArgumentParser(description="Set logging level of a ROS logger.")
parser.add_argument(
"-l", "--level", nargs="?", type=str, default="error", help="logging level"
)
parser.add_argument(
"-n", "--name", nargs="?", type=str, required=True, help="logger name"
)
args = parser.parse_args(rospy.myargv(argv=sys.argv)[1:])

# Call '/gazebo/set_logger_level' service
Expand All @@ -26,8 +25,6 @@
set_logger_level_srv = rospy.ServiceProxy(
"/gazebo/set_logger_level", SetLoggerLevel
)
set_logger_level_srv(
SetLoggerLevelRequest(logger="ros.franka_gazebo", level=args.level)
)
set_logger_level_srv(SetLoggerLevelRequest(logger=args.name, level=args.level))
except rospy.ServiceException as e:
print("Service call '/gazebo/set_logger_level' failed: %s" % e)
4 changes: 2 additions & 2 deletions panda_gazebo/src/panda_gazebo/core/moveit_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ def __init__( # noqa: C901
self,
arm_move_group="panda_arm",
arm_ee_link="panda_link8",
hand_move_group="hand",
hand_move_group="panda_hand",
load_gripper=True,
load_set_ee_pose_service=True,
load_extra_services=False,
Expand All @@ -123,7 +123,7 @@ def __init__( # noqa: C901
arm_ee_link (str, optional): The end effector you want moveit to use when
controlling the Panda arm. Defaults to ``panda_link8``.
hand_move_group (str, optional): The name of the move group you want to use
for controlling the Panda hand. Defaults to ``hand``.
for controlling the Panda hand. Defaults to ``panda_hand``.
load_gripper (boolean, optional): Whether we also want to load the gripper
control services. Defaults to ``True``.
load_set_ee_pose_service (boolean, optional): Whether the set ee pose
Expand Down
1 change: 0 additions & 1 deletion panda_moveit_config
Submodule panda_moveit_config deleted from 5bf9df
Loading