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

Wim's profile - activity

2022-10-23 23:56:54 -0500 received badge  Necromancer (source)
2021-04-06 12:03:40 -0500 received badge  Great Answer (source)
2021-04-06 12:03:40 -0500 received badge  Guru (source)
2021-04-03 03:03:03 -0500 received badge  Great Answer (source)
2021-04-03 03:03:03 -0500 received badge  Guru (source)
2020-03-05 06:20:42 -0500 received badge  Guru (source)
2020-03-05 06:20:42 -0500 received badge  Great Answer (source)
2019-03-30 10:02:49 -0500 received badge  Good Answer (source)
2018-10-01 03:00:27 -0500 received badge  Good Answer (source)
2018-08-13 15:59:11 -0500 received badge  Nice Answer (source)
2018-04-06 05:58:16 -0500 received badge  Guru (source)
2018-04-06 05:58:16 -0500 received badge  Great Answer (source)
2018-04-06 05:57:58 -0500 received badge  Nice Answer (source)
2017-07-17 13:48:13 -0500 received badge  Good Answer (source)
2015-07-03 08:09:50 -0500 received badge  Nice Question (source)
2015-01-27 04:30:30 -0500 received badge  Good Answer (source)
2014-10-03 10:59:28 -0500 received badge  Necromancer (source)
2014-06-26 02:53:20 -0500 received badge  Good Answer (source)
2014-01-28 17:21:43 -0500 marked best answer How do I know when the PR2 switches from wireless to wired networking

When I plug in a network cable into the back of the PR2, who do I know it is actually using the wired network and not the wireless network?

2014-01-28 17:21:34 -0500 marked best answer Supported platforms

On which platforms is ROS supported?

2013-12-06 03:15:30 -0500 received badge  Good Answer (source)
2013-08-09 10:34:13 -0500 received badge  Great Answer (source)
2013-02-09 18:12:21 -0500 edited question Custom Nodes not publishing or subscribing, why?

Hi all,

I'm writing a couple simple nodes that should work (they build without errors), but when launched rxgraph and rosnode don't show any publish or subscribe topics from those nodes.

I'm hoping someone can point me in the right direction. I've included one of the nodes below:

edit: updated joy_to_point.cpp per K_Yousif. edit: solution from K_Yousif resolves the issue

joy_to_point.h

#include <ros/ros.h>
#include <ros/node_handle.h>
#include <sensor_msgs/Joy.h>
#include <husky_seeg/XYPoint.h>

class JoyToPoint {

private:
    // Node Handler
    ros::NodeHandle nh;

    // Subscribers
    ros::Subscriber joySub;

    // Publishers
    ros::Publisher pointPub;

    // Parameters
    double rangeAtMax;

    // Messages
    sensor_msgs::Joy joy;
    husky_seeg::XYPoint point;

public:
    JoyToPoint(ros::NodeHandle nh_);
    ~JoyToPoint(){}

    // Callbacks
    void joyCallback( const sensor_msgs::Joy::ConstPtr& j );

};

joy_to_point.cpp

#include "joy_to_point.h"

JoyToPoint::JoyToPoint(ros::NodeHandle nh_) : nh(nh_) {

    // Resolve topic names
    std::string joy_topic  = ros::names::clean(nh.resolveName("/joy"));
    ROS_DEBUG("Subscribing to:\n\t* %s", joy_topic.c_str());

    // Subscribe to input topics.
    joySub = nh.subscribe(joy_topic, 1, &JoyToPoint::joyCallback, this);

    // Get Parameters
    ros::NodeHandle local_nh("~");
    local_nh.param<double>( "range_at_max", rangeAtMax, 1 );

    // Advertise publisher
    pointPub = nh.advertise<husky_seeg::XYPoint>("/XYPoint", 1);
}

void JoyToPoint::joyCallback( const sensor_msgs::Joy::ConstPtr& j ) {
    // Convert Joystick message to a virtual point
    point.x = joy.axes[1] * rangeAtMax;
    point.y = joy.axes[0] * rangeAtMax;

    pointPub.publish(point);
}

int main(int argc, char **argv)
{
  ros::init(argc, argv, "joy_to_point");
  ros::NodeHandle nh;

  JoyToPoint point(nh);

  ros::spin();
  return 0;
}
2013-02-06 22:47:31 -0500 received badge  Good Answer (source)
2013-01-31 03:41:29 -0500 received badge  Nice Answer (source)
2013-01-24 23:00:39 -0500 received badge  Good Answer (source)
2013-01-17 20:10:29 -0500 received badge  Notable Question (source)
2013-01-17 20:10:29 -0500 received badge  Popular Question (source)
2013-01-17 20:10:29 -0500 received badge  Famous Question (source)
2013-01-16 07:22:00 -0500 received badge  Good Answer (source)
2013-01-16 07:22:00 -0500 marked best answer How do I use a webcam in ROS?

Is there a generic driver for webcams to get images on a ROS topic?

2012-11-19 12:05:33 -0500 commented answer Debugging Prerelease Issue

The ros package of electric is indeed missing for lucid: http://packages.ros.org/ros-shadow-fixed/ubuntu/pool/main/r/ros-electric-ros/

2012-08-17 18:14:23 -0500 received badge  Notable Question (source)
2012-08-17 18:14:23 -0500 received badge  Famous Question (source)
2012-07-24 20:16:03 -0500 received badge  Good Answer (source)
2012-07-18 16:20:26 -0500 received badge  Good Answer (source)
2012-07-16 13:02:59 -0500 received badge  Nice Answer (source)
2012-06-19 10:20:35 -0500 commented answer robot_pose_ekf on an inclined plane

The 2D plane used by wheel odometry is fixed in the x-y plane, and does _not_ rotate when the robot's pitch or roll angle changes. This was done to prevent the z-coordinate of the robot from drifting away. That said, it would be reasonable to dynamically rotate the plane for wheel odometry.

2012-06-13 19:23:48 -0500 received badge  Good Answer (source)
2012-06-13 15:26:48 -0500 received badge  Nice Answer (source)