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

query on joint_state_publisher

asked 2011-06-08 19:29:41 -0600

ram gravatar image

updated 2011-06-09 10:24:12 -0600

mmwise gravatar image

how to add values for joints for visualizing the motion of a robothead in rviz without using gui.this is the launch file

<launch> <arg name="model"/> 
<arg name="gui" default="False"/> 
<param name="robot_description" command="$(find xacro)/xacro.py $(arg model)"/> 
<param name="use_gui" value="$(arg gui)"/> 
<node name="joint_state_publisher" pkg="joint_state_publisher" type="joint_state_publisher" ></node> 
<node name="robot_state_publisher" pkg="robot_state_publisher" type="state_publisher"/> <node name="rviz" pkg="rviz" type="rviz" args="-d $(find urdf_tutorial)/urdf.vcg"/> 
</launch>

thanks.

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
2

answered 2011-06-08 21:42:44 -0600

First of all, your launch file is not valid XML (around &gt;<="" node="">). Second, you can improve readability by indenting every line by four spaces (this will display your launch file as a code block; you can also edit your question to that effect).

Now to answer your question: If I understand you correctly, you want to write some code that moves the robot head in RViz, instead of using the joint_state_publisher GUI. That's actually very easy; all you have to do is write a node that publishes JointState messages. This tutorial will show you how.

edit flag offensive delete link more

Comments

Thank you Martin, I am new to ROS. Will edit accordingly,i dont know why (around &gt;<="" node="">) keeps appearing again and again when i post the question.Actual xml file is (></node>) anyway thank you.I will try the tutorial,but i have to use a long set of values(rpy,xyz) to enter for the motion of the head. can i use http://www.ros.org/wiki/motion_planning_rviz_plugin/Tutorials/DisplayingRobotTrajectoriesInRviz ?
ram gravatar image ram  ( 2011-06-08 22:09:34 -0600 )edit
@ram that should work. Please try not to ask followup questions in comments, they're hard for others to find. Also when you get an answer which is adaquate for you, please mark it as correct using the checkmark on the left.
tfoote gravatar image tfoote  ( 2011-06-09 15:24:01 -0600 )edit

Question Tools

Stats

Asked: 2011-06-08 19:29:41 -0600

Seen: 1,119 times

Last updated: Jun 09 '11