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

ccm's profile - activity

2020-07-01 05:10:32 -0500 received badge  Guru (source)
2020-07-01 05:10:32 -0500 received badge  Great Answer (source)
2016-09-18 14:42:18 -0500 received badge  Famous Question (source)
2016-05-19 10:36:19 -0500 received badge  Good Question (source)
2016-05-16 09:08:10 -0500 received badge  Nice Question (source)
2016-05-16 09:08:08 -0500 received badge  Good Answer (source)
2016-05-16 09:08:08 -0500 received badge  Enlightened (source)
2015-08-31 21:15:31 -0500 marked best answer revolute joint not working in gazebo

I'm trying to simulate a door in gazebo but the revolute joint does not seem to work. Could someone take a look at my urdf file and see what might be possibly wrong with it

<robot name="door2">
  <link name="wall">
    <inertial>
      <origin xyz="0 0 1.2" /> 
      <mass value="100.0" />
      <inertia  ixx="1.0" ixy="0"  ixz="0"  iyy="1.0"  iyz="0"  izz="1.0" />
    </inertial>
    <visual>
      <origin xyz="0 0 1.2"/>
      <geometry>
        <box size="0.2 2.4 2.4" />
      </geometry>
    </visual>
    <collision>
      <origin xyz="0 0 1.2"/>
      <geometry>
        <box size="0.2 2.4 2.4" />
      </geometry>
    </collision>
  </link>

  <link name="door">
    <inertial>
      <origin xyz="-0.1 0.6 0" /> 
      <mass value="1.0" />
      <inertia  ixx="1.0" ixy="0"  ixz="0"  iyy="1.0"  iyz="0"  izz="1.0" />
    </inertial>
    <visual>
      <origin xyz="-0.1 0.6 0"/>
      <geometry>
        <box size="0.2 1.2 2.4" />
      </geometry>
    </visual>
    <collision>
      <origin xyz="-0.1 0.6 0"/>
      <geometry>
        <box size="0.2 1.2 2.4" />
      </geometry>
    </collision>
  </link>

  <joint name="hinge" type="revolute">
    <limit upper="0" lower="-1.57" velocity="10" effort="1"/>
    <origin xyz="0.1 1.2 1.2"/>
    <axis xyz="0 0 1" />
    <parent link="wall"/>
    <child link="door"/>
  </joint>   

  <gazebo reference="wall">
    <material>Gazebo/Blue</material>
    <static>true</static>
  </gazebo>
</robot>

This is the link the video I took http://www.youtube.com/watch?v=iCwonqFniqA&feature=youtu.be

I'm running Fuerte, Ubuntu 12.04

Thank you

EDIT: I tried a second time but this time with an extra block to prevent the thing from toppling: http://www.youtube.com/watch?v=l3gPdSxkyCU&feature=youtu.be The door managed to open but with much difficulty, have to move pr2 very slowly. Does anyone know how to make the joint more smooth?

*my velocity and effort for the revolute joint was 1000 and 10000 respectively for the second video if that makes any difference

2015-08-26 11:11:21 -0500 received badge  Nice Question (source)
2015-07-01 14:27:22 -0500 received badge  Nice Answer (source)
2015-04-09 20:29:46 -0500 received badge  Nice Question (source)
2015-01-24 20:11:57 -0500 received badge  Famous Question (source)
2014-08-21 21:41:38 -0500 received badge  Notable Question (source)
2014-04-20 12:23:24 -0500 marked best answer adjusting speed of turtlebot

Hi, I'm wondering if there's any way to adjust the speed of turtlebot. It's moving too fast for my preference.

I'm using a logitech dual action game pad. I can move it perfectly fine when I press button 5 and the arrow keys, except that the speed is really fast and it gets jerky when I press and let go.

Is there any way to get the right joystick of the game pad to control turtlebot. It seems that the right joystick is able to vary its speed depending on how far you move it. Otherwise, I would be happy if someone could teach me at least how to reduce the maximum speed.

Thank you.

2014-04-20 12:23:14 -0500 marked best answer Turtlebot calibration(Still waiting for imu/scan)

When I type "roslaunch turtlebot_calibration calibrate.launch", the terminal shows

[INFO] [WallTime: 1308820084.864965] Estimating imu drift
[INFO] [WallTime: 1308820085.165909] Still waiting for imu
[INFO] [WallTime: 1308820085.466922] Still waiting for imu
[INFO] [WallTime: 1308820085.767989] Still waiting for imu

