-
Notifications
You must be signed in to change notification settings - Fork 184
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
✨ Your First C++ MoveIt Project Tutorial #262
Conversation
a6ebe40
to
d0bbb6a
Compare
7e55982
to
b36c42d
Compare
748e22f
to
6b2a86e
Compare
This pull request is in conflict. Could you fix it @tylerjw? |
d76bdb1
to
5c93c4d
Compare
This pull request is in conflict. Could you fix it @tylerjw? |
6a516f2
to
f29e025
Compare
c941896
to
4302b4d
Compare
I was testing this PR and launching the demo file give me this error
Did anyone come across this? |
I am getting the error described in #303 on both, galactic and rolling distributions. |
Thank you for trying this. I read the issue you posted but haven't had time to work on it yet. |
After adding the code in step 3, I'm getting an error relating to a missing
I believe this is because that parameter is unmapped when running the node via a simple import os
import yaml
from launch import LaunchDescription
from launch_ros.actions import Node
from ament_index_python.packages import get_package_share_directory
def load_file(package_name, file_path):
package_path = get_package_share_directory(package_name)
absolute_file_path = os.path.join(package_path, file_path)
try:
with open(absolute_file_path, "r") as file:
return file.read()
except EnvironmentError: # parent of IOError, OSError *and* WindowsError where available
return None
def load_yaml(package_name, file_path):
package_path = get_package_share_directory(package_name)
absolute_file_path = os.path.join(package_path, file_path)
try:
with open(absolute_file_path, "r") as file:
return yaml.safe_load(file)
except EnvironmentError: # parent of IOError, OSError *and* WindowsError where available
return None
def generate_launch_description():
# planning_context
robot_description_config = load_file(
"moveit_resources_panda_description", "urdf/panda.urdf"
)
robot_description = {"robot_description": robot_description_config}
robot_description_semantic_config = load_file(
"moveit_resources_panda_moveit_config", "config/panda.srdf"
)
robot_description_semantic = {
"robot_description_semantic": robot_description_semantic_config
}
kinematics_yaml = load_yaml(
"moveit_resources_panda_moveit_config", "config/kinematics.yaml"
)
# MoveGroupInterface demo executable
move_group_demo = Node(
name="hello_moveit",
package="hello_moveit",
executable="hello_moveit",
output="screen",
parameters=[robot_description, robot_description_semantic, kinematics_yaml],
)
return LaunchDescription([move_group_demo]) |
The error you are getting is there is something wrong with the loading of the "publish_robot_description": True,
"publish_robot_description_semantic": True, Doing ☝️ causes the MoveGroup node to publish the robot_description on a latched topic that the MoveGroupInterface node can subscribe to and get the value. You'll notice that these two lines are added to the demo.launch.py in this PR so it should be publishing on those two topics. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I ran into the same issue that @kylc experienced. Outside of that, I have a few nitpicky suggestions.
This pull request is in conflict. Could you fix it @tylerjw? |
e299fea
to
78389a9
Compare
75d2761
to
78389a9
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, but I think a couple things need a bit more explanation
doc/tutorials/quickstart_in_rviz/quickstart_in_rviz_tutorial.rst
Outdated
Show resolved
Hide resolved
This pull request is in conflict. Could you fix it @tylerjw? |
632fc64
to
788595b
Compare
Signed-off-by: Tyler Weaver <tylerjw@gmail.com>
Signed-off-by: Tyler Weaver <tylerjw@gmail.com>
Co-authored-by: Shuhao Wu <shuhao@shuhaowu.com>
Co-authored-by: Shuhao Wu <shuhao@shuhaowu.com>
Co-authored-by: Shuhao Wu <shuhao@shuhaowu.com>
Signed-off-by: Tyler Weaver <tylerjw@gmail.com>
Co-authored-by: Nathan Brooks <nbbrooks@gmail.com>
Co-authored-by: Anthony Baker <abake48@users.noreply.github.com>
Co-authored-by: Anthony Baker <abake48@users.noreply.github.com>
Co-authored-by: Anthony Baker <abake48@users.noreply.github.com>
Co-authored-by: Anthony Baker <abake48@users.noreply.github.com>
Signed-off-by: Tyler Weaver <tyler@picknik.ai>
Signed-off-by: Tyler Weaver <tyler@picknik.ai>
788595b
to
c775152
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks and works great! I highlighted a few areas in need of very minor grammatical fixes, but approved pending those changes.
Co-authored-by: Stephanie Eng <stephanie-eng@users.noreply.github.com>
This adds a initial tutorial walking a user through creating their first program using MoveIt.
Description
This is based on the MoveGroupInterface tutorial here: https://github.com/ros-planning/moveit2_tutorials/blob/main/doc/move_group_interface/src/move_group_interface_tutorial.cpp