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

[WIP][MyCobot] add eus model for mycobot #1421

Open
wants to merge 10 commits into
base: master
Choose a base branch
from

Conversation

tongtybj
Copy link

@tongtybj tongtybj commented Dec 18, 2021

Add directory jsk_mycobot_robot to enable control MyCobot from eus
For more details. Please check https://github.com/tongtybj/jsk_robot/tree/PR/mycobot/eus/jsk_mycobot_robot.

Features

  • implement eus model to control mycobot
  • enable joint trajectory control for both simulation and real arm.
mycoboteus_gazebo.mp4

TODO

  • add gripper model and controller. Currently only support 6-DoF arm without girpper.
  • support multiple mycobot series (280, 320, 600). Currently only support type 280. Check jsk_kinova_robot
  • support moveit based joint trajectory following. The original mycobot repository has been able to support moveit: Support Moveit for real arm elephantrobotics/mycobot_ros#48

Copy link
Member

@k-okada k-okada left a comment

Choose a reason for hiding this comment

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

@tongtybj great! please remove mycobot.l from PR, because this should be genreated on compile time.

jsk_mycobot_robot/README.md Outdated Show resolved Hide resolved
jsk_mycobot_robot/jsk_mycobot_startup/package.xml Outdated Show resolved Hide resolved
jsk_mycobot_robot/mycobot.rosinstall Show resolved Hide resolved
jsk_mycobot_robot/mycoboteus/package.xml Outdated Show resolved Hide resolved
@k-okada
Copy link
Member

k-okada commented Dec 20, 2021

@tongtybj
something wrong with your code
https://github.com/jsk-ros-pkg/jsk_robot/runs/4578667504?check_suite_focus=true

 Skipping "catkin_tools_prebuild/package.xml": the root tag is neither 'testsuite' nor 'testsuites'
  Full test results for 'jsk_mycobot_startup/test_results/jsk_mycobot_startup/MISSING-roslaunch-check__github_home_ros_ws_jsk_robot_src_jsk_robot_jsk_mycobot_robot_jsk_mycobot_startup_launch_mycobot_bringup.launch.xml'
  -------------------------------------------------
  <?xml version="1.0" encoding="UTF-8"?>
  <testsuite tests="1" failures="1" time="1" errors="0" name="roslaunch-check__github_home_ros_ws_jsk_robot_src_jsk_robot_jsk_mycobot_robot_jsk_mycobot_startup_launch_mycobot_bringup.launch.xml">
    <testcase name="test_ran" status="run" time="1" classname="Results">
      <failure message="Unable to find test results for roslaunch-check__github_home_ros_ws_jsk_robot_src_jsk_robot_jsk_mycobot_robot_jsk_mycobot_startup_launch_mycobot_bringup.launch.xml, test did not run.
  Expected results in /github/home/ros/ws_jsk_robot/build/jsk_mycobot_startup/test_results/jsk_mycobot_startup/roslaunch-check__github_home_ros_ws_jsk_robot_src_jsk_robot_jsk_mycobot_robot_jsk_mycobot_startup_launch_mycobot_bringup.launch.xml" type=""/>
    </testcase>
  </testsuite>

@tongtybj
Copy link
Author

tongtybj commented Dec 20, 2021

@k-okada

It seems like the following rosnode can be found

<include file="$(find mycobot_communication)/launch/mycobot_interface.launch" >
<arg name="port" value="$(arg port)" />
<arg name="baud" value="$(arg baud)" />
</include>

Because mycobot_communication can not be installed by rosdep:
https://github.com/jsk-ros-pkg/jsk_robot/runs/4581278378?check_suite_focus=true#step:6:2493

Should I add MyCobot repository to https://github.com/jsk-ros-pkg/jsk_robot/blob/master/.travis.rosinstall.kinetic, or just ignore the check on mycobot_bringup.launch?

@k-okada
Copy link
Member

k-okada commented Dec 21, 2021

Add MyCobot repository to https://github.com/jsk-ros-pkg/jsk_robot/blob/master/.travis.rosinstall.kinetic or skip them

if($ENV{ROS_DISTRO} STREQUAL "hydro")
message(STATUS "fetch is not supported on hydro")
find_package(catkin)
catkin_package()
return()
endif()

Copy link

@haraduka haraduka left a comment

Choose a reason for hiding this comment

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

When I tried this program, I noticed three problems.

  • When I use (send ri :angle-vector (send robot :angle-vector) 3000), the robot always moves at the fastest speed.
  • The x-axis of the robot's TF coordinates are not aligned, is it OK ?
  • Sometimes (about once every 100 seconds), /joint_states can have a big noise (is this just for me ? probably it is not the issue of this program.)

@tongtybj
Copy link
Author

@haraduka

Thank you for your trial and comments!

@k-okada
Copy link
Member

k-okada commented Dec 27, 2021

@haraduka please follow https://github.com/jsk-ros-pkg/jsk_robot/pull/1421/files/bfc11cdd2a3b235d3a0a2056d205b70f1aa23c26#diff-5fa554345354cd75602f95bb2b342daf2465bc658512250d4fc6a987bb646638R24 to setup your workspace.

Is there a rule that must align all x axes of links?

No. URDF can did not have such rules and we wrote conversion program (urdf <-> collada <-> eus) to support arbitrary definitions. @haraduka if there is any reason that you wan to align all X axis of links, please describe that situation.
I believe knorth55 is super busy on thesis and have no time to follow this conversation.

@haraduka
Copy link

@tongtybj thank you !, most of the problems have been solved.
@k-okada I'm not sure about the problem, but I thought almost all robots like PR2 and Fetch had aligned coordinates.
If there is no problem, it is OK for me.

@tongtybj
Copy link
Author

tongtybj commented Dec 28, 2021

Enable moveit-based joint trajectory planning with eus IK result.
Please follow https://github.com/jsk-ros-pkg/jsk_robot/blob/77f8e6018a6dffb0fb185ae8119887153bd16eac/jsk_mycobot_robot/README.md#try-with-moveit

sample:

rostest mycoboteus test-mycobot-eus-moveit.test

@tongtybj
Copy link
Author

tongtybj commented Jan 3, 2022

I add grasp control action in eus model (GripperCommand) and confirm that it works with the real arm. Please check a09a37b.
Also please update elephantrobotics/mycobot_ros#48 to the latest version (e.g. wstool update)

However, mycobot repository does not provide the urdf file for gripper, so currently the gripper part is not visualized and thus grasping function is not available in gazebo.

Of course I can create a simple gripper model for visualizing totally from scratch. But I am not sure whether this job is necessary...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants