Ask Your Question

Ramkumar's profile - activity

2019-08-09 01:26:21 -0600 received badge  Taxonomist
2018-02-26 04:59:59 -0600 marked best answer Unable to install pointcloud_to_laserscan ROS Indigo

I am trying to install pointcloud_to_laserscan package in ROS Indigo running in Ubuntu 14.04. When I add the source from git repo and catkin_make I get the following error.

root@ramkumar-Inspiron-7720:/home/ramkumar/catkinws# catkin_make
Base path: /home/ramkumar/catkinws
Source space: /home/ramkumar/catkinws/src
Build space: /home/ramkumar/catkinws/build
Devel space: /home/ramkumar/catkinws/devel
Install space: /home/ramkumar/catkinws/install
####
#### Running command: "cmake /home/ramkumar/catkinws/src -DCATKIN_DEVEL_PREFIX=/home/ramkumar/catkinws/devel -DCMAKE_INSTALL_PREFIX=/home/ramkumar/catkinws/install -G Unix Makefiles" in "/home/ramkumar/catkinws/build"
####
-- Using CATKIN_DEVEL_PREFIX: /home/ramkumar/catkinws/devel
-- Using CMAKE_PREFIX_PATH: /opt/ros/indigo
-- This workspace overlays: /opt/ros/indigo
-- Using PYTHON_EXECUTABLE: /usr/bin/python
-- Using Debian Python package layout
-- Using empy: /usr/bin/empy
-- Using CATKIN_ENABLE_TESTING: ON
-- Call enable_testing()
-- Using CATKIN_TEST_RESULTS_DIR: /home/ramkumar/catkinws/build/test_results
-- Found gtest sources under '/usr/src/gtest': gtests will be built
-- Using Python nosetests: /usr/bin/nosetests-2.7
-- catkin 0.6.11
-- BUILD_SHARED_LIBS is on
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-- ~~  traversing 7 packages in topological order:
-- ~~  - p3dx_control
-- ~~  - depthimage_to_laserscan
-- ~~  - pointcloud_to_laserscan
-- ~~  - openni_tracker
-- ~~  - rosaria
-- ~~  - p3dx_description
-- ~~  - p3dx_gazebo
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-- +++ processing catkin package: 'p3dx_control'
-- ==> add_subdirectory(ua_ros_p3dx/p3dx_control)
-- +++ processing catkin package: 'depthimage_to_laserscan'
-- ==> add_subdirectory(depthimage_to_laserscan-indigo-devel)
-- +++ processing catkin package: 'pointcloud_to_laserscan'
-- ==> add_subdirectory(pointcloud_to_laserscan)
-- Using these message generators: gencpp;genlisp;genpy
CMake Error at /opt/ros/indigo/share/catkin/cmake/catkinConfig.cmake:75 (find_package):
Could not find a package configuration file provided by "tf2_sensor_msgs"
with any of the following names:

tf2_sensor_msgsConfig.cmake
tf2_sensor_msgs-config.cmake

Add the installation prefix of "tf2_sensor_msgs" to CMAKE_PREFIX_PATH or
set "tf2_sensor_msgs_DIR" to a directory containing one of the above files.
If "tf2_sensor_msgs" provides a separate development package or SDK, be
sure it has been installed.
Call Stack (most recent call first):
pointcloud_to_laserscan/CMakeLists.txt:4 (find_package)


-- Configuring incomplete, errors occurred!
See also "/home/ramkumar/catkinws/build/CMakeFiles/CMakeOutput.log".
See also "/home/ramkumar/catkinws/build/CMakeFiles/CMakeError.log".
Invoking "cmake" failed

Please help

2016-07-25 03:49:52 -0600 received badge  Famous Question (source)
2015-11-04 14:31:03 -0600 received badge  Nice Answer (source)
2015-10-07 08:54:21 -0600 marked best answer Kinect in gazebo for ROS

Hey I am new to Gazebo. My project requires kinect mounted over Pioneer 3DX to track humans in environment as one of its part.. I wanted to know hot to add kinect sensor to my Pioneer 3DX model in Gazebo and receive data in a similar fashion as done by Kinect nodes for ROS. Thanks in advance..

2015-07-29 01:20:41 -0600 received badge  Teacher (source)
2015-07-29 01:20:41 -0600 received badge  Necromancer (source)
2015-07-24 03:29:50 -0600 received badge  Famous Question (source)
2015-07-24 03:29:50 -0600 received badge  Notable Question (source)
2015-06-03 23:44:31 -0600 received badge  Famous Question (source)
2015-06-03 01:41:53 -0600 received badge  Student (source)
2015-06-03 01:41:39 -0600 marked best answer RosAria ArRobot::myPacketReader: Timed out

i am working with Pioneer 3DX and using RosAria library to control the robot. The rosaria library was working fine. But suddenly today I encountered this problem and I am not able to solve. On running rosaria rode using 'rosrun rosaria RosAria' I face the following serial error. I have set full permissions for my serial port.

ramkumar@ramkumar-Inspiron-7720:~$ rosrun rosaria RosAria rosrun rosaria RosAria _port:=/dev/ttyUSB0
[ INFO] [1422207128.792943336]: RosAria: using port: [/dev/ttyUSB0]
Could not connect to simulator, connecting to robot through serial port /dev/ttyUSB0.
Syncing 0
Syncing 1
Syncing 2
Connected to robot.
Name: IIT-madras_3906
Type: Pioneer
Subtype: p3dx-sh
ArConfig: Config version: 2.0
Loaded robot parameters from p3dx-sh.p
ArRobotPacketReceiver::receivePacket: bad packet, bad checksum
ArRobotConnector: Connecting to MTX batteries (if neccesary)...
ArRobotConnector: Connecting to MTX sonar (if neccesary)...
[ INFO] [1422207129.572967595]: Setting TicksMM from ROS Parameter: 128
[ INFO] [1422207129.575718946]: Setting DriftFactor from ROS Parameter: 0
[ INFO] [1422207129.577907662]: Setting RevCount from ROS Parameter: 16570
ArRobot::myPacketReader: Timed out (4) at 1002 (200 into cycle after sleeping 200)
[ INFO] [1422207129.817593371]: RosAria: publishing new recharge state 0.
[ INFO] [1422207129.817769667]: RosAria: publishing new motors state 0.
ArRobot::myPacketReader: Timed out (4) at 1203 (200 into cycle after sleeping 200)
ArRobot::myPacketReader: Timed out (4) at 1404 (200 into cycle after sleeping 200)
ArRobot::myPacketReader: Timed out (4) at 1604 (200 into cycle after sleeping 200)
ArRobot::myPacketReader: Timed out (4) at 1804 (200 into cycle after sleeping 200)
ArRobot::myPacketReader: Timed out (4) at 2004 (200 into cycle after sleeping 200)
ArRobot::myPacketReader: Timed out (4) at 2205 (200 into cycle after sleeping 200)
ArRobot::myPacketReader: Timed out (4) at 2405 (200 into cycle after sleeping 200)
ArRobot::myPacketReader: Timed out (4) at 2605 (200 into cycle after sleeping 200)
ArRobot::myPacketReader: Timed out (4) at 2805 (200 into cycle after sleeping 200)
ArRobot::myPacketReader: Timed out (4) at 3006 (200 into cycle after sleeping 200)
ArRobot::myPacketReader: Timed out (4) at 3206 (200 into cycle after sleeping 200)
ArRobot::myPacketReader: Timed out (4) at 3406 (200 into cycle after sleeping 200)
ArRobot::myPacketReader: Timed out (4) at 3606 (200 into cycle after sleeping 200)
ArRobot::myPacketReader: Timed out (4) at 3807 (201 into cycle after sleeping 200)
ArRobot::myPacketReader: Timed out (4) at 4007 (200 into cycle after sleeping 200)
ArRobot::myPacketReader: Timed out (4) at 4207 (200 into cycle after sleeping 200)
ArRobot::myPacketReader: Timed out (4) at 4407 (200 into cycle after sleeping 200)
ArRobot::myPacketReader: Timed out (4) at 4607 (200 into cycle after sleeping 200)
ArRobot::myPacketReader: Timed out (4) at 4808 (200 into cycle after sleeping 200)
ArRobot::myPacketReader: Timed out (4) at 5008 (200 into cycle after sleeping 200)
ArRobot::myPacketReader: Timed out (4) at 5208 (200 into cycle after sleeping 200)
ArRobot::myPacketReader: Timed out (4) at 5408 (200 into cycle after sleeping 200)
ArRobot::myPacketReader: Timed out (4) at 5609 (201 into cycle after sleeping 200)
ArRobot::myPacketReader: Timed out (4) at 5809 (200 ...
(more)
2015-06-03 01:40:21 -0600 received badge  Famous Question (source)
2015-06-03 01:40:21 -0600 received badge  Notable Question (source)
2015-05-29 06:41:41 -0600 received badge  Famous Question (source)
2015-03-26 00:20:33 -0600 marked best answer Understanding /camera/depth/points

What does the value in the 'data' field of the data published by /camera/depth/points represent? They are supposed to represent the distance of every pixel from the Kinect center point? How to I convert the data generated as point cloud into corresponding cartesian 3D coordinates ? An array of size [4915200x1] is generated. Which means distance to each pixel is represented using 16 entries in matrix (because 480 x 640 x 16 = 4915200). How do I understand this. Please explain the program behind visualization of this pointcloud data in rviz .

I kept my kinect in front of an plain 2D wall parallel with it. I thought that I will get a matrix with uniform value through out as the wall is equidistant from kinect. But I get a data which I could not understand and decode!

2015-03-26 00:19:28 -0600 received badge  Famous Question (source)
2015-03-20 04:52:49 -0600 received badge  Famous Question (source)
2015-02-27 07:49:57 -0600 received badge  Famous Question (source)
2015-02-13 15:53:15 -0600 received badge  Popular Question (source)
2015-02-13 04:12:28 -0600 received badge  Notable Question (source)
2015-02-07 12:49:31 -0600 received badge  Famous Question (source)
2015-02-07 08:28:16 -0600 asked a question Publish fresh Laserscan type msg in topic [python]

I want to publish a message with all the attributes manually assigned in a topic. I took LaserScan message type as example and assigned the parameters as in the below code. But I am facing various errors.

The code is

#!/usr/bin/env python
import rospy
import numpy
import sys
import sensor_msgs.msg
import std_msgs.msg

x=[5.0]*500
z=numpy.transpose(x)
def talker():
    global x
    pub = rospy.Publisher('chatter', LaserScan, queue_size=10)
    rospy.init_node('talker', anonymous=True)
    rate = rospy.Rate(10) # 10hz
    pub.angle_min=50.0
    print 'plisng'
    l=sensor_msgs.msg.LaserScan
    s=std_msgs.msg.Header
    s.frame_id='xyz'
    l.header=s
    l.angle_min=61.5
    l.angle_max=118.5
    l.ranges=z
    #l.serialize(l)
    #l.serialize()
    pub.publish(l)
    rate.sleep()
    rospy.spin()

if __name__ == '__main__':
  while 1:
   talker()
   if KeyboardInterrupt:
      break

I am getting the following error.

Traceback (most recent call last): File "talker.py", line 37, in <module> talker() File "talker.py", line 31, in talker pub.publish(l) File "/opt/ros/indigo/lib/python2.7/dist-packages/rospy/topics.py", line 834, in publish self.impl.publish(data) File "/opt/ros/indigo/lib/python2.7/dist-packages/rospy/topics.py", line 1018, in publish serialize_message(b, self.seq, message) File "/opt/ros/indigo/lib/python2.7/dist-packages/rospy/msg.py", line 152, in serialize_message msg.serialize(b) TypeError: unbound method serialize() must be called with LaserScan instance as first argument (got StringO instance instead)

So I tried uncommenting the l.serialize(l) function call line in all fashions and got similar error again.

` Traceback (most recent call last):File "talker.py", line 37, in <module>
  talker() File "talker.py", line 29, in talker 
  l.serialize(l)
  TypeError: unbound method serialize() must be called with LaserScan instance as first argument (got type instance instead)`

Please help me out. I just want to publish a user defined message of LaserScan datatype. Also they way I used to access the frame_id field of /chatter topic is the only way or there is a better way?

Thanks in advance

2015-02-07 04:52:36 -0600 commented question pointcloud_to_laserscan package not working in ROS indigo

ya okay @ahendrix

2015-02-06 14:47:47 -0600 answered a question pointcloud_to_laserscan package not working in ROS indigo

I have attached the rosbag which contains the data in topics /cloud_in /rosout and erroneous /scan. Each topics have 20 msgs published. I have compressed the bag using rosbag compress . Please use rosbag decompress 2015-02-07-02-09-32.bag before starting analyse.

Thanks in advance :)

