You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
importrclpyfromrclpy.loggingimportget_loggerfrommoveit.core.robot_stateimportRobotStatefrommoveit.planningimportMoveItPy, MultiPipelinePlanRequestParametersfrommoveit_configs_utilsimportMoveItConfigsBuilderfromament_index_pythonimportget_package_share_directoryimporttimeimportosmoveit_config= (
MoveItConfigsBuilder("moveit_resources_panda")
.robot_description(
file_path="config/panda.gazebo.urdf",
)
.robot_description_semantic(file_path="config/panda.srdf")
.planning_scene_monitor(
publish_robot_description=True, publish_robot_description_semantic=True
)
.trajectory_execution(file_path="config/gripper_moveit_controllers.yaml")
.planning_pipelines(
pipelines=["ompl", "chomp", "pilz_industrial_motion_planner", "stomp"]
)
.moveit_cpp(file_path=os.path.join(
get_package_share_directory("moveit2_tutorials"),
"config",
"jupyter_notebook_prototyping.yaml"))
.to_moveit_configs()
)
defplan_and_execute(
robot,
planning_component,
logger,
single_plan_parameters=None,
multi_plan_parameters=None,
sleep_time=0.0,
):
"""Helper function to plan and execute a motion."""# plan to goallogger.info("Planning trajectory")
ifmulti_plan_parametersisnotNone:
plan_result=planning_component.plan(
multi_plan_parameters=multi_plan_parameters
)
elifsingle_plan_parametersisnotNone:
plan_result=planning_component.plan(
single_plan_parameters=single_plan_parameters
)
else:
plan_result=planning_component.plan()
# execute the planifplan_result:
logger.info("Executing plan")
robot_trajectory=plan_result.trajectoryrobot.execute(robot_trajectory, controllers=[])
else:
logger.error("Planning failed")
time.sleep(sleep_time)
defmain():
config_dict=moveit_config.to_dict()
config_dict.update({'use_sim_time' : True})
rclpy.init()
logger=get_logger("moveit_py.pose_goal")
# instantiate MoveItPy instance and get planning componentpanda=MoveItPy(node_name="moveit_py", config_dict=config_dict)
panda_arm=panda.get_planning_component("panda_arm")
logger.info("MoveItPy instance created")
# set plan start state to current statepanda_arm.set_start_state_to_current_state()
# set pose goal with PoseStamped messagepanda_arm.set_goal_state(configuration_name="extended")
plan_and_execute(panda, panda_arm, logger, sleep_time=3.0)
if__name__=='__main__':
main()
Expected behaviour
Robot moving to extented position
Actual behaviour
python code error, kernel crash in jupyter notebook
Console output
[INFO] [1722406022.160341719] [moveit_3747324773.moveit.plugins.simple_controller_manager]: Added FollowJointTrajectory controller for panda_arm_controller[INFO] [1722406022.160445906] [moveit_3747324773.moveit.plugins.simple_controller_manager]: Max effort set to 0.0[INFO] [1722406022.163541288] [moveit_3747324773.moveit.plugins.simple_controller_manager]: Added GripperCommand controller for panda_hand_controller[INFO] [1722406022.163789564] [moveit_3747324773.moveit.plugins.simple_controller_manager]: Returned 2 controllers in list[INFO] [1722406022.163845204] [moveit_3747324773.moveit.plugins.simple_controller_manager]: Returned 2 controllers in list[INFO] [1722406022.164344371] [moveit_3747324773.moveit.ros.trajectory_execution_manager]: Trajectory execution is managing controllersterminate called after throwing an instance of 'rclcpp::exceptions::InvalidParameterValueException' what(): parameter 'qos_overrides./clock.subscription.durability' could not be set: Aborted (core dumped)
The text was updated successfully, but these errors were encountered:
This issue is being labeled as stale because it has been open 45 days with no activity. It will be automatically closed after another 45 days without follow-ups.
Description
Using panda_moveit_config from moveit resources,
added another launch file to launch the robot in gazebo.
Overview of your issue here.
Your environment
Steps to reproduce
git clone https://github.com/moveit/moveit_resources
ALSO add this gazebo ros controller added urdf in the config directory as
panda.gazebo.urdf
https://justpaste.it/fc7xe
ros2 launch moveit_resources_panda_moveit_config demo_gazebo.launch.py
Expected behaviour
Robot moving to extented position
Actual behaviour
python code error, kernel crash in jupyter notebook
Console output
The text was updated successfully, but these errors were encountered: