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

arttp2's profile - activity

2023-03-12 12:46:10 -0500 received badge  Good Question (source)
2022-04-12 16:39:42 -0500 received badge  Nice Question (source)
2021-04-09 11:14:20 -0500 received badge  Nice Question (source)
2019-07-22 01:35:25 -0500 received badge  Famous Question (source)
2018-11-19 05:19:01 -0500 marked best answer OpenNI2Driver, No matching device found

EDIT 3:

The issue returns if the package is launched in superuser mode.


Hello all,

I have just installed ROS Indigo on my turtlebot PC having Ubuntu 14.04.02 which was just upgraded from Ubuntu 12. Earlier the turtlebot PC had Hydro. The problem I am describing hence was not present in the hydro installation.

On running,

roslaunch openni2_launch openni2.launch ,

I am getting the following error:

[ INFO] [1455122966.352999612]: Initializing nodelet with 4 worker threads.
[ INFO] [1455122968.132593659]: No matching device found.... waiting for devices. Reason: std::string openni2_wrapper::OpenNI2Driver::resolveDeviceURI(const string&) @ /tmp/binarydeb/ros-indigo-openni2-camera-0.2.5/src/openni2_driver.cpp @ 631 : Invalid device number 1, there are 0 devices connected.

I have tried the following solutions:

roslaunch freenect_launch freenect.launch : Does not work

https://github.com/turtlebot/turtlebo... : Does not work

I also tried installing all sorts of drivers for the Kinect on turtlebot. The kinect works on other software giving me RGB as well as Depth sensing but still gmapping or any node requiring Kinect is ROS does not work probably because ROS Indigo uses OpenNi2 and not the driver I tested my kinect.

Thanks for the read.

EDIT_1:

I just got hold of this page regarding migration of turtlebot from Hydro to Indigo

http://wiki.ros.org/Robots/TurtleBot/...

Though I have set up the environment variable export TURTLEBOT_3D_SENSOR=kinect in my ~/.bashrc file, I do not know how to update to the new driver and get any calls from the existing ROS packages like gmapping to stop looking for OpenNI2.

EDIT_2:

Should I do a source install because the deb install is still calling OpenNi2 drivers instead of Freenect for Kinect?

Is there a way to substitute OpenNI2 drivers with freenect, or any working driver in turtlebot_navigation package.

2018-06-29 06:36:23 -0500 marked best answer Subscribing and publishing in the same node

Edit: What I am trying to accomplish is getting multiple nodes (each node representing a robot) to share their exploration data. To achieve this sharing of data, I thought publishing to the same ros_topic would do the task. To secure the sharing, I was thinking to add multi-threading via mutex. I am yet to write code for sharing map, but I am trying to proceed as indicated by the code below. The reason I am trying to subscribe and publish in the same topic is because I want the functionality where I get the latest object from the ros_topic, add new data to the object, then publish it.


I am trying to subscribe and publish in the same node. I have two such nodes (arbitrary names) -

listener_talker_node

and

talker_listener_node

#include <ros/ros.h>
#include <std_msgs/String.h>
#include <sstream>
void chatterCallback(const std_msgs::String::ConstPtr& msg)
{
  ROS_INFO("I heard: [%s]", msg->data.c_str());
}
int main(int argc, char **argv)
{
  ros::init(argc, argv, "listener_talker");
  ros::NodeHandle n;   
  ros::Publisher chatter_pub = n.advertise<std_msgs::String>("chatter_by_listener_talker", 1000);
  ros::Rate loop_rate(10);
  int count = 0;
  while (ros::ok())
  {
    ros::Subscriber sub = n.subscribe("chatter_by_talker_listener", 1000, chatterCallback);
    loop_rate.sleep();
    std_msgs::String msg;
    std::stringstream ss;
    ss << "listener_talker says: hello world " << count;
    msg.data = ss.str();
    ROS_INFO("%s", msg.data.c_str());
    loop_rate.sleep();
    chatter_pub.publish(msg);
    ros::spinOnce();
    loop_rate.sleep();
    ++count;
  }
  return 0;
}

The result that I expect is:

Terminal One:

The following two statements repeating till SIGINT received.

[ INFO] [1452183178.353935870]: talker_listener says: hello world 6
[ INFO] [1452182374.277333351]: I heard: [listener_talker says: hello world 82]

Terminal Two:

The following two statements repeating till SIGINT received.

[ INFO] [1452183178.353935870]: listener_talker says: hello world 82
[ INFO] [1452182374.277333351]: I heard: [talker_listener says: hello world 6]

I have tried obtain the above result in two ways:

  1. Both nodes publish and subscribe to the same topic
  2. There are two topics, eg. Topic A, Topic B. node1 subscribes to TopicA and publishes to TopicB. Similarly for node2.

Instead I only get the print statement of the Publisher ie.

In Terminal 1:

 [ INFO] [1452183178.353935870]: listener_talker says: hello world 82
 [ INFO] [1452183178.353935870]: listener_talker says: hello world 83
 ....

In Terminal 2:

[ INFO] [1452183178.353935870]: talker_listener says: hello world 6
[ INFO] [1452183178.353935870]: talker_listener says: hello world 7
....
2018-03-24 19:58:35 -0500 received badge  Notable Question (source)
2018-03-24 19:58:35 -0500 received badge  Famous Question (source)
2017-12-20 02:25:43 -0500 received badge  Famous Question (source)
2017-10-17 09:12:48 -0500 received badge  Famous Question (source)
2017-07-06 20:59:36 -0500 marked best answer How to compile the listener.cpp and talker.cpp without cmake

Upon reading the following tutorial Simplest ROS tutorial, I wanted to compile the listener.cpp and talker.cpp given here.

I am using the following command, as directed by the tutorial:

g++ listener.cpp -o listener_node -I/opt/ros/indigo/include -L/opt/ros/indigo/lib -Wl,-rpath,/opt/ros/indigo/lib -lroscpp -lrosconsole -lrostime

I get the following error:

/usr/bin/ld: /tmp/ccbskyfi.o: undefined reference to symbol '_ZN3ros13serialization18throwStreamOverrunEv'
/opt/ros/indigo/lib/libroscpp_serialization.so: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status

How can I resolve the issue and run the code?

** I did not include the message header files since they should already be included by:

-I/opt/ros/indigo/include -L/opt/ros/indigo/lib
2017-06-28 10:39:11 -0500 received badge  Famous Question (source)
2017-03-29 03:43:41 -0500 received badge  Famous Question (source)
2017-02-23 15:15:57 -0500 received badge  Notable Question (source)
2016-12-13 00:41:16 -0500 received badge  Notable Question (source)
2016-12-12 13:38:32 -0500 received badge  Popular Question (source)
2016-10-27 20:07:54 -0500 commented answer How to get laser data in gazebo?

If you are not able to achieve your targets this way, then read this: Navigation

It has a steep learning curve.

2016-10-27 20:07:04 -0500 commented answer How to get laser data in gazebo?

Do you want your robot to move in straight line between start to goal? Probably not.

 $ rostopic list

This command will display the name of the topic where Gazebo is publishing laser scan data. Subscribe it in a node. Use it to guide your robot by giving appropriate /cmd_vel values.

2016-10-27 04:42:04 -0500 received badge  Popular Question (source)
2016-10-26 14:27:08 -0500 answered a question How to get laser data in gazebo?

Gazebo should automatically publish laser scan data. Use $ rostopic list to find the name of that topic.

The simplest way would be to publish your wheel velocity to /cmd_vel and by trial and error check if you have reached your goal.

If this is very inefficient for you then I would suggest you look at the ROS Navigation stack. Classify your problem according to the tools the stack offers.

2016-10-26 14:18:32 -0500 commented question How to connect TF for multiple robots in SLAM

According to the image in Update 2, the transform from map to odom (robot_x) exists. Is it even feasible to carry out independent SLAM from 2 different robots in the same .world and visualize it in the same Rviz console. This is what I want to do.

2016-10-25 07:38:05 -0500 commented question subsribe to a topic and publish at the same time
2016-10-25 07:29:58 -0500 answered a question How I can add laser to my diff drive robot in gazebo?

This would help you install a laser sensor in your Gazebo model. Gazebo Tutorial: Adding a Laser

This would only let you mount this device. For controlling it, you would need ROS nodes. You can also control it using Gazebo Plugins.

2016-10-25 00:22:56 -0500 received badge  Student (source)
2016-10-24 17:25:25 -0500 commented question How to connect TF for multiple robots in SLAM

I added the following lines in the launch file after the slam_gmapping node command