2015-02-06 14:22:54 -0600 received badge  Notable Question (source)
2015-02-06 13:34:41 -0600 commented answer need to publish LaserScan topic

I have all the deatils.. How do I publish all of them together!?

2015-02-05 11:40:41 -0600 received badge  Notable Question (source)
2015-02-05 10:45:41 -0600 received badge  Notable Question (source)
2015-02-05 09:42:20 -0600 received badge  Notable Question (source)
2015-02-03 04:01:14 -0600 received badge  Popular Question (source)
2015-02-02 14:44:13 -0600 commented answer printing kinect point cloud data alone gives garbage

@Dan Lazewatsky If I use the latter method of converting the depthimage into grayscale image, how can I convert that into depth in some unit. As the grayscale value in the image are relative to largest depth. Am i right? Is there any const conversion factor between grayscale value and deptin in 'm'?

2015-02-02 10:22:18 -0600 received badge  Popular Question (source)
2015-02-02 06:41:21 -0600 received badge  Popular Question (source)
2015-02-02 00:34:55 -0600 received badge  Notable Question (source)
2015-02-01 15:03:42 -0600 asked a question pointcloud_to_laserscan package not working in ROS indigo

The pointcloud_to_laserscan package is not working properly in ROS Indigo. The Indigo build is done recently and seems to contain some error. As required by the node I have published the pointcloud data from Kinect in PointCloud2 format in /cloud_in topic. But the laserscan data that must be produced and published by Kinect in /scan topic seems erroneous. It returns an array full of 'Inf'. Please fix the error.

