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

Ashesh Goswami's profile - activity

2016-12-05 13:30:26 -0500 received badge  Taxonomist
2016-05-08 15:21:28 -0500 marked best answer How to increase speed of passing velocity commands to p3dx

Hi all,

I am working on a project that requires me to send velocity commands to p3dx robot at a high speed. At the moment the robot takes a while (about 0.2s-0.3s) to change to a new speed once the command is given. Could you suggest any way in which I can increase this speed. I am using "ROSARIA" to connect to the robot and subscribing via "cmd_vel". The robot is connected to the PC using an USB to RS422 converter. Any suggestions will be appreciated. Thanks in advance

2016-05-08 15:01:58 -0500 marked best answer Need suggestion regarding use of laserscanner or radar

Hi,

I am currently doing research in the field of Autonomous Navigation. Although this question might be slightly inappropriate for ROS forum, I decided to post it for getting some good suggestions. I have been using LMS Sick-200 laser-scanner for performing 2D detection of obstacles for velocity estimation. However, if I check the state-of-the-art technology, most of the vehicles (Vovlo, Google, Ford, Honda, etc) use RADAR sensors (both long and short range) for performing tasks like object detection, collision avoidance, velocity estimation, etc. Can anyone suggest whether it would be a better decision to shift to RADAR and whether I would get enough support in ROS and the available wrappers and drivers if I start using Radar instead of laser-scanners (like how it is available for SICK and Hokuyo lidars). Thanks

2015-09-18 05:47:17 -0500 received badge  Famous Question (source)
2015-08-27 20:44:18 -0500 received badge  Famous Question (source)
2015-03-22 20:44:50 -0500 received badge  Notable Question (source)
2015-03-20 14:23:09 -0500 received badge  Supporter (source)
2015-03-19 09:40:23 -0500 received badge  Popular Question (source)
2015-03-19 04:52:45 -0500 commented answer Publisher Subscriber not working

thanks a lot. i ran the rqt_graph and figured out that the problem was with an inactive node, i.e. i was running this node through another inactive node and hence the topic didn't have a clear path from the publisher to the subscriber..the problem is solved now

2015-03-19 04:11:54 -0500 commented answer Publisher Subscriber not working

It does not work if I put "/lane_change_indicator"

2015-03-19 03:37:24 -0500 asked a question Publisher Subscriber not working

Hi everyone,

I have been using ROS for quite a while but am suddenly stuck with a very weird problem. In a part of my code, the subscriber to a publisher is not working within the code segment. If I try to use rostopic echo, it works fine but as soon as I try running the subscriber node, not only does it give no result but also after disconnecting the subscriber node if I try to perform rostopic echo it does not work anymore. This is a very strange problem and any help would be very much appreciated. I am attaching the subscriber publisher nodes (much simplified versions)

#include <ros/ros.h>
#include <ros/callback_queue.h>
#include <visualization_msgs/Marker.h>
#include <std_msgs/String.h>
#include <sensor_msgs/LaserScan.h>
#include <nav_msgs/Odometry.h>
#include <fstream>
#include <sstream>
#include <string> 
#include <stdlib.h>
#include <algorithm>
#include <cstdlib>
#include <vector>
#include <math.h>
#include <std_msgs/MultiArrayLayout.h>
#include <std_msgs/MultiArrayDimension.h>
#include <std_msgs/Float32MultiArray.h>
#include <std_msgs/Int8.h>
#include "list_velocity_tracking.h"

#define PI 3.14159265
using namespace std;
std_msgs::Int8 lane_indicator;

void laneCallback(const std_msgs::Int8::ConstPtr& lc);

int main(int argc, char** argv)
{

    ros::init(argc, argv, "velocit_estimation_list");
    ros::NodeHandle n;
    ros::NodeHandle n1;
    pub2 = n.advertise<std_msgs::Int8>("lane_change_indicator", 5);
    int count = 0;
    lane_indicator.data = 0;

    while(ros::ok())
    {
        pub2.publish(lane_indicator);
    }
}

and the subscriber node

#include <ros/ros.h>
#include <ros/callback_queue.h>
#include <visualization_msgs/Marker.h>
#include <std_msgs/String.h>
#include <sensor_msgs/LaserScan.h>
#include <nav_msgs/Odometry.h>
#include <fstream>
#include <sstream>
#include <string> 
#include <stdlib.h>
#include <algorithm>
#include <cstdlib>
#include <vector>
#include <math.h>
#include <std_msgs/MultiArrayLayout.h>
#include <std_msgs/MultiArrayDimension.h>
#include <std_msgs/Float32MultiArray.h>
#include <std_msgs/Int8.h>
#include "list_velocity_tracking.h"

