Open ron007d opened 3 months ago
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.
Facing the same issue
Facing the same issue
this helped me
config_dict = moveit_config.to_dict()
config_dict.update({'use_sim_time':True})
this helped me
config_dict = moveit_config.to_dict() config_dict.update({'use_sim_time':True})
@ron007d what does this mean? isn't this the cause of the issue? i have the same problem here with this value set
alright. i used to directly run the script inside console. but now, i created a new launch file to include this script, and move moveit_config into the launch file, pass to the script as the parameter. and it worked...
I don't understand why
Ah! Found one better solution.
When i'm using the launch file, i notice the argument passed to the script: --params-file /tmp/launch_params_xp_ss6gq
.
And as i go though MoveItPy cpp code here, i found it containing lots of launch_params
related stuff which also includes an argument: --params-file
.
The logic writes either config_dict
or launch_params_filepaths
, and they all end up with --params-file
none the less. just that config_dict
is converted into yaml by moveit::utils::create_params_file_from_dict
.
So i compare two files, and found the one major difference is that the node_name at the root, the one from launch file is /**
, and the one from config_dict
is the node_name i passed into MoveItPy
.
(Solution) And i try to convert the dict outside of MoveItPy
and pass in as launch_params_filepaths
:
moveit_config.update({"use_sim_time": True})
file = create_params_file_from_dict(moveit_config, "/**")
arm = MoveItPy(
node_name=node_name,
launch_params_filepaths=[file],
)
And it worked, just simple as that.
but idk why node name causes this to happen...
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
def generate_launch_description(): os.environ['GAZEBO_MODEL_PATH'] =f"{get_package_prefix('moveit_resources_panda_description')}/share/:{os.environ['GAZEBO_MODEL_PATH']}"
print(os.environ['GAZEBO_MODEL_PATH'])
moveit_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"))
def plan_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 goal
def main(): config_dict = moveit_config.to_dict() config_dict.update({'use_sim_time' : True}) rclpy.init() logger = get_logger("moveit_py.pose_goal")
if name == 'main': main()