ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

Robot Model does not follow TF frames in RViz

asked 2020-11-15 21:28:47 -0500

anirban gravatar image

updated 2020-11-16 06:58:47 -0500

I want to visualize the UR5 robot model in RViz. For that, I am using the following launch file,

<launch>
  <arg name="limited" default="false" doc="If true, limits joint range [-PI, PI] on all joints." />
  <arg name="gui" default="true" />

  <param unless="$(arg limited)" name="robot_description" command="$(find xacro)/xacro --inorder '$(find ur5_description)/urdf/ur5_robot.urdf.xacro' " />  
  <node if="$(arg gui)" name="joint_state_publisher" pkg="joint_state_publisher_gui" type="joint_state_publisher_gui" />
  <node unless="$(arg gui)" name="joint_state_publisher" pkg="joint_state_publisher" type="joint_state_publisher" />
  <node name="robot_state_publisher" pkg="robot_state_publisher" type="robot_state_publisher" />
</launch>

Then I ran the RViz node in another terminal and found that the TF frames are plotted correctly as per the joint angles provided in the joint_state node's GUI window but the robot model is fixed at the neutral (wrong) pose. The screenshot of the situation is given below. Any help to resolve the problem will be appreciated.

image description

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2020-11-16 10:20:09 -0500

anirban gravatar image

I figured out the reason why robot model was not following the TF frames. The reason was that I had been using Robot_State from moveit_ros_visualization instead of RobotModel offered by rviz. Changing the robot model display method as stated, resolved the problem.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2020-11-15 21:28:47 -0500

Seen: 453 times

Last updated: Nov 16 '20