#define PI 3.14159265
using namespace std;

void laneCallback(const std_msgs::Int8::ConstPtr& lc);

int main(int argc, char** argv)
{

    ros::init(argc, argv, "velocit_estimation_list");
    ros::NodeHandle n;
    ros::NodeHandle n1;
    lane_lock = n.subscribe("lane_change_indicator", 10, laneCallback);
    int count = 0;

    while(ros::ok())
    {
        ros::spinOnce();
    }
}

void laneCallback(const std_msgs::Int8::ConstPtr& lc)
{
    cout<<"inside callback\n";
}

and yes, I have included lane_lock in the header file as a ROS subscriber. thanks a lot in advance

2015-01-24 07:02:08 -0500 marked best answer Using CallbackQueue

Hi,

I have a code where I have already subscribed to the following topics

pose_sub = n2.subscribe("RosAria/pose", 1, poseCallback);
scan_sub = n.subscribe("scan", 1, scanCallback);

I am using ros::spinOnce() to callback to these topics. However, for a part of my code,I want to just monitor the pose messages and enter into poseCallback from inside a particular loop. However during this execution, I do not want to enter into the scanCallback function. I know this is possible but I am not very sure about its implementation. I came across this article link text which mentions about using CallbackQueue but I did not understand its implementation or rather its application completely. Could anyone suggest whether it is this feature that I should be using or is there any other way I could get hold of the pose messages during the execution of my inner loop Thanks.

2015-01-09 14:35:54 -0500 received badge  Famous Question (source)
2015-01-09 14:35:54 -0500 received badge  Notable Question (source)
2015-01-09 14:35:54 -0500 received badge  Popular Question (source)
2015-01-02 15:38:26 -0500 received badge  Famous Question (source)
2015-01-01 21:50:42 -0500 received badge  Notable Question (source)
2014-11-19 02:32:33 -0500 received badge  Famous Question (source)
2014-10-25 22:45:11 -0500 received badge  Notable Question (source)
2014-09-04 06:45:18 -0500 received badge  Popular Question (source)
2014-08-26 04:29:15 -0500 received badge  Famous Question (source)
2014-08-11 04:36:11 -0500 received badge  Famous Question (source)
2014-08-06 21:31:09 -0500 received badge  Notable Question (source)
2014-08-06 16:16:05 -0500 commented answer why does subscriber not automatically subscribe to a topic when publisher suddenly starts publishing?

my bad I missed that part earlier..thanks!!

2014-08-06 16:02:29 -0500 received badge  Popular Question (source)
2014-08-06 15:05:24 -0500 commented answer why does subscriber not automatically subscribe to a topic when publisher suddenly starts publishing?

but thats the problem I am facing. If I start the talker first it works but if I start the talker(publisher) after the subscriber node, it does not. I am trying this with the default beginner_tutorial package. What do you think might be the issue? thanks

2014-08-06 14:42:03 -0500 commented answer why does subscriber not automatically subscribe to a topic when publisher suddenly starts publishing?

I see..so does that mean that the publisher needs to be publishing for the subscriber to subscribe to the topic being published by the publisher? In other words, the talker node needs to be running and publishing before I can run the listener node? thanks a lot

2014-08-06 13:53:31 -0500 asked a question why does subscriber not automatically subscribe to a topic when publisher suddenly starts publishing?

Hi all,

I am having a basic issue with publishing and subscribing to topics. Before I get into the core of the problem, I would like to ask a very simple question with respect to the "beginner_tutorial" package. In this package, there exists the "talker" and the "listener" nodes. When I run the talker node followed by the listener node, the listener subscribes to the topic published by the talker. However, if I run the listener node first it does not subscribe (which is correct as talker is not publishing). But why does it not start subscribing as soon as I run the talker node after a while? Basically, why does the subscriber automatically not understand when the talker starts publishing and latch on to it if I first run the subscriber followed by the publisher node? Thanks a lot.

2014-07-29 00:23:21 -0500 received badge  Enthusiast
2014-07-29 00:23:21 -0500 received badge  Enthusiast
2014-07-23 16:54:33 -0500 asked a question Why does SICK LMS200 not work with angle = 180 and resolution = 0.25

Hi all, I have been trying to perform some laser scanning using LMS200. I am using the sicktoolbox wrapper and setting

rosparam set sicklms/angle 180
rosparam set sicklms/resolution 0.25

But everytime it throws me a warning saying "Unable to set resolution. Using 5.000000e-01 instead of 2.500000e-01" and finally settles with resolution 1.0. However, if I give the combination as (100,0.25) instead of (180,0.25), it works fine and I get the desired resolution. Can anyone throw any light on this strange behavior? Thanks in advance

