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

Revision history [back]

If you have any movable joints these need to be published. There is a package called joint_state_publisher which you can use (not part of the ROS install).

http://www.ros.org/wiki/joint_state_publisher

Build that package, then create a launch file similar to the following:

<launch> <arg name="gui" default="False"/> <node name="joint_state_publisher" pkg="joint_state_publisher" type="joint_state_publisher" &gt;<="" node=""> <node name="robot_state_publisher" pkg="robot_state_publisher" type="state_publisher"/> <node name="rviz" pkg="rviz" type="rviz"/> </launch>

You can then launch as follows:

roslaunch myrobot.launch gui:=true

If you're not using joint_state_publisher then you will need to publish the movable joint states using sensor_msgs:JointState. One mistake I made with this is that all joint positions should be published at the same time by adding them to the JointState object. If you try to publish them separately then problems similar to the above can occur.

If you have any movable joints these need to be published. There is a package called joint_state_publisher which you can use (not part of the ROS install).

http://www.ros.org/wiki/joint_state_publisher

Build that package, then create a launch file similar to the following:

 <launch>
    <param name="robot_description" textfile="myrobot.urdf" />
   <arg name="gui" default="False"/>
default="False" />
  <param name="use_gui" value="$(arg gui)"/>
   <node name="joint_state_publisher" pkg="joint_state_publisher" type="joint_state_publisher" &gt;<="" node="">
></node>
   <node name="robot_state_publisher" pkg="robot_state_publisher" type="state_publisher"/>
type="state_publisher" />
   <node name="rviz" pkg="rviz" type="rviz"/>
type="rviz" />
 </launch>

</launch>

You can then launch as follows:

roslaunch myrobot.launch gui:=true

If you're not using joint_state_publisher then you will need to publish the movable joint states using sensor_msgs:JointState. One mistake I made with this is that all joint positions should be published at the same time by adding them to the JointState object. If you try to publish them separately then problems similar to the above can occur.

If you have any movable joints these need to be published. There is a package called joint_state_publisher which you can use (not part of the ROS install).

http://www.ros.org/wiki/joint_state_publisher

Build that package, then create a launch file similar to the following:

 <launch>
   <param name="robot_description" textfile="myrobot.urdf" />
   <arg name="gui" default="False" />
   <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" />
 </launch>

You can then launch as follows:

roslaunch myrobot.launch gui:=true

gui:=true

If you're not using joint_state_publisher then you will need to publish the movable joint states using sensor_msgs:JointState. One mistake I made with this is that all joint positions should be published at the same time by adding them to the JointState object. If you try to publish them separately then problems similar to the above can occur.