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

richkappler's profile - activity

2017-05-28 03:17:03 -0500 received badge  Famous Question (source)
2017-03-23 01:37:41 -0500 received badge  Notable Question (source)
2017-03-11 01:56:58 -0500 received badge  Teacher (source)
2017-03-10 09:20:16 -0500 answered a question find 3D location of the sensor when a depth image arrives

There are many questions before help can be offered.

print the 3D location of the sensor and the timestamp in a text format when it detects a depth image

Location of the sensor in relation to what? It's position on the map I would presume, so first you would have to create the map.

Print to where (and why??)? I have little information to go on, but am presuming you are using this for navigation (create map with sensor, use map to navigate around the space). If this is not the case, you need to provide more information. If it is the case, look at mapping and the NAV stack.

1,2, & 3 are fairly straightforward. 4, not so much. Why would odom_node listen to cam_node? They each publish information that is used by higher level functions.

regards, Richard

2016-12-18 11:38:35 -0500 marked best answer ros_lib not created installing arduino

running a fresh install of hydro on a fresh install of ubuntu Precise. According to the tutorial at http://wiki.ros.org/rosserial_arduino/Tutorials/Arduino%20IDE%20Setup

under 3.3 Install ros_lib into the Arduino Environment

"The preceding installation steps created ros_lib, which must be copied into the Arduino build environment to enable Arduino programs to interact with ROS."

ros_lib was not created. any ideas? I rechecked everything in the install, all is well, no error messages etc.

Also, it says to put ros_lib in the libraries folder of the sketchbook. My libraries are at /usr/share/arduino/libraries

Does it matter?

regards, Richard

2016-11-02 15:10:43 -0500 received badge  Popular Question (source)
2016-11-02 09:59:55 -0500 asked a question can kinetic work with indigo over a network?

I am building a network that will include a laptop, some Raspberry pi's, Jetson TK1, Odroid C2, etc. The laptop has kinetic installed, but the ARM boards all have indigo as it seems that is the only distro that will work on the ARMs. Will this work? Is there an issue with nodes being on different releases? I imagine it would be simple enough to revert the laptop to indigo, but I'd rather not as I think that would mean reverting my OS as well (currently Ubuntu 16.04).

2015-01-05 04:41:03 -0500 marked best answer sensor_msgs/Range

I have a simple sonar sensor running to an Arduino Mega ADK. On the Arduino I have the following code patched together from rosserial_arduino tutorials and the code specific to my sensor:

#include <ros.h>
#include <ros/time.h>
#include <sensor_msgs/Range.h>
#include <Ultrasonic.h>

ros::NodeHandle nh;

sensor_msgs::Range range_msg;
ros::Publisher pub_range( "/ultrasound", & range_msg);

char frameid[] = "/ultrasound";
int inMsec;

#define TRIGGER_PIN  48
#define ECHO_PIN     49

Ultrasonic ultrasonic(TRIGGER_PIN, ECHO_PIN);

void setup()
  {
  nh.initNode();
  nh.advertise(pub_range);

  range_msg.radiation_type = sensor_msgs::Range::ULTRASOUND;
  range_msg.header.frame_id =  frameid;
  range_msg.field_of_view = 0.1;  // fake
  range_msg.min_range = 0.0;
  range_msg.max_range = 6.47;
  }

long range_time;

void loop()
  {
  long microsec = ultrasonic.timing();

  inMsec = ultrasonic.convert(microsec, Ultrasonic::IN);

  //publish the adc value every 50 milliseconds
  //since it takes that long for the sensor to stablize
  if ( millis() >= range_time ){
    int r =0;

    range_msg.range = inMsec;
    range_msg.header.stamp = nh.now();
    pub_range.publish(&range_msg);
    range_time =  millis() + 50;
  }

  nh.spinOnce();
}

I know it is publishing as rostopic list shows .ultrasound as one of the running topics. As I expect based on the line range_msg.radiation_type = sensor_msgs::Range::ULTRASOUND; it is publishing a Range and that is confirmed by running rostopic type ultrasound.

My subscriber, however, refuses to read this because of the Range type. Here's the code:

#!/usr/bin/env python

