AndrejOrsula / panda_ign_moveit2

Franka Emika Panda packages for manipulation with MoveIt 2 inside Ignition Gazebo
https://app.ignitionrobotics.org/AndrejOrsula/fuel/models/panda
BSD 3-Clause "New" or "Revised" License
65 stars 23 forks source link

how to open/close the gripper when the arm is moving #31

Open cncowboy opened 5 months ago

cncowboy commented 5 months ago

i test throwing object in project ign_moveit2_examples, but can not open/close gripper when arm is moving! is there any method to open/close the gripper when the arm is moving ? thanks for reply

AndrejOrsula commented 5 months ago

Hello. Have you tried the approach used in the example and adjusted the delay between initiating the motion and opening/closing the gripper?

Also, this repository does not provide any control interface - it is just a config for a specific robot. You probably want to consult ROS control or MoveIt documentation.

cncowboy commented 5 months ago

your projects is great! thanks! i runed the throw object example, it did not work exactly as the video in ign_moveit2_examples's readme, the gripper will open just after the arm reach the postion and stop for a while, even though i comment the code blow:

    # Throw itself
    joint_configuration_throw = [0.0, -0.15, 0.0, -1.1, 0.0, 1.9, 0.8]
    self._moveit2.move_to_configuration(joint_configuration_throw)

    # Release object while executing motion
    #sleep_duration_s = 1.2
    #if rclpy.ok():
    #    self.create_rate(1 / sleep_duration_s).sleep()
    self._moveit2_gripper.open()
    self._moveit2_gripper.wait_until_executed()

    self._moveit2.wait_until_executed()

besides, the gripper can only catch the throw object one time after i try many times. in my envirement, the branch of panda_ign_moveit2 is master, ros version is humble,

AndrejOrsula commented 5 months ago

What ROS/MoveIt distribution do you use?

cncowboy commented 5 months ago

in my envirement, the branch of panda_ign_moveit2 is master, ros version is humble, moveit2 version is 2.5.5, gazebo version is 11.10

AndrejOrsula commented 5 months ago

This repository is not made for Gazebo Classic (11.0 and older).

It was developed for the new iteration of Gazebo, which used to be called Ignition. Such as Gazebo Fortress or Garden.

cncowboy commented 5 months ago

Thank you for your patient guidance i reinstall gazebo to version Ignition-fortress, but the problem is not resolved

i recorded a video:

https://github.com/AndrejOrsula/panda_ign_moveit2/assets/187536/632120be-a616-4a63-9ed2-0a3b43e4cf9a

AndrejOrsula commented 5 months ago

Hmm, I am not sure why that would be the case. I just tried the same example in the prebuilt Docker image, and the gripper is opened while the robot is still in motion.

It might be that some dependency update from galactic to humble results in this behaviour. However, I am unable to investigate that :confused:

cncowboy commented 5 months ago

thanks very much! i'll try again in prebuild docker image!

cncowboy commented 5 months ago

could you upload your prebuild docker image to hub.docke.com,

AndrejOrsula commented 5 months ago

It is already there @cncowboy.

Pull the image (optional, happens automatically while running it):

docker pull andrejorsula/ign_moveit2_examples

Convenience script for running the container with NVIDIA GPU and X11 GUI (look through the script before running it):

IMAGE_NAME=andrejorsula/ign_moveit2_examples bash -c "$(wget -qO - https://gist.githubusercontent.com/AndrejOrsula/fd3971c5f26c0cc19bc9763b13142965/raw/4fa7563656829c43aaa3ad0dafc8a4cf8d609936/run.bash)"

Then you can launch the example inside the container:

ros2 launch ign_moveit2_examples ex_py_throw_object.launch.py
cncowboy commented 5 months ago

sorry for reply lately, because I took a few days off。 i test with docker image: andrejorsula/ign_moveit2_examples, i changed gazebo render engine to ogre because ogre2 can not render anything. then the gazebo's rendering is very slow, and the gripper throw object can not shoot success every time!

https://github.com/AndrejOrsula/panda_ign_moveit2/assets/187536/7258a01f-85d7-4944-b511-98d77e572f62

AndrejOrsula commented 4 months ago

... I changed gazebo render engine to ogre because ogre2 can not render anything ... then the gazebo's rendering is very slow ...

I tested everything only with an NVIDIA GPU. If you have other hardware, you might need to figure out the support yourself.

the gripper throw object can not shoot success every time!

There is some stochasticity in the simulation and how the example is implemented, so it is not expected to succeed every time.

cncowboy commented 4 months ago

yes, i also test with nvidia-gpu nvidia