2014-07-23 16:47:30 -0500 commented answer Changing parameters for SICK laser on Pioneer robots

This might be a long delay in replying. If I pass the parameters as (100,0.25) it works fine but if I want say (180,0.25) as the (angle,resolution) parameter for the SICK LMS 200 laser scanner it throws me this warning "Unable to set resolution. Using 5.000000e-01 instead of 2.500000e-01" but ultimately maintains a resolution of 1 degree. Can you help me in understanding what might be going wrong?

2014-07-22 13:45:43 -0500 commented answer Using CallbackQueue

It might be the reason. Anyway, thanks a lot. In case if anyone finds out why the code doesnt work without mentioning WallDuration, please let me know.

2014-07-22 13:35:51 -0500 commented question How to interpret the meaning of scan_msg?

I am not missing any sequence as per the Header.seq output so I guess it is highly likely that the timing is being affected due to driver setting. I will try to check it out. In case you think there might be some other possibilities please let me know. Thanks

2014-07-21 21:19:27 -0500 received badge  Popular Question (source)
2014-07-21 19:11:23 -0500 received badge  Notable Question (source)
2014-07-21 16:39:33 -0500 commented question How to interpret the meaning of scan_msg?

I made the changes as you mentioned. Even after increasing the buffer to 1000, I still get "Time Difference = 0.1s". Can you shed some light into this. I have provided all the outputs and other things that might give you more information. Thanks

2014-07-21 16:36:52 -0500 edited question How to interpret the meaning of scan_msg?

Hi,

This might be a silly question but I have a small doubt regarding the scan_msg in the Laser_scan topic. I am using SICK LMS-200 laser scanner with Pioneer3DX robot for navigation. As I run my code, I notice that the rostopc /scan tells me that scan_time = 0.013s whereas if I check the computation time within my code using something like ros::Time::now().toSec() (present time - past time) I notice that it takes at least 0.1s between each Callback. I am slightly confused as to why there is a difference between the two as the code that I am running is pretty simple and just prints out the elements of the messages in the /scan topic. One guess at it would be that when I run ros::spin(), it goes through all the topics and this takes time. But considering I am not calling any other topic, I am not sure whether this is the reason. Could anyone please help me in understanding what exactly is this scan_msg and why is it different from the Callback time period? Thanks a lot in advance.

Here is the code snippet:

void scanCallback (const sensor_msgs::LaserScan::ConstPtr& scan_msg)
{
   size_t num_ranges = scan_msg->ranges.size(); 
   std::cout<<"Number of range values: "<<num_ranges;
   std::cout<<"\nangle_min: "<<scan_msg->angle_min;
   std::cout<<"\nangle_max: "<<scan_msg->angle_max;
   std::cout<<"\ntime_increment: "<<scan_msg->time_increment;
   std::cout<<"\nscan_time: "<<scan_msg->scan_time;
   std::cout<<"Time difference: "<<ros::Time::now().toSec() - present_time<<"\n";
   std::cout<<"\nNow looking at the ranges**************************** \n";
   present_time = ros::Time::now().toSec();    // for timing calculation
   std::cout<<"\nFinishing one scan";   
 }

 int main(int argc, char** argv)
 {
   ros::init(argc, argv, "laserdata");
   ros::NodeHandle n;
   ros::Subscriber scan_sub = n.subscribe("scan", 100, scanCallback);  // I changed buffer rate over here
   ros::spin();
 }

On adding the header and executing the code, I get the following output:

Number of range values: 181
angle_min: -1.5708
angle_max: 1.5708
time_increment: 3.7037e-05
scan_time: 0.0133333
Header seq: 13070
stamp: 1405978337.781919948
frame_id: laser

Time difference: 0.107676

Finishing one scan

Also, on checking the rostopic hz /scan (with and without running my code), I get the following

average rate: 9.378
    min: 0.106s max: 0.108s std dev: 0.00049s window: 9
average rate: 9.374
    min: 0.106s max: 0.108s std dev: 0.00069s window: 19
average rate: 9.372
    min: 0.106s max: 0.108s std dev: 0.00076s window: 28
average rate: 9.372
    min: 0.106s max: 0.108s std dev: 0.00073s window: 38
average rate: 9.371
    min: 0.106s max: 0.108s std dev: 0.00077s window: 47
average rate: 9.373
    min: 0.106s max: 0.108s std dev: 0.00078s window: 56
average rate: 9.373
    min: 0.106s max: 0.108s std dev: 0.00076s window: 66
2014-07-21 16:34:00 -0500 received badge  Editor (source)