import rospy
from std_msgs.msg import String

def callback(data):
    rospy.loginfo(rospy.get_name() + ": I heard %s" % data.data)

def listener():
    rospy.init_node('listener', anonymous=True)
    rospy.Subscriber("ultrasound", Range, callback)
    rospy.spin()

if __name__=='__main__':
    listener()

based on the simple publisher and subscriber tutorials.

However, when I run it, the error message tells me

Traceback (most recent call last):
     rospy.Subscriber("ultrasound", Range, callback)
NameError: global name 'Range' is not defined

I tried changing it to rospy.Range and got

rospy.Subscriber("ultrasound", rospy.Range, callback)
AttributeError: 'module' object has no attribute 'Range'

I understand the error, but have no idea how to fix it. Can I get a gentle-ish shove in the right direction?

2014-11-24 10:27:23 -0500 received badge  Notable Question (source)
2014-11-24 10:27:23 -0500 received badge  Famous Question (source)
2014-11-05 01:40:59 -0500 received badge  Famous Question (source)
2014-09-18 05:57:40 -0500 received badge  Famous Question (source)
2014-07-19 18:17:22 -0500 received badge  Famous Question (source)
2014-07-15 09:51:47 -0500 received badge  Taxonomist
2014-06-19 04:53:19 -0500 received badge  Notable Question (source)
2014-06-19 04:53:19 -0500 received badge  Popular Question (source)
2014-06-16 02:47:54 -0500 received badge  Famous Question (source)
2014-06-12 09:45:11 -0500 marked best answer install ros hydro ubuntu 14.04

I'm probably missing something obvious here so a push in the right direction would be a great help. I've a new computer, some of the hardware was not supported until Ubuntu Trusty, hence I've been stuck in windoze land for a month and a half. Now I've got Trusty installed, everything works great, but when I try to install ROS, no joy. It would appear that I'm stuck in the no mans land in between releases. Hydro installation instructions only go up to 13.10, Indigo won't be available until May.

Is it just a matter of adding the 12.04 sources to my sources list?

2014-06-11 22:02:21 -0500 received badge  Popular Question (source)
2014-06-11 22:02:21 -0500 received badge  Notable Question (source)
2014-06-09 06:54:11 -0500 received badge  Enthusiast
2014-06-08 13:59:23 -0500 asked a question Creating a teleop node/cmd_vel publisher

I'm trying to piece all of this together and have a couple questions. I am building a robot "Inga" who will run a pair of pittman motors through an Arduino Mega ADK with an Adafruit motor controller shield and a Robogaia encoder shield, ROS Hydro on 64 bit Toshiba Satellite running Ubuntu Precise. I'm getting comfortable with ROS but still at the shallow end of the learning curve. I know just enough C++ to not entirely helpless, am pretty good with python. I'm choosing to write most of my stuff in C++ to help me in my learning there. My ultimate goal is to employ the Nav stack using a Kinect and an XV-11 Lidar, plus some infrareds and sonars. In the process of learning how to do all of this I'm starting with just being able to move the bot around using a ps2 joystick and then build up to the Nav stack from there as my knowledge and time allows. I've read the appropriate tutorials for joy including creating a teleop node as well as all the Nav stack tutorials and ROS by Example.

Here's what I think I know: 1) I need to write code for the Arduino that subscribes to gemoetry/Twist msgs to get cmd_vel and that publishes the encoder data. This is almost done. 2) I need to create a base controller that subscribes to the joystick and publishes the cmd_vel messages the Arduino will read. This is what I'm working on now.

In order to create (2) I've copied the "Creating a Simple teleop node" code from [here] ( http://wiki.ros.org/joy/Tutorials/Wri... ), renamed it inga_joy.cpp and modified it as follows:

#include <ros/ros.h>
#include <turtlesim/Velocity.h>
#include <sensor_msgs/Joy.h>


class TeleopInga
{
public:
  TeleopInga();

private:
  void joyCallback(const sensor_msgs::Joy::ConstPtr& joy);

  ros::NodeHandle nh_;

  int linear_, angular_;
  double l_scale_, a_scale_;
  ros::Publisher vel_pub_;
  ros::Subscriber joy_sub_;

};