Eariler on, it showed

[INFO] [WallTime: 1308820084.864965] Estimating imu drift
[INFO] [WallTime: 1308820085.165909] Still waiting for scan
[INFO] [WallTime: 1308820085.466922] Still waiting for scan
[INFO] [WallTime: 1308820085.767989] Still waiting for scan

Does anybody know what these two messages might suggest? I can't understand the code.

Extra info:

-Using a bumblebee2 camera instead of a kinect

-I am using a MicroStrain 3DM-GX2 IMU for turtlebot, I changed the frame_id to gyro_link and the remapped the topic "imu/data" robot_pose_ekf subscribes to to "bumblebee2/bumblebee2/imu/data" so that the imu messages can reach robot_pose_ekf. Despite doing this, I'm not sure if the gyro is working properly as I still get "Bad Gyro Calibration" under diagnosis

Let me know if you require and extra information, I'm not too sure what is relevant. Thanks in advance!

2014-04-20 12:23:11 -0500 marked best answer How to solve TF_NAN_INPUT

Hi, I'm quite new to vslam and I was wondering if anyone who could help me with this problem. When I try to get live data using a bumblebee2 camera and rviz, the blue lines get all broken and scattered in weird places. like this: image description

I suspect the following error message below(it was reported in my rviz window) will show what is responsible for this, but I cannot interpret where the error is. Thanks for the help.

[ERROR] [1306481857.228246721]: TF_NAN_INPUT: Ignoring transform for child_frame_id "/visual_odom" from authority "/bumblebee2/stereo_vslam_node" because of a nan value in the transform (nan nan nan) (-nan nan nan -nan)
2014-04-20 12:23:09 -0500 marked best answer Using bumblebee camera for turtlebot

I'm trying to set up turtlebot but I'm using a bumblebee camera instead of a kinect. I was wondering if anyone has done this before and how to go about doing it.

So far what I have done is commenting out the kinect node in robot.launch and adding a bumblebee node in there which looks like this

  <!-- Bumblebee2 -->
  <node pkg="bumblebee2" type="bumblebee2" name="bumblebee2"
    output="screen" respawn="true">
    <param name="video_mode" value="FORMAT7_3" />
    <param name="fps" value="15" />
    <param name="gain" value="auto" />  
    <param name="brightness" value="auto" />
    <param name="whitebalance" value="auto" /> 
    <param name="shutter" value="auto" />   
    <param name="bayer_pattern" value="BGGR" /> 
    <param name="bayer_method" value="NONE" /> 
  </node>
  <env name="ROS_NAMESPACE" value="bumblebee2" />
  <node pkg="stereo_image_proc" type="stereo_image_proc" name="stereo_image_proc" />

When I start turtlebot, I will get a Bad Gyro Callibration under Sensors Error in Diagnostics from the turtlebot dashboard. Another anomaly I observed is that [kinect_breaker_enabler-8] process has finished cleanly in the terminal where I'm running robot.launch (Well, I did comment out the entire kinect node so this might happen but would this lead to any problems? and how do you solve it?) Logfile attached:kinect_breaker_enabler-8.log.jpg(change .jpg to .log after download, they won't let me upload log files)

I'm still quite new to this and I do not understand how openni is used in turtlebot(it seems to appear several times in the launch file, so I'm not sure if changing the camera would require me to reconfigure some things in openni)

I would be really grateful to anyone who could help me with this.

2014-04-20 12:23:07 -0500 marked best answer Unable to contact my own server

I'm in the midst of trying to set up turtlebot and I have encountered this problem.

When I type "roslaunch turtlebot_bringup robot.launch" on my laptop, the following message appears

