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

Fix "Planning Scene ROS API" tutorial #544

Merged
merged 1 commit into from
Nov 12, 2020

Conversation

sjahr
Copy link
Contributor

@sjahr sjahr commented Oct 12, 2020

Description

Another task taken from @tylerjw's TODO list from ros-planning/panda_moveit_config/pull/74#. I fixed the "Planning Scene ROS API" tutorial. The adaption of the object's spawn position and size also fixes the removal for me.

While the tutorial does what it should, attaching the object to the arm causes this console output:

ros.moveit_core.robot_state: Found empty JointState message

Triggered by publishing the planning diff message here.
Any ideas why this happens?

Checklist

  • Solve empty JointState message
  • Fix "Planning Scene ROS API" tutorial to spawn the object in the gripper and remove it from the world in the last step.
  • Required by CI: Code is auto formatted using clang-format

@tylerjw tylerjw self-assigned this Oct 13, 2020
Copy link
Member

@JafarAbdi JafarAbdi left a comment

Choose a reason for hiding this comment

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

Thanks @sjahr for submitting the PR!

The reason for the empty joint message error is the robot_state message should be diff

ROS_INFO("Attaching the object to the hand and removing it from the world.");
planning_scene.world.collision_objects.clear();
planning_scene.world.collision_objects.push_back(remove_object);
planning_scene.robot_state.attached_collision_objects.push_back(attached_object);
planning_scene.robot_state.is_diff = true;
planning_scene_diff_publisher.publish(planning_scene);

And just for consistency, do you mind changing the frame_id for the remove_object from panda_link0 to panda_hand .?

@sjahr sjahr closed this Oct 22, 2020
@sjahr sjahr reopened this Oct 22, 2020
@sjahr
Copy link
Contributor Author

sjahr commented Oct 22, 2020

Thanks @sjahr for submitting the PR!

The reason for the empty joint message error is the robot_state message should be diff

ROS_INFO("Attaching the object to the hand and removing it from the world.");
planning_scene.world.collision_objects.clear();
planning_scene.world.collision_objects.push_back(remove_object);
planning_scene.robot_state.attached_collision_objects.push_back(attached_object);
planning_scene.robot_state.is_diff = true;
planning_scene_diff_publisher.publish(planning_scene);

And just for consistency, do you mind changing the frame_id for the remove_object from panda_link0 to panda_hand .?

You are welcome. I've changed the frame_id for the remove_object and added the missing is_diff = true

@sjahr sjahr requested a review from JafarAbdi October 22, 2020 15:18
@felixvd felixvd merged commit ddac28e into moveit:master Nov 12, 2020
@sjahr sjahr deleted the fix_planning_scene_api branch September 8, 2022 09:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants