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

Jazzy harmonic devel #27

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
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
5 changes: 2 additions & 3 deletions examples/py/ex_throw_object.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#!/usr/bin/env python3

from copy import deepcopy
from threading import Thread

Expand Down Expand Up @@ -64,7 +63,7 @@ def throw(self):
position=position_above_object,
quat_xyzw=default_quat,
)
self._moveit2.wait_until_executed()
self._moveit2.wait_until_executed() #TODO: "wait_until_executed" does not wait when path is still planned!!

# Move to grasp position
self._moveit2.move_to_pose(
Expand All @@ -89,7 +88,7 @@ def throw(self):
self._moveit2.wait_until_executed()

# Move to pre-throw configuration
joint_configuration_pre_throw = [0.0, -1.75, 0.0, -0.1, 0.0, 3.6, 0.8]
joint_configuration_pre_throw = [0.0, -1.5, 0.0, -0.2, 0.0, 3.6, 0.8]
self._moveit2.move_to_configuration(joint_configuration_pre_throw)
self._moveit2.wait_until_executed()

Expand Down
2 changes: 1 addition & 1 deletion launch/default.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ def generate_launch_description() -> LaunchDescription:
)
),
launch_arguments=[
("ros2_control_plugin", "ign"),
("ros2_control_plugin", "gz"),
("ros2_control_command_interface", "effort"),
# TODO: Re-enable colligion geometry for manipulator arm once spawning with specific joint configuration is enabled
("collision_arm", "false"),
Expand Down
13 changes: 10 additions & 3 deletions launch/robots/robot_panda.launch.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,19 @@
#!/usr/bin/env -S ros2 launch
"""Launch script for spawning Franka Emika Panda into Ignition Gazebo world"""

from os import path
from typing import List

from ament_index_python.packages import get_package_share_directory

from launch_ros.actions import Node

from launch import LaunchDescription
from launch.actions import DeclareLaunchArgument
from launch.substitutions import LaunchConfiguration



def generate_launch_description() -> LaunchDescription:
# Declare all launch arguments
declared_arguments = generate_declared_arguments()
Expand All @@ -23,7 +27,7 @@ def generate_launch_description() -> LaunchDescription:
nodes = [
# ros_ign_gazebo_create
Node(
package="ros_ign_gazebo",
package="ros_gz_sim",
executable="create",
output="log",
arguments=["-file", model, "--ros-args", "--log-level", log_level],
Expand All @@ -43,8 +47,11 @@ def generate_declared_arguments() -> List[DeclareLaunchArgument]:
# Model for Ignition Gazebo
DeclareLaunchArgument(
"model",
default_value="panda",
description="Name or filepath of model to load.",
default_value=path.join(
get_package_share_directory("panda_description"),
"panda",
"model.sdf",
),
Comment on lines -46 to +54
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was a bit suprised cause everything looked like it should have been working at some time, though i could not ifgure why :)
Had not seen the script or environment hooks prior, will have to check it out. Maybe it's because I'm using zsh and I'd have to have a corresponding zsh hook there. Will try to check

),
# Miscellaneous
DeclareLaunchArgument(
Expand Down
6 changes: 3 additions & 3 deletions launch/worlds/world_default.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ def generate_launch_description() -> LaunchDescription:
PythonLaunchDescriptionSource(
PathJoinSubstitution(
[
FindPackageShare("ros_ign_gazebo"),
FindPackageShare("ros_gz_sim"),
"launch",
"ign_gazebo.launch.py",
"gz_sim.launch.py",
]
)
),
Expand All @@ -43,7 +43,7 @@ def generate_launch_description() -> LaunchDescription:
nodes = [
# ros_ign_bridge (clock -> ROS 2)
Node(
package="ros_ign_bridge",
package="ros_gz_bridge",
executable="parameter_bridge",
output="log",
arguments=[
Expand Down
8 changes: 4 additions & 4 deletions launch/worlds/world_follow_target.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ def generate_launch_description() -> LaunchDescription:
PythonLaunchDescriptionSource(
PathJoinSubstitution(
[
FindPackageShare("ros_ign_gazebo"),
FindPackageShare("ros_gz_sim"),
"launch",
"ign_gazebo.launch.py",
"gz_sim.launch.py",
]
)
),
Expand All @@ -45,7 +45,7 @@ def generate_launch_description() -> LaunchDescription:
nodes = [
# ros_ign_bridge (clock -> ROS 2)
Node(
package="ros_ign_bridge",
package="ros_gz_bridge",
executable="parameter_bridge",
output="log",
arguments=[
Expand All @@ -58,7 +58,7 @@ def generate_launch_description() -> LaunchDescription:
),
# ros_ign_bridge (target pose -> ROS 2)
Node(
package="ros_ign_bridge",
package="ros_gz_bridge",
executable="parameter_bridge",
output="log",
arguments=[
Expand Down
6 changes: 3 additions & 3 deletions launch/worlds/world_throw_object.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ def generate_launch_description() -> LaunchDescription:
PythonLaunchDescriptionSource(
PathJoinSubstitution(
[
FindPackageShare("ros_ign_gazebo"),
FindPackageShare("ros_gz_sim"),
"launch",
"ign_gazebo.launch.py",
"gz_sim.launch.py",
]
)
),
Expand All @@ -45,7 +45,7 @@ def generate_launch_description() -> LaunchDescription:
nodes = [
# ros_ign_bridge (clock -> ROS 2)
Node(
package="ros_ign_bridge",
package="ros_gz_bridge",
executable="parameter_bridge",
output="log",
arguments=[
Expand Down
9 changes: 5 additions & 4 deletions package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@
<package format="3">
<name>ign_moveit2_examples</name>
<version>1.0.0</version>
<description>C++ and Python examples of using MoveIt 2 for planning motions that are executed inside Ignition Gazebo simulation environment</description>
<description>C++ and Python examples of using MoveIt 2 for planning motions that are executed inside GazeboSim simulation environment</description>
<maintainer email="[email protected]">Andrej Orsula</maintainer>
<author>Andrej Orsula</author>
Kaiser1401 marked this conversation as resolved.
Show resolved Hide resolved
<author>Klaus Ening</author>
<license>BSD</license>

<buildtool_depend>ament_cmake</buildtool_depend>
Expand All @@ -13,12 +14,12 @@
<depend>geometry_msgs</depend>
<depend>moveit_ros_planning_interface</depend>

<exec_depend>ign_ros2_control</exec_depend>
<exec_depend>gz_ros2_control</exec_depend>
<exec_depend>moveit</exec_depend>
<exec_depend>pymoveit2</exec_depend>
<exec_depend>rclpy</exec_depend>
<exec_depend>ros_ign_bridge</exec_depend>
<exec_depend>ros_ign_gazebo</exec_depend>
<exec_depend>ros_gz_bridge</exec_depend>
<exec_depend>ros_gz_sim</exec_depend>
<exec_depend>rviz2</exec_depend>

<exec_depend>panda_description</exec_depend>
Expand Down
10 changes: 5 additions & 5 deletions worlds/follow_target.sdf
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
<world name="ign_moveit2_follow_target_world">

<!-- Physics -->
<plugin filename="ignition-gazebo-physics-system" name="ignition::gazebo::systems::Physics">
<plugin filename="gz-sim-physics-system" name="gz::sim::systems::Physics">
<engine>
<filename>ignition-physics-dartsim-plugin</filename>
<filename>gz-physics-dartsim-plugin</filename>
</engine>
<dart>
<collision_detector>bullet</collision_detector>
Expand All @@ -17,15 +17,15 @@
</physics>

<!-- Scene -->
<plugin filename="ignition-gazebo-scene-broadcaster-system" name="ignition::gazebo::systems::SceneBroadcaster">
<plugin filename="gz-sim-scene-broadcaster-system" name="gz::sim::systems::SceneBroadcaster">
</plugin>
<scene>
<ambient>0.8 0.8 0.8</ambient>
<grid>false</grid>
</scene>

<!-- User Commands (transform control) -->
<plugin filename="ignition-gazebo-user-commands-system" name="ignition::gazebo::systems::UserCommands">
<plugin filename="gz-sim-user-commands-system" name="gz::sim::systems::UserCommands">
</plugin>


Expand Down Expand Up @@ -96,7 +96,7 @@
</visual>
</link>
<!-- Pose publisher plugin, used to determine the target pose to reach -->
<plugin filename="ignition-gazebo-pose-publisher-system" name="ignition::gazebo::systems::PosePublisher">
<plugin filename="gz-sim-pose-publisher-system" name="gz::sim::systems::PosePublisher">
<publish_nested_model_pose>true</publish_nested_model_pose>
<publish_link_pose>false</publish_link_pose>
<publish_collision_pose>false</publish_collision_pose>
Expand Down
8 changes: 4 additions & 4 deletions worlds/throw_object.sdf
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
<world name="ign_moveit2_follow_target_world">

<!-- Physics -->
<plugin filename="ignition-gazebo-physics-system" name="ignition::gazebo::systems::Physics">
<plugin filename="gz-sim-physics-system" name="gz::sim::systems::Physics">
<engine>
<filename>ignition-physics-dartsim-plugin</filename>
<filename>gz-physics-dartsim-plugin</filename>
</engine>
<dart>
<collision_detector>bullet</collision_detector>
Expand All @@ -17,15 +17,15 @@
</physics>

<!-- Scene -->
<plugin filename="ignition-gazebo-scene-broadcaster-system" name="ignition::gazebo::systems::SceneBroadcaster">
<plugin filename="gz-sim-scene-broadcaster-system" name="gz::sim::systems::SceneBroadcaster">
</plugin>
<scene>
<ambient>0.8 0.8 0.8</ambient>
<grid>false</grid>
</scene>

<!-- User Commands (transform control) -->
<plugin filename="ignition-gazebo-user-commands-system" name="ignition::gazebo::systems::UserCommands">
<plugin filename="gz-sim-user-commands-system" name="gz::sim::systems::UserCommands">
</plugin>


Expand Down