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

clark's profile - activity

2022-06-21 02:59:43 -0500 received badge  Good Question (source)
2022-01-31 02:23:18 -0500 received badge  Nice Question (source)
2016-03-21 08:56:27 -0500 received badge  Nice Question (source)
2015-04-21 06:24:40 -0500 received badge  Great Answer (source)
2014-03-25 19:02:10 -0500 received badge  Good Answer (source)
2014-01-28 17:27:57 -0500 marked best answer Abnormal in simple rosbridge v2 / turtlesim example

There is a good tutorial for rosbridge v1 quick start, at https://code.google.com/p/brown-ros-pkg/wiki/Quick_start_rosbridge_and_ROS, but I can't find a similar tutorial for rosbridge v2, so I tried to mimic turtlesim with rosbridge 2, based on the example file under rosjs, and here is the link of my html file link text

During testing, I run the following commands in terminal,

roscore
rosrun turtlesim turtlesim_node
rosrun rosbridge_server rosbridge.py

and then load the html file in Firefox.

Basically there are two issues observed,

1 when the 4 buttons are pressed, the turtle never move and rostopic echo /turtle1/command_velocity always give me


linear: 0.0 angular: 0.0


2 the subscription to topic "/turtle/pose" returns undefined and only returns once,

Received message on /turtle1/pose: undefined

Obviously I missed something in the above html file, so appreciate if anyone can give me some clue.

thanks clark

2014-01-28 17:27:44 -0500 marked best answer any example codes for rosbridge 2.0?

The good example codes at http://code.google.com/p/brown-ros-pkg/wiki are all based on rosbridge 1.0; and the example at http://rosbridge.org/doku.php?id=rosbridge_protocol_v2.0 is relatively simple.

Am struggling to write client for rosbridge 2.0 based on the protocol itself... So really appreciate if anybody can give links to example codes for 2.0, such as in C++/Javascript.

2014-01-28 17:25:53 -0500 marked best answer issue on compiling package using opencv

I am trying the HOG based human detection algorithm under ros, and following the source file of opencv/samples/cpp/peopledetect.cpp (This source file can be compiled using g++ without issue on my computer, g++ -o output peopledetect.cpp pkg-config opencv --cflags --libs).

But after putting into an ros package, I can't get the similar codes to compile successfully. I did follow the instructions at www.ros.org/wiki/opencv2 to set CMakeLists.txt and manifest.xml. But I still keep getting the following compile error,


/home/ros/spyrobot/human_detect/src/human_detect.cpp:27:1: error: ‘hog’ does not name a type make[2]: * [CMakeFiles/human_detect.dir/src/human_detect.o] Error 1 make[1]: * [CMakeFiles/human_detect.dir/all] Error 2 make:* [all] Error 2


The error refers to the following two lines which are copied from the peopledetect.cpp source file,

HOGDescriptor hog;

hog.setSVMDetector(HOGDescriptor::getDefaultPeopleDetector());

My current environment, ubuntu 12.04, ROS fuerte, ros-fuerte-opencv2 2.4.0, ros-fuerte-vision-opencv 1.8.2

thanks for your advice in advance

clark


EDIT:

The tricky thing is that I can manually compile the sample peopledetect.cpp file (which also use HOGDescriptor) using, g++ -o test peopledetect.cpp -lopencv_objdetect -lopencv_core -lopencv_highgui -lopencv_imgproc or simply g++ -o test peopledetect.cpp pkg-config opencv --cflags --libs

but why ROS can't compile the package with the similar function call?

PS: Some further info on my pc,

pkg-config --cflags --libs opencv

-I/opt/ros/fuerte/include/opencv -I/opt/ros/fuerte/include -L/opt/ros/fuerte/lib -lopencv_calib3d -lopencv_contrib -lopencv_core -lopencv_features2d -lopencv_flann -lopencv_gpu -lopencv_highgui -lopencv_imgproc -lopencv_legacy -lopencv_ml -lopencv_nonfree -lopencv_objdetect -lopencv_photo -lopencv_stitching -lopencv_ts -lopencv_video -lopencv_videostab

Any further suggestions are welcome.


EDIT 2:

