GithubHelp home page GithubHelp logo

Comments (5)

Shawnnn avatar Shawnnn commented on July 24, 2024

I am wondering how I can make my own fk&ik code + moveit + gazebo work together?

from mastering_ros.

qboticslabs avatar qboticslabs commented on July 24, 2024

Hi @Shawnnn

Here is the answer to your first question.

If there is no plan available from home position, you may need the initial position. Or you can change the home position by re-running move it wizard.

  1. For integrating your IK solution to MoveIt, you have to write an IK Solver for MoveIt!.

Here is one of the tutorial to do it

Tutorial

from mastering_ros.

Shawnnn avatar Shawnnn commented on July 24, 2024

I m sorry, what I meant by using my own forward and Inverse kinematics code is that I just write a simple code to call moveit_commander python-moveit interface in order to move the manipulator, some functions like MoveGroupCommander(), plan(), execute() and so on.

I run my code along with demo.launch, the manipulator with fake joint controller seems work well, the motions are consistent from beginning to end. I think it means the whole motion plan is available, right?

However, when the code comes with moveit+ros_control+gazebo from CH4 (where all the configurations are well prepared, right?)
roslaunch seven_dof_arm_gazebo seven_dof_arm_bringup_moveit.launch
The manipulator is stuck in the first motion, which means it remains still after first move in gazebo, and the manipulator keeps planning and failing in moveit, however it plans from home position(not from the first move state) and the virtual planned path (shown in riviz)is absolutely not expected in my code.

fail_to_plan

Here is the part of error info

[ INFO] [1493476483.963476978, 563.672000000]: Computed Cartesian path with 19 points (followed 30.158730% of requested trajectory)
[ INFO] [1493476484.067674827, 563.767000000]: Received request to compute Cartesian path
[ INFO] [1493476484.068117741, 563.768000000]: Attempting to follow 6 waypoints for link 'grasping_frame' using a step of 0.010000 m and jump threshold 0.000000 (in global reference frame)
[ INFO] [1493476484.132098486, 563.819000000]: Computed Cartesian path with 19 points (followed 30.158730% of requested trajectory)
[ INFO] [1493476484.236936832, 563.912000000]: Combined planning and execution request received for MoveGroup action. Forwarding to planning and execution pipeline.
[ INFO] [1493476484.237124585, 563.912000000]: Planning attempt 1 of at most 5
[ INFO] [1493476484.239766430, 563.912000000]: LBKPIECE1: Starting planning with 1 states already in datastructure
[ERROR] [1493476489.246474809, 568.526000000]: LBKPIECE1: Unable to sample any valid states for goal tree
[ INFO] [1493476489.246512559, 568.526000000]: LBKPIECE1: Created 1 (1 start + 0 goal) states in 1 cells (1 start (1 on boundary) + 0 goal (0 on boundary))
[ INFO] [1493476489.246538693, 568.526000000]: No solution found after 5.007101 seconds
[ INFO] [1493476489.261827040, 568.539000000]: Unable to solve the planning problem
[ INFO] [1493476489.261889371, 568.539000000]: Planning attempt 2 of at most 5
[ INFO] [1493476489.295049119, 568.570000000]: LBKPIECE1: Starting planning with 1 states already in datastructure
[ERROR] [1493476494.302376820, 573.241000000]: LBKPIECE1: Unable to sample any valid states for goal tree
[ INFO] [1493476494.302415538, 573.241000000]: LBKPIECE1: Created 1 (1 start + 0 goal) states in 1 cells (1 start (1 on boundary) + 0 goal (0 on boundary))
[ INFO] [1493476494.302440671, 573.241000000]: No solution found after 5.007716 seconds
[ INFO] [1493476494.505855745, 573.436000000]: Unable to solve the planning problem
[ INFO] [1493476494.505909981, 573.436000000]: Planning attempt 3 of at most 5
[ INFO] [1493476494.507200175, 573.436000000]: LBKPIECE1: Starting planning with 1 states already in datastructure
[ERROR] [1493476499.515737723, 578.158000000]: LBKPIECE1: Unable to sample any valid states for goal tree
[ INFO] [1493476499.515779339, 578.158000000]: LBKPIECE1: Created 1 (1 start + 0 goal) states in 1 cells (1 start (1 on boundary) + 0 goal (0 on boundary))
[ INFO] [1493476499.515801455, 578.158000000]: No solution found after 5.008862 seconds
[ INFO] [1493476499.641944337, 578.277000000]: Unable to solve the planning problem
[ INFO] [1493476499.642046851, 578.277000000]: Planning attempt 4 of at most 5
[ INFO] [1493476499.667544061, 578.295000000]: LBKPIECE1: Starting planning with 1 states already in datastructure
[ERROR] [1493476504.672025596, 583.042000000]: LBKPIECE1: Unable to sample any valid states for goal tree
[ INFO] [1493476504.672075199, 583.042000000]: LBKPIECE1: Created 1 (1 start + 0 goal) states in 1 cells (1 start (1 on boundary) + 0 goal (0 on boundary))
[ INFO] [1493476504.672101042, 583.042000000]: No solution found after 5.004768 seconds
[ INFO] [1493476504.798828021, 583.165000000]: Unable to solve the planning problem
[ INFO] [1493476504.798886977, 583.165000000]: Planning attempt 5 of at most 5
[ INFO] [1493476504.802755914, 583.169000000]: LBKPIECE1: Starting planning with 1 states already in datastructure


If I only run demo.launch + my code, it can do the whole motion
planning_in_demo_mode
plan_in_demo_mode2
plan_in_demo_mode3

Here is the successful info when running in demo mode with fake controllers
plan_in_demo_mode_success_info

from mastering_ros.

qboticslabs avatar qboticslabs commented on July 24, 2024

Hi @Shawnnn

I think while sending trajectory to Gazebo, there may be collision occur in BW arm joints. If there is a collision, Gazebo controller will stop I think. In Fake execution, it will be ok. So in effect, the Arm in Gazebo will not reach the goal position.

What you can do is, if the arm is not reaching the goal position within some time, pre-empt it and try the next goal point.

Regards
Lentin Joseph

from mastering_ros.

Shawnnn avatar Shawnnn commented on July 24, 2024

What do you mean by BW arm joints?

In my case, arm in gazebo stop at first movement( the first movement is forward kinematics), it is corresponding to what you say, Gazebo controllers stop.

But how to explain the unusual phenomenon in MoveIt?
In the first figure, the arm stays still at that position(the first movement) in Gazebo, while in moveit, do you notice that transparent arm model? The transparent arm keeps reciprocating (while planning) from home position to that transparent pose, back and forth until planning attempt ends.

from mastering_ros.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.