robot in Rviz cannot move and dropping the first 1 trajectory point
Hi all! I'm now following the book Mastering ROS for Robotics Programming and build my robot in rviz and gazebo. I wrote the launch file to bring up both rviz and gazebo but some problems appeared. The first one is that after the rviz started, I give the robot a new position and click the plan and execute.it can plan successfully but cannot execute in other words, the robot in rviz cannot move to the goal position. Meanwhile in the terminal there is also a warning [ WARN] [1509967616.528903811, 3368.707000000]: Dropping first 1 trajectory point(s) out of 13, as they occur before the current time.
First valid point will be reached in 0.459s.
I guess that the warning is asociated with the first problem. I have searched the similar problem but I still cannot slove the problem. Could some one give me some suggestion?
here is the launch file bringup.lunch which launch the rviz and gazebo together.when click the plan and execute,the robot can move correctly in gazebo but do not move in rviz.
<launch>
<!-- Launch Gazebo -->
<include file="$(find jaka_ur_description_pkg)/launch/gazebo.launch" />
<!-- ros_control seven dof arm launch file -->
<include file="$(find jaka_ur_description_pkg)/launch/jaka_ur_gazebo_joint_states.launch" />
<!-- ros_control position control dof arm launch file -->
<!--<include file="$(find jaka_ur_description_pkg)/launch/jaka_ur_gazebo_position.launch" /> -->
<!-- ros_control trajectory control dof arm launch file -->
<include file="$(find jaka_ur_description_pkg)/launch/jaka_ur_trajectory_controller.launch" />
<include file="$(find jaka_ur_moveit_config2)/launch/moveit_planning_execution.launch" />
</launch>
and the related config file trajectory_control.yaml file
jaka_ur:
jaka_joint_controller:
type: "position_controllers/JointTrajectoryController"
joints:
- joint_1
- joint_2
- joint_3
- joint_4
- joint_5
- joint_6
gains:
joint_1: {p: 1000.0, i: 0.0, d: 0.1, i_clamp: 0.0}
joint_2: {p: 1000.0, i: 0.0, d: 0.1, i_clamp: 0.0}
joint_3: {p: 1000.0, i: 0.0, d: 0.1, i_clamp: 0.0}
joint_4: {p: 1000.0, i: 0.0, d: 0.1, i_clamp: 0.0}
joint_5: {p: 1000.0, i: 0.0, d: 0.1, i_clamp: 0.0}
joint_6: {p: 1000.0, i: 0.0, d: 0.1, i_clamp: 0.0}
It's very difficult to debug this problem if you don't show us some code. The error message tells us nothing because we're not familiar with your code. How do you make your robot move? Do you publish some message on topic? Do you have gazebo plugin for simulating this behavior in your model?
sorry. Now i put the launch file and the config fiel I guess that could have some problem.If you think that is not enough I will put others.
Can you reformat your launch file? It's very hard to read it this way.
Sorry about that.
I have found the problem.It was a problem in the package ros-controls/ros_controllers. joint_trajectory_controller - Always dropping first trajectory point #291 gave the solution.I tried and it worked!