My mistake! I originally wanted to decleare hog as a global variable but put not only its declaration but also the function call

hog.setSVMDetector(HOGDescriptor::getDefaultPeopleDetector())

right after the #include (s)... and it is this silly mistake that caused the compile error.

Anyway, thank Kevin again for the help.

clark

2014-01-28 17:25:37 -0500 marked best answer roslaunch command does not run when put in crontab

I am setting crontab to let my computer to launch certain ros package when it starts up or reboots.

here is the content I put in crontab -e, @reboot bash -c '/home/user/launch.sh'

while the launch.sh file simply contains a single roslaunch command,

!/bin/bash

roslaunch socket_server socket.launch

The above .sh file confirms running fine in terminal, but every time when the pc (re)boots, the roslaunch commmand doesn't run as expected; and I can't even find any records in the sys log file.

Can anybody with experience on cron + ros configuring help?

thanks clark

2014-01-28 17:25:09 -0500 marked best answer OctoMap for collision avoidance / using point clouds

Firstly, following the discussion below, http://answers.ros.org/question/30426/adding-octomap-data-to-planning-scene-in-ros, I understand that the octomap result is relatively easy to further feed to arm navigation. Then I wonder that how about the surface case, i.e., is it possible to make use of the octomap data for mobile navigation in an outdoor terrain environment?

Second question, after an octomap is initialized from a point cloud, is it possible to retrieve the points from the cloud that drop within an voxel, given the voxel index or its cooordinate? I am trying both octomap and pcl/octree, and this question arises from the exercise. More explanation about the differences between octomap and pcl/octree would be great helpful.

2014-01-28 17:24:58 -0500 marked best answer installation of perception_pcl_electric_unstable

Recently I am dealing with surface reconstruction using pcl, and I need the OctreePointCloudSearch class under pcl::octree. But the default pcl version under perception_pcl is only 1.1, and classes like OctreePointCloudSearch are missing in this version.

So following the discussion from this thread, http://answers.ros.org/question/11622/how-do-you-upgrade-pcl-to-the-current-release I download perception_pcl_electric_unstable from http://svn.pointclouds.org/ros/trunk/perception_pcl_electric_unstable/ and rosmake it. Unfortunately I have no idea how to get rid of the following error,
"...... /usr/bin/ld: cannot find -lpcl_range_image_border_extractor collect2: ld returned 1 exit status make[3]: * [../bin/convert_pcd_to_image] Error 1 make[3]: Leaving directory `/home/robot/ros/perception_pcl/pcl_ros/build' ......"

My current setting: ubuntu 11.04 + ros electric

You advice is greatly appreciated.

clark

2014-01-28 17:24:56 -0500 marked best answer how to visualize quadrangle in rviz

I am looking for a proper way to visualize quadrangles in rviz. The quadrangles are from a dynamically updated map representing a terrain environment.

The closest display type I can find in rviz is the 2d map, but it is limited to 2d flat ground while in my case the elevation of cells has to be considered; another close approach is to visualize the vertexes of quadrangle, but no color filling of the quadrangles can be achieved.

thanks for any advices clark

2014-01-28 17:24:41 -0500 marked best answer issue of ground filter in octomap_server

I am testing the octomap_server and I used the sample data from http://vimeo.com/1451349?pg=embed&sec=1451349, which is a pcap file collected from a velodyne 64 laser.

Judged from the video and the pointcloud display in rviz, the ground surface is obviously contained in the data set. In my testing, the base_frame_id is set to "base_footprint" which is exactly located at the ground surface; filter_ground is also set to "true". But the generated octomap never filters the ground... and this is the output from the node.

[INFO] [1329732147.087671086] class OctomapServer starts

[INFO] [1329732147.103789973] filter_ground 1

[WARN][1329732208.260183596] No plane found in cloud.

[WARN][1329732208.260282727] No ground plane found in scan

Thanks for any help.

2014-01-28 17:24:36 -0500 marked best answer issue of default frame_id for velodyne_pointcloud/Transform2

I am testing loading a pcap file and transform velodyne_msgs/VelodyneScan into /velodyne/pointcloud2, and that the converted pointcloud2 data looks not right. And I think that this is caused by the default frame_id setting.