<param name="odom_frame" value="robot_1/odom"/>
<param name="base_frame" value="robot_1/base_link" />

This connected the tree. I still have not yet resolved the issue of common map

2016-10-24 15:58:45 -0500 asked a question How to connect TF for multiple robots in SLAM

Update2: After making the changes mentioned in the comment about rosparams, I was able to generate the following TF tree. image description

Yet the map is not getting constructed the way it does for the single robot. Like I am using the stage sim of the navigation_stage package in Indigo


Update1:

No transform from [robot_0/map] to [map]

After resolving the issue of base scan as mentioned in my comment, i am not able to get a common correct map.


Hi,

I have 3 pr2 in Stage Simulator trying SLAM. Single Robot version works correctly but tweaking the same launch files and world files seems to launch correctly expect it does not show the laser scans in RViz.

Here is the laser scan error:

For frame [/robot_0/base_laser_link]: No transform to fixed frame [map]. TF error: [Could not find a connection between 'map' and 'robot_0/base_laser_link' because they are not part of the same tree.Tf has two or more unconnected trees.]

I am also attaching the output of rosrun tf view_frames which will clarify the issue here. image description

Please let me know how to join the odom from individual to global tf frame such that all the robots can simultaneously project their scans in Rviz

2016-09-21 09:07:07 -0500 received badge  Popular Question (source)
2016-09-21 09:07:07 -0500 received badge  Famous Question (source)
2016-09-21 09:07:07 -0500 received badge  Notable Question (source)
2016-09-10 17:17:04 -0500 asked a question Recovery Behaviour Plugin not loading

I am using Husky in Gazebo simulation. Because it is not circular in shape, rotate recovery does not help much. So I am trying to use a plugin.

The Plugin is located in my catkin_ws.

rospack plugins --attrib=plugin nav_core correctly lists the following: straf_recovery /home/ted/catkin_ws/src/straf_recovery/straf_recovery_plugin.xml

and here is how I have modified the move_base.launch file:

<arg name="recovery_plugin" default="straf_recovery"/>

<node pkg="move_base" type="move_base" respawn="false" name="move_base" output="screen"> <param name="recovery_behaviors" value="$(arg recovery_plugin)"/>

But during runtime i get the error: The recovery behavior specification must be a list, but is of XmlRpcType 4.

2016-09-07 05:23:23 -0500 marked best answer Not able to spawn basic shapes in rviz

I am following the tutorial on rviz here

But i am not able to correct the TF global issue as in the screenshot. rviz

2016-09-07 05:20:29 -0500 received badge  Famous Question (source)
2016-08-25 05:01:36 -0500 received badge  Notable Question (source)
2016-08-18 16:03:07 -0500 received badge  Popular Question (source)
2016-08-18 16:03:07 -0500 received badge  Notable Question (source)
2016-08-18 16:03:07 -0500 received badge  Famous Question (source)
2016-06-28 18:17:12 -0500 received badge  Famous Question (source)
2016-03-23 14:28:22 -0500 received badge  Popular Question (source)
2016-03-08 17:56:14 -0500 asked a question A more risk taking move_base

I am using turtlebot gazebo simulation. I launched the turtlebot_world, demo_amcl and demo_gmapping launch files. I am sending goal positions to the turtlebot using a custom node that sends the turtlebot 1 metre forward. It is the most basic move_base client node that is found in tutorials available on the web.

The difficulty I find in using that is that less than 50 % of the time does it successfully send the turtlebot to the desired location. And it does that swirling on its axis trying to map its environment This happens whether I use the goal_position_node or the 2DNav Goal Tool in Rviz.

Is there a way to make the current move_base functionality better by a simple fine-tuning of parameters or there already exists a much more risk-taking alternative to move_base. Otherwise would using a custom node which publishes to cmd_vel using laser_scan data be a better option.

2016-03-03 18:46:13 -0500 asked a question tf2/LinearMath/btVector3.h missing in ROS Indigo

Hi,

I am trying to use a rosbuild based explorer package in ROS Indigo. During compilation it gives the following error:

fatal error: tf2/LinearMath/btVector3.h: No such file or directory
#include <tf2/LinearMath/btVector3.h>

I searched for the file but it was not present. Is there an alternative libraries in Indigo or higher versions of ROS or how should I install this library?

Thanks.