Unable to contact my own server at [http://10.217.252.66:58698/].
This usually means that the network is not configured properly.

I tried pinging myself and it works. Any ideas what might be wrong? Thanks

2014-04-20 12:22:56 -0500 marked best answer OpenCV Error: Image step is wrong () in cvInitMatHeader

Hi,

Recently, whenever I enter the command "rosbag record -a" while trying to run vslam, my bumblebee camera will stop working and the following error comes up:

OpenCV Error: Image step is wrong () in cvInitMatHeader, file /tmp/buildd/ros-diamondback-vision-opencv-1.4.2/debian/ros-diamondback-vision-opencv/opt/ros/diamondback/stacks/vision_opencv/opencv2/build/opencv-svn/modules/core/src/array.cpp, line 162
terminate called after throwing an instance of 'cv::Exception'
  what():  /tmp/buildd/ros-diamondback-vision-opencv-1.4.2/debian/ros-diamondback-vision-opencv/opt/ros/diamondback/stacks/vision_opencv/opencv2/build/opencv-svn/modules/core/src/array.cpp:162: error: (-13)  in function cvInitMatHeader

I was wondering if anyone could help me with this. Here are other info that might be needed.

Message in rosbag record window

ccm@robot-Dell-DM051:~/VSLAMDIR/vslam_system/bags$ rosbag record -a
[ INFO] [1306737580.335900373]: Recording to 2011-05-30-14-39-40.bag.
[ INFO] [1306737581.340443662]: Subscribing to /bumblebee2/left/image_rect_color/compressed/parameter_updates
[ INFO] [1306737581.346024663]: Subscribing to /bumblebee2/right/image_rect/theora/parameter_descriptions
[ INFO] [1306737581.349022810]: Subscribing to /bumblebee2/right/image_rect/compressed
[ INFO] [1306737581.351694410]: Subscribing to /bumblebee2/right/image_rect_color/theora
[ INFO] [1306737581.355132437]: Subscribing to /bumblebee2/left/image_mono/theora/parameter_descriptions
[ INFO] [1306737581.357699539]: Subscribing to /bumblebee2/left/image_rect_color/theora/parameter_updates
[ INFO] [1306737581.360281000]: Subscribing to /bumblebee2/right/image_raw/compressed/parameter_descriptions
[ INFO] [1306737581.362835132]: Subscribing to /bumblebee2/right/image_rect_color/compressed/parameter_descriptions
[ INFO] [1306737581.365451070]: Subscribing to /vslam/vo_tracks/image/compressed
[ INFO] [1306737581.372123405]: Subscribing to /bumblebee2/points
[ INFO] [1306737581.375330508]: Subscribing to /bumblebee2/right/image_rect/compressed/parameter_descriptions
[ INFO] [1306737581.384072804]: Subscribing to /bumblebee2/left/image_rect/compressed
[ INFO] [1306737581.387289104]: Subscribing to /bumblebee2/right/image_mono
[ INFO] [1306737581.390304456]: Subscribing to /bumblebee2/left/image_mono/compressed
[ INFO] [1306737581.393146818]: Subscribing to /bumblebee2/right/image_rect/theora/parameter_updates
[ INFO] [1306737581.396144688]: Subscribing to /bumblebee2/left/image_color/theora
[ INFO] [1306737581.399083173]: Subscribing to /bumblebee2/right/image_rect_color/theora/parameter_updates
[ INFO] [1306737581.402292286]: Subscribing to /bumblebee2/right/image_rect/theora
[ INFO] [1306737581.405286759]: Subscribing to /bumblebee2/points2
[ INFO] [1306737581.412194093]: Subscribing to /bumblebee2/left/image_rect_color/theora
[ INFO] [1306737581.420921503]: Subscribing to /vslam/points
[ INFO] [1306737581.425428170]: Subscribing to /bumblebee2/right/image_color/theora/parameter_updates
[ INFO] [1306737581.430461941]: Subscribing to /bumblebee2/left/image_rect
[ INFO] [1306737581.433240906]: Subscribing to /bumblebee2/parameter_descriptions
[ INFO] [1306737581.436205964]: Subscribing to /bumblebee2/right/image_rect
[ INFO] [1306737581.439064088]: Subscribing to /bumblebee2/left/image_raw/theora/parameter_updates
[ INFO] [1306737581.444591341]: Subscribing to /bumblebee2/right/image_raw/compressed/parameter_updates
[ INFO] [1306737581.447676394]: Subscribing to /vslam/vo_tracks/camera_info
[ INFO] [1306737581.450656623]: Subscribing to /wide_stereo/stereo_vslam_node/parameter_descriptions
[ INFO] [1306737581.454267416]: Subscribing to /vslam/vo_tracks/image/theora/parameter_descriptions
[ INFO] [1306737581.457781634]: Subscribing to /bumblebee2/left/image_rect/compressed/parameter_descriptions
[ INFO] [1306737581.460913910]: Subscribing to /vslam/vo_tracks/image
[ INFO] [1306737581.464131789]: Subscribing to /bumblebee2/left/image_mono/compressed/parameter_updates
[ INFO] [1306737581.478871635]: Subscribing to /bumblebee2/right/image_color/compressed/parameter_updates
[ INFO] [1306737581.482000397]: Subscribing to /bumblebee2/left/image_rect_color/theora/parameter_descriptions
[ INFO] [1306737581.485449787]: Subscribing to /bumblebee2/left/image_rect_color/compressed
[ INFO] [1306737581.488316787]: Subscribing to /bumblebee2/right/image_mono/compressed/parameter_descriptions
[ INFO] [1306737581.491363975]: Subscribing to /bumblebee2/right/image_mono/theora/parameter_descriptions
[ INFO] [1306737581.494404492]: Subscribing to /bumblebee2/left/image_mono/theora/parameter_updates
[ INFO] [1306737581.500500337]: Subscribing to /bumblebee2/right/image_rect_color/compressed/parameter_updates
[ INFO ...
(more)
2014-04-20 06:53:56 -0500 marked best answer Measuring force of tip using Jacobian function in KDL

Hi, I understand from here that you can use the Jacobian function from the KDL library to calculate a the torque to input for a desired force at the tip. i.e. Torque = Jac(j,i)*Force

However, does anyone know a way to do the opposite, to measure the actual force exerted at the end tip by reading the respective measured joint torques. i.e. Measured Force = [some function?]*measured torque at joints.

I tried using the pr2_mechanism_model::JointState to get the measured effort of each joint and use back the Jacobian Transform to get the measured force,

     for (unsigned int i = 0 ; i < 6 ; i++)
  {
    F_measured_(i) = 0;
    for (unsigned int j = 0 ; j < kdl_chain_.getNrOfJoints() ; j++)
      F_measured_ += J_(i,j) * tau_measured_(j);
  }

However, when I can't compile it as the type for the JointState's measured force(double) is different from KDL::Wrench.

In member function ‘virtual void my_controller_ns::MyCartControllerClass::update()’:
  /home/c/fuerte_workspace/sandbox/my_controller_pkg/src/my_cart_controller_file.cpp:112:47: error: no match for ‘operator+=’ in ‘((my_controller_ns::MyCartControllerClass*)this)->my_controller_ns::MyCartControllerClass::F_measured_ += (((my_controller_ns::MyCartControllerClass*)this)->my_controller_ns::MyCartControllerClass::J_.KDL::Jacobian::operator()(i, j) * ((my_controller_ns::MyCartControllerClass*)this)->my_controller_ns::MyCartControllerClass::tau_measured_.KDL::JntArray::operator()(j, 0u))’
  /home/c/fuerte_workspace/sandbox/my_controller_pkg/src/my_cart_controller_file.cpp:112:47: note: candidate is:
  /opt/ros/fuerte/stacks/orocos_kinematics_dynamics/orocos_kdl/install_dir/include/kdl/frames.inl:209:9: note: KDL::Wrench& KDL::Wrench::operator+=(const KDL::Wrench&)
  /opt/ros/fuerte/stacks/orocos_kinematics_dynamics/orocos_kdl/install_dir/include/kdl/frames.inl:209:9: note:   no known conversion for argument 1 from ‘double’ to ‘const KDL::Wrench&’

Can anyone advise me on how do I go about measuring the force of the tip of pr2's arm using the Jacobian function in KDL? Thank you in advance.

EDIT: Thanks Peter, I appreciate any help as I am not very familiar with coding or robotics. Anyway, I realised I made a very silly mistake. The code should be

  for (unsigned int i = 0 ; i < 6 ; i++)
  {
    F_measured_(i) = 0;
    for (unsigned int j = 0 ; j < kdl_chain_.getNrOfJoints() ; j++)
      F_measured_(i) += J_(i,j) * tau_measured_(j);
  }

I forgot the I wrote "F_measured_" instead of "F_measured_(i)" earlier. It can compile now but not sure if it actually works. Will let you know my results afterwards.

2014-04-20 06:53:47 -0500 marked best answer reading force on pr2 arm joint

I have been reading the various packages that pr2 arm controls uses.

1)http://www.ros.org/wiki/pr2_mechanism_model

2)http://www.ros.org/wiki/pr2_mechanism/Tutorials/Coding%20a%20realtime%20Cartesian%20controller%20with%20KDL

