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

Question of move_to_joint.py in Motoman_driver #294

Closed
Gloriabhsfer opened this issue Sep 25, 2019 · 3 comments
Closed

Question of move_to_joint.py in Motoman_driver #294

Gloriabhsfer opened this issue Sep 25, 2019 · 3 comments

Comments

@Gloriabhsfer
Copy link

Hi all,

I am planning to set groups of waypoints for my Motoman GP8 robot (YRC1000 Mirco with smart pendant). And I just start look at the python file.
In that python code, what you get is form a rosbag

def get_pos_from_bag(bag_file, topic_name):
with rosbag.Bag(bag_file) as bag:
msgs = list(bag.read_messages(topic_name))
if len(msgs) <> 1:
rospy.logwarn("Multiple trajectories found. Exporting first trajectory only")
traj = msgs[0][1]
return JointState(name=traj.joint_names, position=traj.points[0].positions)

And I have read the rosbag tutorial about how to record a rosbag.http://wiki.ros.org/rosbag/Tutorials/Recording%20and%20playing%20back%20data
But in this code, you set waypoint when you run the python script, and you didn't generate or save the joint in a rosbag file. Cause what I want to do is set a group of waypoint and let the robot following these points. In my understanding, I need to set the directory with where you set the rosbag and run the waypoint in rosbag step by step. But I am not sure it's right or not.
Please correct me if my understanding is wrong.

Thanks,
Gloria

@gavanderhoorn
Copy link
Member

gavanderhoorn commented Sep 25, 2019

I would refer you to #229. That links to my work where I've a skeleton of an action server client that is probably what you are looking for.

The rosbag approach in moveit_to_joint is a nice idea, but may not be the most user friendly at this point.

I would also recommend you take a look at some motion planning frameworks, such as MoveIt, Descartes, MoveIt's MTC or even Tesseract/TrajOpt.

If you're only interested in hard-coding joint trajectory points, I would suggest generating an INFORM job and pushing that to the controller in some way. Using (Moto)ROS for hard-coded trajectories is not something I would think the most efficient.

It is possible though.

@gavanderhoorn
Copy link
Member

As I've noted in #229 (comment), that script was not tested too much, so you may run into some minor issues.

I see now that I've not actually (deep) cloned the trajectory pts, so no motion may result (or only a single motion, instead of three).

The approach shown would still be valid though.

@Gloriabhsfer
Copy link
Author

Thanks for your reply, the code in #229 seems works. Yes, I agree we can use some motion planning framework and we are now using MoveIt. But the connection has some issue and it seems we didn't set the controller right. So we need to read more about how to set the MoveIt controller.
Now we want first do a demo pick and place task so we want to hard coding it into a python file.
I will close the issue and reply under it if we make any progress.
Best,
Gloria

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

No branches or pull requests

2 participants