My code for publishing in /cloud_in is as follows,

#!/usr/bin/env python
import roslib
import rospy
import geometry_msgs.msg
from sensor_msgs.msg import PointCloud2

def callback(data):
    pub = rospy.Publisher('/cloud_in', PointCloud2,queue_size=10)
    pub.publish(data)

def pcl_2D():
    rospy.init_node('pcl_2D', anonymous=True)
    global listener 
    rospy.Subscriber("/camera/depth/points", PointCloud2, callback)
    rospy.spin()

if __name__=='__main__':
    pcl_2D()

I have attached the rosbag which contains the data in topics /cloud_in /rosout and erroneous /scan. Each topics have 10 msgs published. I have compressed the bag using rosbag compress . Please use rosbag decompress 2015-02-07-02-09-32.bag before starting analyse.

Attachment link: https://drive.google.com/file/d/0B7uP...

Thanks in advance :)

2015-02-01 10:54:26 -0600 commented answer printing kinect point cloud data alone gives garbage

Thanks for your reply. I will look into it. I want the x,y,z data without converting the pointcloud2 into .pcd file. Is it possible to get that?

2015-02-01 05:28:00 -0600 commented answer Publishing cloud message of pcl::PointXYZ type

Is it enough if I import PointXYZ and publish using that datatype in python? Does the conversion take place implicitly?

2015-02-01 05:28:00 -0600 received badge  Commentator
2015-02-01 04:55:20 -0600 asked a question printing kinect point cloud data alone gives garbage

I have subscribed to /camera/depth/points to get the PointCloud2 data from kinect. When I try to print the PointCloud2 data alone leaving out the headers, height and width etc i get a pool of garbage values. How do i print the 'data' field alone.? I am able to get the output without any garbage if i print the entire msg.

Here is my code.

#!/usr/bin/env python
import roslib
import rospy
from sensor_msgs.msg import PointCloud2

def callback(msg):
    print len((data.data))
    print msg.data
    listener.unregister()

def kinect_depth():
    rospy.init_node('kinect_depth', anonymous=True)
    global listener 
    listener = rospy.Subscriber("/camera/depth/points", PointCloud2, callback)
    rospy.spin()

if __name__=='__main__':
    kinect_depth()

Thanks in advance.