3)http://ros.org/wiki/ee_cart_imped_control#

The API from the first link shows that you can get the measured force of the joint.

However, I can't find any of such members in the 2nd link(or in the KDL library). And from the 3rd link, it says that PR2 don't have force sensors on its joints.

Why do they contradict each other? Could someone clarify with me on this? Thank you in advance. :)

Also, if PR2 joints indeed cannot sense the force/torque on the joint. May I know what does "effort" mean in joint_states_listener Thanks!

EDIT: I'm running simulation on Gazebo if that makes any difference

2014-04-20 06:53:39 -0500 marked best answer Keyboard controller for PR2 arm

Hi, I am currently trying to write a pr2 arm controller that will allow me to control all the arm joints of pr2 by keyboard

I'm basing my code on this which will let me control r_arm_controller.

I tried modifying it but I still cannot achieve what I want. The keyboard controls that I wrote does not allow me increase the joint angle each time I press it, but instead remains at the fixed increment I tried to specify. Can someone teach me how do I change it so that I can control the arms to move anywhere I want just by keyboard without the hassle of going into the c++ code to change the values.

The code that I have written is below, I only wrote controls for the the first joint, r_shoulder_pan_joint.

Thank you so much.

#include <ros/ros.h>
#include <pr2_controllers_msgs/JointTrajectoryAction.h>
#include <actionlib/client/simple_action_client.h>
#include <iostream>
typedef actionlib::SimpleActionClient< pr2_controllers_msgs::JointTrajectoryAction > TrajClient;

