0
$\begingroup$

Rosanswers logo

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.


Originally posted by ram on ROS Answers with karma: 9 on 2011-06-08

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

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.


Originally posted by Martin Günther with karma: 11816 on 2011-06-08

This answer was ACCEPTED on the original site

Post score: 2


Original comments

Comment by tfoote on 2011-06-09:
@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.

Comment by ram on 2011-06-08:
Thank you Martin, I am new to ROS. Will edit accordingly,i dont know why (around ><="" node="">) keeps appearing again and again when i post the question.Actual xml file is (>) 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 ?

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.