By default, the frame_id of velodyne_msgs/VelodyneScan is "velodyne" and the frame_id for /velodyne/pointcloud2 is "odom", and here is my launch file,


<launch>
  <node pkg="tf" type="static_transform_publisher" name="velodyne_broadcaster" 
        args="0 0 2 0 0 0 base velodyne 10" />
  <node pkg="tf" type="static_transform_publisher" name="base_broadcaster"
        args="0 0 0 0 0 0 odom base 100" />
  <node pkg="tf" type="static_transform_publisher" name="odom_broadcaster"
        args="0 0 0 0 0 0 map odom 100" />

  <node pkg="velodyne_common" type="read" name="read" 
        args="-f $(find velodyne_common)/../velodyne_data_01/unit_46_Monterey_subset.pcap" >
        <param name="frame_id" type="string" value="velodyne" />
  </node>

  <!-- start nodelet manager -->
  <node pkg="nodelet" type="nodelet" name="velodyne_nodelet_manager" 
        args="manager" />

  <!--transform velodyne/packets into pointcloud2 via nodelet -->
  <node pkg="nodelet" type="nodelet" name="transform2" 
        args="load velodyne_pointcloud/Transform2 velodyne_nodelet_manager" > 
  </node>

  <node pkg="rviz" type="rviz" name="rviz" />

</launch>

The original data coordinates are relative to the velodyne frame, yet the converted pointcloud2 shifted down (2 meters, in this case) from the velodyne frame. Then I have to respecify the frame_id for pointcloud2 to "velodyne" in order to locate the resultant pointcloud2 correctly.

So my feeling is that the above default frame_id looks not so reasonable, since typically there is a determinate tf tree in the scenario and the pointcloud2 should not be remapped arbitrarily to a frame other than the default value "velodyne". Correct me if I am wrong.

clark

2014-01-28 17:23:26 -0500 marked best answer need clue for "exit code 40"

When I ran a self-developed ros node via roslaunch, it could run for some time, e.g., 10 mins, and then reports the following error and quit:

"[dm-1] process has died [pid 4365, exit code 40]. log files: /home/robot/.ros/log/0119ddc6-2ad9-11e1-be05-000df06e274c/dm-1*.log"

I couldn't find any info about the exit code 40, so any help will be welcome and appreciated.

2014-01-28 17:23:25 -0500 marked best answer the odom of irobot create is not right when move backward

As stated in the title, when the create robot is moving backwards, the odom value reported for x position is increasing rather than reducing.

I tested both irobot_create_2_1 and turtlebot_node, and the same results observed.

Is this because of the onboard encoder limitation?

2014-01-28 17:22:47 -0500 marked best answer roslaunch pocketsphinx with machine tag

I installed the pocketsphinx package on computer A, and tried to run it in various ways, (1) directly run on computer A, i.e., >> roslaunch pocketsphinx voice_cmd.launch. The recognizer node and voice_cmd_vel node can fully load and function well; plus the recognizer node will pop up a long list of info into the window. (2) from computer B, first ssh into computer A, then run >> roslaunch pocketsphinx voice_cmd.launch, and this also works fine as in (1). (3) from computer B, write a launch file to load voice_cmd.launch on computer A, with machine tag set to A. It becomes weird that the recognizer node hangs in the middle of popping out that long info list, and thus the speech recognition can't continue.

Any tips/suggestions are welcome

2014-01-28 17:22:30 -0500 marked best answer question on one-to-many communication using rosservice

As known from the ROS documentation, message/topic is used for multi-to-multi but one-way communication, while service is recommended in case of request/reply. I suppose ros service is mainly used for one-to-one two-way transport. Then is ros service also suitable for one-to-many communication?

With a simple test program (adapted from the ros service server/client example program in tutorial), I observed that it's no problem for a single ros server to accept multiple client requests from different computers.

Then I can't help wondering that if certain variables/resources on the server side need be processed as response to client request, will a mutex be enough to make sure the shared resources can be properly handled. How does ros service handle requests in the bottom level, like queue?

thanks for the hints/advices in advance.

clark

2013-10-05 05:29:54 -0500 received badge  Notable Question (source)