char input()
  {std::cout << "Type a command and then press enter.  "
                "'l' to turn left, "
                "'r' to turn right\n";
   char input;
   std::cin >> input;
   return input;
   }

class RobotArm
{
private:
  // Action client for the joint trajectory action 
  // used to trigger the arm movement action
  TrajClient* traj_client_;

public:
  //! Initialize the action client and wait for action server to come up
  RobotArm() 
  {
    // tell the action client that we want to spin a thread by default
    traj_client_ = new TrajClient("r_arm_controller/joint_trajectory_action", true);

    // wait for action server to come up
    while(!traj_client_->waitForServer(ros::Duration(5.0))){
      ROS_INFO("Waiting for the joint_trajectory_action server");
    }
  }

  //! Clean up the action client
  ~RobotArm()
  {
    delete traj_client_;
  }

  //! Sends the command to start a given trajectory
  void startTrajectory(pr2_controllers_msgs::JointTrajectoryGoal goal)
  {
    // When to start the trajectory: 0.5s from now
    goal.trajectory.header.stamp = ros::Time::now() + ros::Duration(0.5);
    traj_client_->sendGoal(goal);
  }

  //! Generates a simple trajectory with two waypoints, used as an example
  /*! Note that this trajectory contains two waypoints, joined together
      as a single trajectory. Alternatively, each of these waypoints could
      be in its own trajectory - a trajectory can have one or more waypoints
      depending on the desired application.
  */
  pr2_controllers_msgs::JointTrajectoryGoal armExtensionTrajectory()
  {
    //initiate armextension
    std::cout << "armExtensionTrajectory initiated.\n";

    //our goal variable
    pr2_controllers_msgs::JointTrajectoryGoal goal;

    // First, the joint names, which apply to all waypoints
    goal.trajectory.joint_names.push_back("r_shoulder_pan_joint");
    goal.trajectory.joint_names.push_back("r_shoulder_lift_joint");
    goal.trajectory.joint_names.push_back("r_upper_arm_roll_joint");
    goal.trajectory.joint_names.push_back("r_elbow_flex_joint");
    goal.trajectory.joint_names.push_back("r_forearm_roll_joint");
    goal.trajectory.joint_names.push_back("r_wrist_flex_joint");
    goal.trajectory.joint_names.push_back("r_wrist_roll_joint");


    // We will have one waypoints in this goal trajectory
    goal.trajectory.points.resize(1);

    // First trajectory point
    // Positions
    int ind = 0;
    goal.trajectory.points[ind].positions.resize(1);
    std::cout << "Type a command and then press enter.  "
                "'l' to turn left, "
                "'r' to turn right, '.' to exit\n";
    char input;
    int repeat;

      std::cout << "Loop started. \n";
      std::cin >> input;
      if(input=='l')
      {
          goal.trajectory.points[ind].positions.resize(7);
          goal.trajectory.points[ind].positions[0] += 0.2;
          goal.trajectory.points[ind].positions[1] = 0.0;
          goal.trajectory.points ...
(more)
2014-04-20 06:52:04 -0500 marked best answer pr2: writing a realtime joint controller

I'm currently attempting this tutorial http://www.ros.org/wiki/pr2_mechanism/Tutorials/Running%20a%20realtime%20joint%20controller

Everything is okay until I reach this step:

Loading and Starting the Controller

Finally, we need to check if our controller got registered to the controller manager. To get the list of registered controllers, type:

$ rosrun pr2_controller_manager pr2_controller_manager list-types

Look in the output for our controller MyControllerPlugin. If it's there you're ready to load and start it.

I don't see MyControllerPlugin anywhere. I just tried to continue anyway by typing

rosrun pr2_controller_manager pr2_controller_manager load MyControllerPlugin

rosrun pr2_controller_manager pr2_controller_manager start MyControllerPlugin

The controller successfully loads in and starts in Terminal but nothing is happening in Gazebo. I did exactly as the tutorial said except I changed my_controller_name to MyControllerPlugin. Did I do something wrong?

The warning reflected after trying to run MyControllerPlugin is

[ WARN] [1349677273.168201399, 243.496000000]: The deprecated controller type MyControllerPlugin was not found. Using the namespaced version my_controller_pkg/MyControllerPlugin instead. Please update your configuration to use the namespaced version.

I'm running ubuntu 12.04 and Fuerte.

Thanks.

EDIT: I managed to get rid of the warnings by

rosparam set my_controller_pkg/MyControllerPlugin/type my_controller_pkg/MyControllerPlugin

&

rosparam set my_controller_pkg/MyControllerPlugin/joint_type r_shoulder_pan_joint

However, when I load and start the plugin, nothing happens on gazebo. PR2 just stands there doing nothing. Does anyone else have the same problem?

EDIT2(to Arthur): What I typed

rosrun pr2_controller_manager pr2_controller_manager load my_controller_pkg/MyControllerPlugin

rosrun pr2_controller_manager pr2_controller_manager start my_controller_pkg/MyControllerPlugin

rosrun pr2_controller_manager pr2_controller_manager list

The results showed that the plugin was running[my_controller_pkg/MyControllerPlugin (running)] but nothing was happening in the simulator. :(

EDIT3: Thanks Arthur. I see "my_controller_pkg/MyControllerPlugin" when I run "$ rosrun pr2_controller_manager pr2_controller_manager list-types"

I changed "rosparam set my_controller_pkg/MyControllerPlugin/type my_controller_pkg/MyControllerPlugin" to "rosparam set my_controller_name/type my_controller_pkg/MyControllerPlugin".

I also changed this respectively "rosparam set my_controller_pkg/MyControllerPlugin/joint_type r_shoulder_pan_joint" to " rosparam set my_controller_name/joint_type r_shoulder_pan_joint" Is that what you mean by not using the same name for Plugin and controller?

After loading and starting the controller I ran this command $ rosrun pr2_controller_manager pr2_controller_manager list and found this: my_controller_name ( running )

Pr2 is still not doing anything in the simulator. :s


EDIT4: I think I gave information very messily before so here is it again. I followed the tutorial (http://www.ros.org/wiki/pr2_mechanism/Tutorials/Writing%20a%20realtime%20joint%20controller) quite closely and managed to get it to load successfully with the help of Arthur. However, despite loading successfully, pr2 does not do anything in the simulator.

This is the code at the end of my_controller_file.cpp(exactly the same from tutorial)

PLUGINLIB_DECLARE_CLASS(my_controller_pkg,MyControllerPlugin, my_controller_ns::MyControllerClass, pr2_controller_interface::Controller)

This is my contoller_plugins.xml file

<library path="lib/libmy_controller_lib">
  <class name="my_controller_pkg/MyControllerPlugin" 
         type="my_controller_ns::MyControllerClass"           
         base_class_type="pr2_controller_interface::Controller" />
</library>

Step1

rosparam set my_controller_name/type my_controller_pkg/MyControllerPlugin

Step2

rosparam set my_controller_name/joint_name r_shoulder_pan_joint

Step3

rosparam get -p my_controller_name

I get

joint_name: r_shoulder_pan_joint
type: my_controller_pkg/MyControllerPlugin

Step4

rosrun pr2_controller_manager pr2_controller_manager list-types

I get(yes, my_controller_pkg/MyControllerPlugin is there)

JointGravityController
JointPendulumController
ethercat_trigger_controllers ...
(more)
2014-04-20 06:52:01 -0500 marked best answer writing a revolute joint

I'm trying to build a door model but I can't seem to get the coding for revolute joints right. the "base_link" is the wall and "door" is the door.

My code "door.xml" is here

<?xml version="1.0"?>
<robot name="door">
  <link name="base_link">
    <visual>
      <geometry>
        <box size="0.6 0.05 0.6"/>
      </geometry>
      <origin rpy="0 0 0" xyz="0 0 0.3"/>
      <material name="white">
        <color rgba="1 1 1 1"/>
      </material>
    </visual>
    <!--<inertia  ixx="1.0" ixy="0.0"  ixz="0.0"  iyy="100.0"  iyz="0.0"  izz="1.0" />
    </inertia>-->
  </link>

  <link name="door">
    <visual>
      <geometry>
        <box size="0.3 0.05 0.6"/>
      </geometry>
      <origin rpy="0 0 0" xyz="0.15 -0.025 0"/>
    </visual>
  </link>

  <joint name="hinge" type="revolute">
    <limit upper="0" lower="-1.57"velocity="10" effort="10"/>
    <origin xyz="0.3 0.025 .3"/>
    <axis xyz="0 0 1" />
    <parent link="base_link"/>
    <child link="door"/>
  </joint> 
</robot>

I yield the following error

Traceback (most recent call last):
  File "/opt/ros/fuerte/stacks/robot_model_visualization/joint_state_publisher/joint_state_publisher", line 202, in <module>
    jsp = JointStatePublisher()
  File "/opt/ros/fuerte/stacks/robot_model_visualization/joint_state_publisher/joint_state_publisher", line 25, in __init__
    robot = xml.dom.minidom.parseString(description).getElementsByTagName('robot')[0]
  File "/usr/lib/python2.7/xml/dom/minidom.py", line 1930, in parseString
    return expatbuilder.parseString(string)
  File "/usr/lib/python2.7/xml/dom/expatbuilder.py", line 940, in parseString
    return builder.parseString(string)
  File "/usr/lib/python2.7/xml/dom/expatbuilder.py", line 223, in parseString
    parser.Parse(string, True)
xml.parsers.expat.ExpatError: not well-formed (invalid token): line 47, column 34

Here's a picture of how it looks like on rviz when I run roslaunch urdf_tutorial display.launch model:=door.xml door.png

The visualization on rviz works perfectly find when I use continuous or fixed joints. So I'm not sure whether it is due to my code or some python related script. I'm running on Ubuntu 12.04, Fuerte.

Thanks!

2014-04-20 06:51:46 -0500 marked best answer gazebo.hh not found

Hi, I'm currently trying to do this tutorial http://gazebosim.org/wiki/tutorials/plugins/simple_world

but at when I compile the code, 'cmake' works fine but 'make' produces the following error

/home/u0905937/fuerte_workspace/sandbox/gazebo_plugin_tutorial/hello_world.cc:1:21: fatal error: gazebo.hh: No such file or directory

I did a locate and found gazebo.hh in

/opt/ros/fuerte/stacks/simulator_gazebo/gazebo/gazebo/include/gazebo-1.0.2/gazebo/gazebo.hh

Does the problem has anything to do with my ROS_PACKAGE_PATH or ROS_WORKSPACE? I've tried adding the above location to my ROS_PACKAGE_PATH but to no avail. My ROS_WORKSPACE is /home/u0905937/fuerte_workspace if that is any help.

I'm running on Ubuntu 12.04

EDIT: Thanks Kai, I've tried using the rosmake method and at least it could partially build the package.

But I still face the problem of the computer not being able to find gazebo.hh. I've tried copying gazebo.hh into /usr/include/ but it came up with a new error of not being able to find the next header which is gazebo_core.hh. So I copy and pasted it again which brought up another new error of not being able to find the next header the previous one referred to. There's got to be an easier way right?

By the way, my system is downgraded to ubuntu 11.10.