Problem using MoveIt API

29 views
Skip to first unread message

pulkit singh tak

unread,
Mar 6, 2017, 1:06:13 AM3/6/17
to ros-by-example
Hi all 
 I am using ROS Indigo with UBUNTU Trusty and using MoveIt to manipulate the robotic arm. I am using Python API for making the robot follow Inverse Kinematics. The problem is after getting to a pose, when I try to shift or rotate the final pose, the robot goes to the home state and from there it moves and not from the previous position. I am using the remapping of joint_states to /my_bot_joint_states in move_group node. Can Someone guide me what is happening here ???


Thanks

Patrick Goebel

unread,
Mar 7, 2017, 8:58:11 AM3/7/17
to ros-by-...@googlegroups.com
Hi Pulkit,

Can you send us the snippet of code where you execute the second-to-last
movement and then the rotation?

Thanks,

patrick

--
The Pi Robot Project
http://www.pirobot.org/wordpress
> --


pulkit singh tak

unread,
Mar 7, 2017, 11:43:33 PM3/7/17
to ros-by-example
Hi here is my script file . Plz find it in the attachment
move_ik.py

Patrick Goebel

unread,
Mar 10, 2017, 9:25:24 AM3/10/17
to ros-by-...@googlegroups.com

Hello,

It looks like your script is based on the sample moveit_ik_demo.py script described in Chapter 11.20 of ROS By Example Volume 2.  I tested your script using the simulated Pi Robot arm after changing the target pose to be a valid pose for Pi Robot and the script works fine.  So unfortunately I don't have an answer for you.  Perhaps try posting your question to the MoveIt users group and be sure to include your launch file as well.

--patrick

pulkit singh tak

unread,
Mar 16, 2017, 12:48:44 AM3/16/17
to ros-by-example
Thanks for the reply, But the problem is when running with fake_controllers (as in demo.launch), it is able to perform the specified action but when simulating with ros_control, it is not.  Can someone suggest why this is happening ??

Patrick Goebel

unread,
Mar 18, 2017, 9:28:06 AM3/18/17
to ros-by-...@googlegroups.com

HI Pulkit,

I'm not sure what you mean when you say "when simulating with ros_control".  Can you please provide more details?

Thanks,

patrick

-- 
The Pi Robot Project
http://www.pirobot.org/wordpress

pulkit singh tak

unread,
Mar 20, 2017, 1:32:19 AM3/20/17
to ros-by-example
Hi

Regarding the simulation part, I meant that I was running the code in gazebo simulation (version:2.2.6), i was not using the real hardware, just to make sure the robot is moving as expected. But while using the Python API of MoveIt, the robot always try to execute the next command from the "home" position" and not from the previous position.

Hemang Chawla

unread,
Mar 21, 2017, 4:56:18 AM3/21/17
to ros-by-example

Hi Pulkit,

You need to update the /joint_states of the robot. If Moveit just generates the plan and you execute it in gazebo. Then moveit doesn't know if the robot has moved, i.e joint states have been updated. And it would plan from the home position.

In your script you need to either publish the updated joint states from gazebo. Or if you are already doing that you need to add the command to python version of setStartStateToCurrentState() after executing the first motion. 

Hope this helps.

pulkit singh tak

unread,
Apr 11, 2017, 5:14:55 AM4/11/17
to ros-by-example
Hi all
Sorry for the late reply.
The problem is actually solved. I used MoveIt C++ API instead of Python API, Howewer as I am still a beginner, I have not been able to find the difference between the implementation of the two.
Reply all
Reply to author
Forward
0 new messages