Closed gaspatxo closed 6 months ago
Hi, we found a way to get this, we are basically using the same launch file as in xarm_planner
-> _robot_planner.launch.py
to launch our node. Whilst we setup the rviz simulation with ros2 launch xarm_moveit_config _robot_moveit_fake.launch.py no_gui_ctrl:=true
.
With this then we can use moveit_group
in our node without a problem.
I understand that this issues is related to the lack of compatibility with MoveItConfigsBuilder
Still, we are left in doubt on wether this is the best or meant way to do things. Any help or advice would be appreciated.
Hi @gaspatxo, our moveit_config packages are not automatically generated by moveit setup assistant, and our xarm_moveit_config
package does not obey the naming rule for MoveitConfigsBuilder
inferring, since the package for xarm7
should have the name xarm7_moveit_config
. We designed our packages to present a more compact structure, because we have many robot models, if each model would have one moveit pakage, then "xarm_ros2" would appear to be bulky and full of redundant similar files (like our ROS1 repository).
For the above reason, most of our launch and configuration files are hand-edited instead of automatically generated, which may result in difficulties for MoveitConfigsBuilder
analyzing. So I am afraid you may have to do additional work in order to fit xarm7 into a generalized software structure. I wonder if making a new (fake) xarm7_moveit_config
package for MoveitConfigsBuilder
while overwriting the default files in initialization with the real .srdf
and .urdf
files etc would work.
I am also glad that you have already found a way around. xarm_planner
package is the one we use for move_group
interface coding control. Since it will not be easy to transfer the structure of this repo to be compatible with MoveitConfigsBuilder
, I guess you can continue going this way if it is OK for your application.
Thank you for your reply @penglongxiang . I will then keep using the mentioned solution.
Still, I cannot help but wonder. One of the great feature of ROS is that it is hardware agnostic, and that one only has to learn moveit
in order to make us of any ros-enabled arm. Therfore my question is: why make a wrapper and a product-specific API when making your products ROS-compatible; it seems to me like missing a large part of the ROS point, and also an avoidable load on developement which has already been done by Moveit2.
I would like to encourage the creation of much simpler repos for each product of yours which developers can simply download, feed to MoveitConfigsBuilder
and control via their preferred standard Moveit API.
Hi @gaspatxo, thanks for your feedback. We started the development of ros2 support early, and by that time, there is no MoveitConfigsBuilder
available and we could not foresee the way it interprets the package, which requires naming convention. We did the naming change to make the structure less redundant. After starting the launch files according to the ReadMe file, our package will still work in ROS2 eco-system with other ros2 enabled devices.
However, I agree with your point here. We will do some more thoughts to see if there is a better way to support MoveitConfigsBuilder
and robot-agnostic development.
Just for completion. If you want to use your UFactory robot with the standard moveit API, here is a way to do it (mind that this is for humble, it probably works with any other ros2 branch but I do not guarantee it):
_robot_planner.launch.py
to the launch
directory in your packageros2 launch
command). In case of doubt you can check files such as uf850_planner_fake.launch.py
xarm_gripper_planner_node
launcher: if add_gripper.perform(context) in ('True', 'true') and use_gripper_node.perform(context) in ('True', 'true'):
xarm_gripper_planner_node = Node(
name=node_name,
package='xarm_planner',
executable='xarm_gripper_planner_node',
output='screen',
parameters=[
robot_description_parameters,
{'PLANNING_GROUP': 'xarm_gripper'},
],
)
nodes.append(xarm_gripper_planner_node)
xarm_planner_node
parameters to launch your executable:line 32:
node_executable = LaunchConfiguration('node_executable', default='<YOUR_EXECUTABLE>')
line 120:
xarm_planner_node = Node(
name=node_name,
package='<YOUR_PACKAGE>',
executable=node_executable,
output='screen',
parameters=[
robot_description_parameters,
{
'robot_type': robot_type,
'dof': dof
},
xarm_planner_parameters,
],
)
Hi @gaspatxo, we have developed a customized version of MoveitConfigsBuilder, which has similar interface with the official one and some additional arguments to adapt to our package. Please refer to the instruction here and see if this can better help your application.
Hi, we found a way to get this, we are basically using the same launch file as in
xarm_planner
->_robot_planner.launch.py
to launch our node. Whilst we setup the rviz simulation withros2 launch xarm_moveit_config _robot_moveit_fake.launch.py no_gui_ctrl:=true
.With this then we can use
moveit_group
in our node without a problem.I understand that this issues is related to the lack of compatibility with MoveItConfigsBuilder
Still, we are left in doubt on wether this is the best or meant way to do things. Any help or advice would be appreciated.
Hey i had encountered the same problem, i am trying to use c++ binding, hello_moveit.cpp on uf850, can you guide me through the solution? thanks
Hi, we are on the process of developing a ros package that is meant to be usable with any moveit2 enabled robot arm. As hardware we have an xArm7 and would like to both interact with simulations and the real hardware using moveit's standard interface.
Our current goal is to simply to push a goal pose using Moveit's Move group script.
The current node we are trying to run is the following:
The first thing we tried was launching the
xarm_moveit_config
package withAnd then running the node with
ros2 run <our npackage> <our_node>
. This would not work because the xarm package does not publish/robot_description_semantic
which contains the.srdf
file. We see that currentlyxarm_ros2
passes that as a parameter during the launch process.Then, after reading a bit about launching Moveit Configuration. We using the following
.launch.py
file:However,
MoveItConfigsBuilder
is unable to interpret thexarm_moveit_config
package.In look for alternatives, we then tried using
moveit_setup_assistant
, feeding it the.urdf
generated and published in/robot_description
. Which would lead to the computer freezing and needing a reboot in order to get it back to work.In short, we would like to use xarm7 both in sim and in real life by means of the cpp moveit
move_group
interface and we do not know how. We are not experienced with moveit and would really appreciate your help. Thank you.