TeleopInga::TeleopInga():
  linear_(1),
  angular_(2)
{

  nh_.param("axis_linear", linear_, linear_);
  nh_.param("axis_angular", angular_, angular_);
  nh_.param("scale_angular", a_scale_, a_scale_);
  nh_.param("scale_linear", l_scale_, l_scale_);


  vel_pub_ = nh_.advertise<inga::Velocity>("inga/command_velocity", 1);


  joy_sub_ = nh_.subscribe<sensor_msgs::Joy>("joy", 10, &TeleopInga::joyCallback, this);

}

void TeleopInga::joyCallback(const sensor_msgs::Joy::ConstPtr& joy)
{
  turtlesim::Velocity vel;
  vel.angular = a_scale_*joy->axes[angular_];
  vel.linear = l_scale_*joy->axes[linear_];
  vel_pub_.publish(vel);
}


int main(int argc, char** argv)
{
  ros::init(argc, argv, "teleop_inga");
  TeleopInga teleop_inga;

  ros::spin();
}

Essentially what I've done so far is create a pkg in catkin_ws/src named inga_teleop with dependencies joy roscpp rospy and std_msgs

THE QUESTIONS: 1. On line 2: #include <turtlesim velocity.h=""> - since I'm not using turtlesim, where do I get the header to include for Velocity.h?

  1. On line 44: turtlesim::Velocity vel; - this will just be the package that I include for Velocity.h ?

  2. I see that I'm using sensor msgs, should I have included them in my initial package, or are ...

(more)
2014-06-08 10:23:03 -0500 asked a question can't locate node [turtle_teleop_joy] in package [learning_joy]

Using Hydro on Precise. Following the tutorials on joystick operation here and here. The joystick works, roscore is running, joy_node is running, when I do rostopic echo joy I see the vectors change as I expect when the joystick controls are moved. When I run roslaunch learning_joy turtle_joy.launch however, the joystick still works, topic echo shows still sending, but no movement of the turtle.

I'm still on the steep part of the learning curve so I could be wrong, but might this be a path problem? I've changed the launch file as suggested here (joy to joy_node) and also changed the last line from turtle_teleop to learning_joy (missed that bit on the tutorial) but still not getting it right. here's my screenshot:

roslaunch learning_joy turtle_joy.launch ... logging to /home/richard/.ros/log/68d0ca94-ef06-11e3-912a-00215c98e435/roslaunch-inga-7554.log
Checking log directory for disk usage. This may take awhile. 
Press Ctrl-C to interrupt 
Done checking log file disk usage. Usage is <1GB.

    started roslaunch server http://inga:32850/

    SUMMARY
    PARAMETERS * /axis_angular * /axis_linear * /rosdistro * /rosversion * /scale_angular * /scale_linear * /turtle_joy/deadzone * /turtle_joy/dev

    NODES / sim (turtlesim/turtlesim_node) teleop (learning_joy/turtle_teleop_joy) turtle_joy (joy/joy_node)

    ROS_MASTER_URI=http://localhost:11311

    core service [/rosout] found process[sim-1]: started with pid [7572] process[turtle_joy-2]: started with pid [7596] ERROR: cannot launch node of type [learning_joy/turtle_teleop_joy]: can't locate node [turtle_teleop_joy] in package [learning_joy]
2014-06-08 10:19:14 -0500 commented answer cannot locate node joy

Actually, now that you mention it, it now finds joy, but still can't launch turtle_teleop_joy. I had posted the error here, but figured I'd better start a new thread as your fix did indeed correct the subject line problem.. Thanks for the help!

2014-06-08 07:40:11 -0500 received badge  Notable Question (source)
2014-06-08 07:22:40 -0500 commented answer cannot locate node joy

see above, just added the new screenshot, should I have made that a comment?

2014-06-08 07:21:35 -0500 answered a question cannot locate node joy

I'm still on the steep part of the learning curve so I could be wrong, but might this be a path problem? I've changed the launch file as suggested above (joy to joy_node) and also changed the last line from turtle_teleop to learning_joy (missed that bit on the tutorial) but still not getting it right. here's my screenshot:

roslaunch learning_joy turtle_joy.launch ... logging to /home/richard/.ros/log/68d0ca94-ef06-11e3-912a-00215c98e435/roslaunch-inga-7554.log Checking log directory for disk usage. This may take awhile. Press Ctrl-C to interrupt Done checking log file disk usage. Usage is <1GB.

started roslaunch server http://inga:32850/

SUMMARY

PARAMETERS * /axis_angular * /axis_linear * /rosdistro * /rosversion * /scale_angular * /scale_linear * /turtle_joy/deadzone * /turtle_joy/dev

NODES / sim (turtlesim/turtlesim_node) teleop (learning_joy/turtle_teleop_joy) turtle_joy (joy/joy_node)

ROS_MASTER_URI=http://localhost:11311

core service [/rosout] found process[sim-1]: started with pid [7572] process[turtle_joy-2]: started with pid [7596] ERROR: cannot launch node of type [learning_joy/turtle_teleop_joy]: can't locate node [turtle_teleop_joy] in package [learning_joy]

2014-06-08 07:01:48 -0500 commented answer cannot locate node joy

No joy. Changed joy to joy_node, still exactly the same problem.

2014-06-03 04:32:55 -0500 received badge  Popular Question (source)
2014-06-01 15:45:27 -0500 asked a question cannot locate node joy

Using Hydro on Precise. Following the tutorials on joystick operation here and here. The joystick works, roscore is running, joy_node is running, when I do rostopic echo joy I see the vectors change as I expect when the joystick controls are moved. When I run roslaunch learning_joy turtle_joy.launch however, the joystick still works, topic echo shows still sending, but no movement of the turtle. The error message is as follows:

roslaunch learning_joy turtle_joy.launch
... logging to /home/richard/.ros/log/3b2f6bb6-e9cc-11e3-811a-00215c98e435/roslaunch-inga-12328.log
Checking log directory for disk usage. This may take awhile.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.

started roslaunch server http://inga:38218/

SUMMARY
========

PARAMETERS
 * /axis_angular
 * /axis_linear
 * /rosdistro
 * /rosversion
 * /scale_angular
 * /scale_linear
 * /turtle_joy/deadzone
 * /turtle_joy/dev

NODES
  /
    sim (turtlesim/turtlesim_node)
    teleop (turtle_teleop/turtle_teleop_joy)
    turtle_joy (joy/joy)

ROS_MASTER_URI=http://localhost:11311

core service [/rosout] found
process[sim-1]: started with pid [12346]
ERROR: cannot launch node of type [joy/joy]: can't locate node [joy] in package [joy]
ERROR: cannot launch node of type [turtle_teleop/turtle_teleop_joy]: turtle_teleop
ROS path [0]=/opt/ros/hydro/share/ros
ROS path [1]=/home/richard/catkin_ws/my_src
ROS path [2]=/home/richard/catkin_ws/src
ROS path [3]=/opt/ros/hydro/share
ROS path [4]=/opt/ros/hydro/stacks

A search of ROS answers (unless I missed something) yields nothing that I haven't already tried. Any ideas?

2014-05-18 07:48:36 -0500 received badge  Notable Question (source)
2014-04-28 18:46:56 -0500 received badge  Popular Question (source)
2014-04-27 07:36:28 -0500 asked a question Integrating a program into ROS

I'm interested in integrating a program (ChatScript) into ROS. It's written in C++, platform independent, receives user input and generates output, can run as a local or a server. Run as a standalone, it runs in the terminal, one types in text, the program parses this text, selects the appropriate response and outputs that text to the terminal as text then waits for the next input.

With my limited but growing understanding of ROS, I should think it would just be a matter of generating a package that runs ChatScript (as written)as a node with a subscriber that listens for input then publishes the generated response. Is it really that simple?

Are there tutorials out there that would help me learn how to do this? I've been through the basic and intermediate tutorials and feel I'm right on the edge of knowing but not quite there.

2014-04-21 23:06:59 -0500 received badge  Famous Question (source)
2014-04-21 09:49:22 -0500 received badge  Notable Question (source)
2014-04-21 08:31:50 -0500 received badge  Popular Question (source)