instruction
stringlengths 40
28.9k
|
---|
This tutorial shows how to do it with C++ : http://wiki.ros.org/actionlib_tutorials/Tutorials/Writing%20a%20Callback%20Based%20Simple%20Action%20Client
Does anyone know how to do it in Python?
Originally posted by Mehdi. on ROS Answers with karma: 3339 on 2014-06-05
Post score: 0
|
Dear all,
As we know ROS is not a RT system (due to its use of TCP/IP, memory allocations in messages...). Hence I was wondering whether you could build systems such as the one in this Maxon Epos 3 EtherCAT demo with ROS.
I guess that a typical ROS architecture will have the high level planification computed onto the ROS PC (i.e. the desired joints position and velocity will be computed within ROS). Now what I understand is that if the low level controllers do not receive these instructions at the same time (due to non-RT transport) then the instructions will not be executed simultaneously by the motors. This would result in the 2 wheels shown in the video not aligned well enough for the pins of one wheel to match the holes of the other wheel.
Am I right? If I am wrong, does this mean the +-1 ms error typically found in ROS transport is negligible for such mouvements coordination ? I fear you'll tell me it depends on the speed and the configuration of the system and task and there is no other way but trying... ;)
Thanks,
Antoine.
Originally posted by arennuit on ROS Answers with karma: 955 on 2014-06-06
Post score: 1
|
Hi, i want to read information from a .txt file and then use it in a ros node.
thanks
Originally posted by nat on ROS Answers with karma: 3 on 2014-06-06
Post score: 0
|
I'm starting with launch files and I couldn't find any tutorial about it.
If you can share any paper, guide or explanatory website I would really appreciate it.
In addition, I want to put an "if" inside the launch file in order to create a node only IF it doesn't exits yet. ¿How can I do it?
Originally posted by arenillas on ROS Answers with karma: 223 on 2014-06-06
Post score: 1
|
Hi, I am using the hydro-devel branch of the universal_robot package to attempt to control a UR-5. I start move_group and moveit_rviz and rviz loads properly and displays the correct current state of the arm. I am also able to plan movements for the arm properly, however, every time I try to execute those planned movements, this shows up in moveit's terminal window:
EDIT: (text would not show up properly, here is a pastebin link: pastebin.com/e0VGVdFU )
it appears as though I do not have arm_controller either installed or initialized properly, and I have not been able to find any information relating to the installation or setup of this package.
Originally posted by airplanesrule on ROS Answers with karma: 110 on 2014-06-06
Post score: 0
|
Hello all.
Trying to get started with ROS, but not always having my development hardware with me, I thought of using a virtual machine.
Turns out I found at least two option of Ubuntu and some other distro with ROS already installed. Great, right ?
In theory they are Open Virutal Format, BUT, trying to deploy them simply does not work. It seems that the schema reading the internal XML file cannot find the expected information.
I've tried this with ESXI 4.0, 4.1 and 5.5, with pretty much the same result, and I am assuming those images must run only under QEMU or similar.
Does anyone know of a VMware-compatible image I could use ?
Thank you.
Originally posted by ccapriotti on ROS Answers with karma: 255 on 2014-06-06
Post score: 0
|
I download the latest updated navigation package from github.And I come across a problem .move_base crashed when I call clear_costmaps service at high rate,such as 2Hz.
below is the error infomation:
terminate called after throwing an instance of 'std::bad_alloc'
what(): std::bad_alloc
[move_base-1] process has died [pid 16226, exit code -6, cmd /home/robocup/catkin_ws/devel/lib/move_base/move_base /move_base/clear_costmaps:=/clear_costmaps __name:=move_base __log:=/home/robocup/.ros/log/ad85e5de-ed8f-11e3-b90b-0015005e1628/move_base-1.log].
log file: /home/robocup/.ros/log/ad85e5de-ed8f-11e3-b90b-0015005e1628/move_base-1*.log
Has anyone met the problem before?Any advice will be appreciated!
Originally posted by Yuichi Chu on ROS Answers with karma: 148 on 2014-06-06
Post score: 0
|
I used Eigen library for my program and found that matrix calculation is very slow(Just "for loop" is faster !!).
I think that optimization is not carried out when making the program.
How can I optimize the program ?
Any good catkin option for optimization ?
Thanks in advance.
Originally posted by moyashi on ROS Answers with karma: 721 on 2014-06-06
Post score: 4
|
Hello, I am using ROS groovy and I have created a .cpp file that is suppose to use the command_velocity topic in conjunction with ros turtlesim to move the simulated turtlebot in a direction, When I compiled my code everything went fine with catkin_make. Now that I run my code though it seems like the command_velocity topic is not being created or anything is being published at all.
#include <ros/ros.h>
#include <geometry_msgs/Twist.h>
int main(int argc, char **argv){
ros::init(argc, argv, "move");
ros::NodeHandle n;
ros::Publisher move_bot = n.advertise<geometry_msgs::Twist>("cmd_vel_mux/input/teleop",1);
geometry_msgs::Twist vel;
vel.angular.z = 1.5;
vel.linear.x = 1.5;
move_bot.publish(vel);
ros::spin();
return 0;
}
I am not sure what the problem is and I am fairly new to ROS programming any insight would be appreciated, thank you.
Originally posted by choog on ROS Answers with karma: 101 on 2014-06-06
Post score: 0
|
Hello,
I know this question have been asked before, but i couldnt find out how does it works here on Version2 of RGBDslam.
How can i get the coordinates of localization?
And how to use /tf properly?
thanks
best
Michael
Originally posted by Miško on ROS Answers with karma: 31 on 2014-06-06
Post score: 0
Original comments
Comment by TSC on 2014-06-09:
Looking forward for that too as I need to send them to a FMU of a quadrotor for autonomous nav!
|
Hello,
I've been building a custom robot in gazebo. This robot has two laser scanners, one on each side facing outward (not forward). When running amcl, the laser scans are 90 degrees off of where they should be. If I set the 2d nav position to the correct position, the laser scans are 90 degrees off. If I set it 90 degrees offset, the laserscans are correct. The odd thing is, no part of my urdf is rotated 90 degrees (except the wheels). Here is my process:
I start up gazebo and load up my model. Here are the urdf laser scan links and the laser scan plugin. There are no rpy rotations at any links above the laser scans.
<link name="right_scanner">
<visual>
<origin xyz="0.0 0 0" rpy="0 0 0"/>
<geometry>
<box size="0.05 0.05 0.1"/>
</geometry>
</visual>
<collision>
<geometry>
<box size="0.05 0.05 0.1"/>
</geometry>
</collision>
<inertial>
<mass value="1e-5" />
<inertia ixx="1e-3" ixy="0" ixz="0" iyy="1e-3" iyz="0" izz="1e-3" />
</inertial>
</link>
<joint name="right_scanner_joint" type="fixed">
<axis xyz="0 0 0" />
<origin xyz="${0.05/2} -${chair_length/2 - 0.05/2 + chair_length/8} ${chair_height/16 + 0.05}" rpy="0 0 0"/>
<parent link="right_bar"/>
<child link="right_scanner"/>
</joint>
<link name="left_scanner">
<visual>
<origin xyz="0.0 0 0" rpy="0 0 0"/>
<geometry>
<box size="0.05 0.05 0.1"/>
</geometry>
</visual>
<collision>
<geometry>
<box size="0.05 0.05 0.1"/>
</geometry>
</collision>
<inertial>
<mass value="1e-5" />
<inertia ixx="1e-3" ixy="0" ixz="0" iyy="1e-3" iyz="0" izz="1e-3" />
</inertial>
</link>
<joint name="left_scanner_joint" type="fixed">
<axis xyz="0 0 0" />
<origin xyz="-${0.05/2} -${chair_length/2 - 0.05/2 + chair_length/8} ${chair_height/16 + 0.05}" rpy="0 0 -3.14"/>
<parent link="left_bar"/>
<child link="left_scanner"/>
</joint>
<gazebo reference="right_scanner">
<sensor type="gpu_ray" name="head_hokuyo_sensor">
<pose>0 0 0 0 0 0</pose>
<visualize>true</visualize>
<update_rate>40</update_rate>
<ray>
<scan>
<horizontal>
<samples>720</samples>
<resolution>1</resolution>
<min_angle>-1.57079633</min_angle>
<max_angle>1.57079633</max_angle>
</horizontal>
</scan>
<range>
<min>0.10</min>
<max>30.0</max>
<resolution>0.01</resolution>
</range>
<noise>
<type>gaussian</type>
<mean>0.0</mean>
<stddev>0.01</stddev>
</noise>
</ray>
<plugin name="gazebo_ros_head_hokuyo_controller" filename="libgazebo_ros_gpu_laser.so">
<topicName>/wheelchair_lasers/right</topicName>
<frameName>right_scanner</frameName>
</plugin>
</sensor>
</gazebo>
<gazebo reference="left_scanner">
<sensor type="gpu_ray" name="head_hokuyo_sensor2">
<pose>0 0 0 0 0 0</pose>
<visualize>false</visualize>
<update_rate>40</update_rate>
<ray>
<scan>
<horizontal>
<samples>720</samples>
<resolution>1</resolution>
<min_angle>-1.57079633</min_angle>
<max_angle>1.57079633</max_angle>
</horizontal>
</scan>
<range>
<min>0.10</min>
<max>30.0</max>
<resolution>0.01</resolution>
</range>
<noise>
<type>gaussian</type>
<mean>0.0</mean>
<stddev>0.01</stddev>
</noise>
</ray>
<plugin name="gazebo_ros_head_hokuyo_controller2" filename="libgazebo_ros_gpu_laser.so">
<topicName>/wheelchair_lasers/left</topicName>
<frameName>left_scanner</frameName>
</plugin>
</sensor>
</gazebo>
I then run robot_pose_ekf, robot_state_publisher.
Lastly amcl:
<node name="map_server" pkg="map_server" type="map_server" args="$(find wheelchair_mapping)/map.yaml" />
<node name="amcl" pkg="amcl" type="amcl" output="screen">
<remap from="scan" to="/wheelchair_lasers/right" />
<param name="odom_frame_id" value="odom_combined"/>
<param name="base_frame_id" value="base_link"/>
</node>
Tf Frames: I've tried changing the left_scanner to be of the same tf as the rest of the robot, same results. I cannot upload files yet, not enough karma.
tf_vis
tf_tree
One possible hack fix that may shed light on the problem.
rosrun tf static_transform_publisher 0 0 0 0 1.5 /map /odom 10
Fixes the problem, so it's the transformation between odom and map. My odometry is simply created by gazebo:
<gazebo>
<plugin name="differential_drive_controller" filename="libgazebo_ros_diff_drive.so">
<alwaysOn>true</alwaysOn>
<updateRate>50</updateRate>
<leftJoint>left_main_wheel_joint</leftJoint>
<rightJoint>right_main_wheel_joint</rightJoint>
<wheelSeparation>${chair_width}</wheelSeparation>
<wheelDiameter>${main_wheel_radius*2}</wheelDiameter>
<torque>20</torque>
<commandTopic>cmd_vel</commandTopic>
<odometryTopic>odom</odometryTopic>
<odometryFrame>odom</odometryFrame>
<robotBaseFrame>base_footprint</robotBaseFrame>
</plugin>
</gazebo>
Originally posted by curranw on ROS Answers with karma: 211 on 2014-06-06
Post score: 0
Original comments
Comment by ahendrix on 2014-06-06:
If you visualize the TF frames in rviz, do the laser scans line up with their origin frames properly? Which frame are you sending your position estimate in? A screenshot might be helpful.
|
After I installed ROS on my Ubuntu 12.04.4 machine I followed the instructions of this tutorial to install ardrone_autonomy package and tum_ardrone package:
-wiki.ros.org/tum_ardrone-
When I successfully installed all the required packages, I followed the steps to Run the packages with the command rosrun.
Before executing the "rosrun ardrone_autonomy ardrone_driver" command I connected to the ARdrone 2.0 via wifi. The ip address of the drone is 192.168.1.1
When I execute the command "rosrun ardrone_autonomy ardrone_driver" I get stuck on "Checking AR.Drone version"
Any suggestion how to solve this?
FYI:
I tested the ardrone with my ipad and the freeflight app and it works perfectly. After testing it I pressed the reset button on the drone (leds flashed and the drone reset) because i read that it might still be paired with the ipad.
Originally posted by Michael Panayiotou on ROS Answers with karma: 61 on 2014-06-06
Post score: 0
|
Hello,
I'm trying to add a "virtual" corridor along the waypoints generated by the global planner (waypoints are in the middle of the virtual corridor), so the robot never leaves this "virtual" corridor when it's moving between the waypoints using a local planner. As an example, if during the robot's navigation within this corridor, an obstacle appears in front of the robot and covers the entire width of the corridor, the robot should stop.
I was wondering if I could do this by updating the costmap (nav_msgs/OccupancyGrid), and marking all the cells outside the "virtual" corridor as obstacles at the beginning?
Thanks.
Originally posted by ROSCMBOT on ROS Answers with karma: 651 on 2014-06-06
Post score: 0
|
Ubuntu 12.04, ROS Hydro
Workspace:
$ echo $ROS_PACKAGE_PATH
/home/kirill/dev/rosbook:/opt/ros/hydro/share:/opt/ros/hydro/stacks
Created ROS pack:
roscd chapter2_tutorials/src/
ls
bin build CMakeLists.txt include lib mainpage.dox Makefile manifest.xml src
Test ROS Package has two source files:
cd src
ls
example1_a.cpp example1_b.cpp
example1_a.cpp:
#include "ros/ros.h"
#include "std_msgs/String.h"
#include <sstream>
int main(int argc, char **argv)
{
ros::Init(argc, argv, "example1_a");
ros::NodeHandle n;
ros::Publisher chatter_pub = n.advertise<std_
msgs::String>("message", 1000);
ros::Rate loop_rate(10);
while (ros::ok())
{
std_msgs:String msg;
std::stringstream ss;
ss << " I am the example_a node ";
msg.data = ss.str();
//
chatter_pub.publish(msg);
ros::spinOnce();
loop_rate.sleep();
}
return 0;
}
example1_b.cpp:
#include "ros/ros.h"
#include "std_msgs/String.h"
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, "example1_b");
ros::NodeHandle n;
ros::Subscriber sub = n.subcribe("message", 1000, chatterCallback);
ros::spin();
return 0;
}
CMakeLists.txt:
rosed chapter2_tutorials CMakeLists.txt
cmake_minimum_required(VERSION 2.4.6)
include($ENV{ROS_ROOT}/core/rosbuild/rosbuild.cmake)
# Set the build type. Options are:
# Coverage : w/ debug symbols, w/o optimization, w/ code-coverage
# Debug : w/ debug symbols, w/o optimization
# Release : w/o debug symbols, w/ optimization
# RelWithDebInfo : w/ debug symbols, w/ optimization
# MinSizeRel : w/o debug symbols, w/ optimization, stripped binaries
#set(ROS_BUILD_TYPE RelWithDebInfo)
rosbuild_init()
#set the default path for built executables to the "bin" directory
set(EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/bin)
#set the default path for built libraries to the "lib" directory
set(LIBRARY_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/lib)
#uncomment if you have defined messages
#rosbuild_genmsg()
#uncomment if you have defined services
#rosbuild_gensrv()
#common commands for building c++ executables and libraries
#rosbuild_add_library(${PROJECT_NAME} src/example.cpp)
#target_link_libraries(${PROJECT_NAME} another_library)
#rosbuild_add_boost_directories()
#rosbuild_link_boost(${PROJECT_NAME} thread)
#rosbuild_add_executable(example examples/example.cpp)
#target_link_libraries(example ${PROJECT_NAME})
rosbuild_add_executable(example1_a src/example1_a.cpp)
rosbuild_add_executable(example1_b src/example1_b.cpp)
Making package:
kirill@kirill-Aspire-E1-571G:~/dev/rosbook/chapter2_tutorials$ rosmake chapter2_tutorials
[ rosmake ] rosmake starting...
[ rosmake ] Packages requested are: ['chapter2_tutorials']
[ rosmake ] Logging to directory /home/kirill/.ros/rosmake/rosmake_output-20140607-195627
[ rosmake ] Expanded args ['chapter2_tutorials'] to:
['chapter2_tutorials']
[rosmake-0] Starting >>> catkin [ make ]
[rosmake-0] Finished <<< catkin ROS_NOBUILD in package catkin
No Makefile in package catkin
[rosmake-0] Starting >>> genmsg [ make ]
[rosmake-0] Finished <<< genmsg ROS_NOBUILD in package genmsg
No Makefile in package genmsg
[rosmake-0] Starting >>> genlisp [ make ]
[rosmake-1] Starting >>> genpy [ make ]
[rosmake-0] Finished <<< genlisp ROS_NOBUILD in package genlisp
No Makefile in package genlisp
[rosmake-2] Starting >>> gencpp [ make ]
[rosmake-0] Starting >>> console_bridge [ make ]
[rosmake-3] Starting >>> rospack [ make ]
[rosmake-3] Finished <<< rospack ROS_NOBUILD in package rospack
No Makefile in package rospack
[rosmake-1] Finished <<< genpy ROS_NOBUILD in package genpy
No Makefile in package genpy
[rosmake-2] Finished <<< gencpp ROS_NOBUILD in package gencpp
No Makefile in package gencpp
[rosmake-3] Starting >>> roslib [ make ]
[rosmake-2] Starting >>> message_generation [ make ]
[rosmake-1] Starting >>> roslang [ make ]
[rosmake-0] Finished <<< console_bridge ROS_NOBUILD in package console_bridge
No Makefile in package console_bridge
[rosmake-0] Starting >>> cpp_common [ make ]
[rosmake-2] Finished <<< message_generation ROS_NOBUILD in package message_generation
No Makefile in package message_generation
[rosmake-2] Starting >>> rosgraph [ make ]
[rosmake-1] Finished <<< roslang ROS_NOBUILD in package roslang cpp_common: 0.0 sec ] [ rosgraph: 0.0 sec ] [ 4 Active 8/25 Complete ]
No Makefile in package roslang
[rosmake-0] Finished <<< cpp_common ROS_NOBUILD in package cpp_common
No Makefile in package cpp_common
[rosmake-0] Starting >>> rostime [ make ]
[rosmake-1] Starting >>> xmlrpcpp [ make ]
[rosmake-3] Finished <<< roslib ROS_NOBUILD in package roslib
No Makefile in package roslib
[rosmake-2] Finished <<< rosgraph ROS_NOBUILD in package rosgraph
No Makefile in package rosgraph
[rosmake-3] Starting >>> rosunit [ make ]
[rosmake-1] Finished <<< xmlrpcpp ROS_NOBUILD in package xmlrpcpp
No Makefile in package xmlrpcpp
[rosmake-3] Finished <<< rosunit ROS_NOBUILD in package rosunit
No Makefile in package rosunit
[rosmake-0] Finished <<< rostime ROS_NOBUILD in package rostime
No Makefile in package rostime
[rosmake-0] Starting >>> roscpp_traits [ make ]
[rosmake-0] Finished <<< roscpp_traits ROS_NOBUILD in package roscpp_traits
No Makefile in package roscpp_traits
[rosmake-0] Starting >>> roscpp_serialization [ make ]
[rosmake-0] Finished <<< roscpp_serialization ROS_NOBUILD in package roscpp_serialization
No Makefile in package roscpp_serialization
[rosmake-0] Starting >>> message_runtime [ make ]
[rosmake-0] Finished <<< message_runtime ROS_NOBUILD in package message_runtime
No Makefile in package message_runtime
[rosmake-0] Starting >>> std_msgs [ make ]
[rosmake-3] Starting >>> rosbuild [ make ]
[rosmake-0] Finished <<< std_msgs ROS_NOBUILD in package std_msgs
No Makefile in package std_msgs
[rosmake-0] Starting >>> rosgraph_msgs [ make ]
[rosmake-3] Finished <<< rosbuild ROS_NOBUILD in package rosbuild
No Makefile in package rosbuild
[rosmake-3] Starting >>> rosconsole [ make ]
[rosmake-0] Finished <<< rosgraph_msgs ROS_NOBUILD in package rosgraph_msgs
No Makefile in package rosgraph_msgs
[rosmake-3] Finished <<< rosconsole ROS_NOBUILD in package rosconsole
No Makefile in package rosconsole
[rosmake-3] Starting >>> roscpp [ make ]
[rosmake-3] Finished <<< roscpp ROS_NOBUILD in package roscpp
No Makefile in package roscpp
[rosmake-3] Starting >>> rospy [ make ]
[rosmake-3] Finished <<< rospy ROS_NOBUILD in package rospy
No Makefile in package rospy
[rosmake-3] Starting >>> chapter2_tutorials [ make ]
[ rosmake ] Last 40 linesapter2_tutorials: 3.8 sec ] [ 1 Active 24/25 Complete ]
{-------------------------------------------------------------------------------
make[3]: Entering directory `/home/kirill/dev/rosbook/chapter2_tutorials/build'
make[3]: Leaving directory `/home/kirill/dev/rosbook/chapter2_tutorials/build'
[ 0%] Built target rosbuild_precompile
make[3]: Entering directory `/home/kirill/dev/rosbook/chapter2_tutorials/build'
make[3]: Entering directory `/home/kirill/dev/rosbook/chapter2_tutorials/build'
make[3]: Leaving directory `/home/kirill/dev/rosbook/chapter2_tutorials/build'
make[3]: Leaving directory `/home/kirill/dev/rosbook/chapter2_tutorials/build'
make[3]: Entering directory `/home/kirill/dev/rosbook/chapter2_tutorials/build'
make[3]: Entering directory `/home/kirill/dev/rosbook/chapter2_tutorials/build'
[ 50%] [100%] Building CXX object CMakeFiles/example1_b.dir/src/example1_b.cpp.o
Building CXX object CMakeFiles/example1_a.dir/src/example1_a.cpp.o
/home/kirill/dev/rosbook/chapter2_tutorials/src/example1_b.cpp: In function ‘int main(int, char**)’:
/home/kirill/dev/rosbook/chapter2_tutorials/src/example1_b.cpp:12:3: error: ‘Init’ is not a member of ‘ros’
/home/kirill/dev/rosbook/chapter2_tutorials/src/example1_b.cpp:14:27: error: ‘class ros::NodeHandle’ has no member named ‘subcribe’
/home/kirill/dev/rosbook/chapter2_tutorials/src/example1_b.cpp:14:19: warning: unused variable ‘sub’ [-Wunused- variable]
/home/kirill/dev/rosbook/chapter2_tutorials/src/example1_a.cpp: In function ‘int main(int, char**)’:
/home/kirill/dev/rosbook/chapter2_tutorials/src/example1_a.cpp:7:3: error: ‘Init’ is not a member of ‘ros’
/home/kirill/dev/rosbook/chapter2_tutorials/src/example1_a.cpp:9:44: error: ‘std_’ was not declared in this scope
/home/kirill/dev/rosbook/chapter2_tutorials/src/example1_a.cpp:9:34: error: parse error in template argument list
/home/kirill/dev/rosbook/chapter2_tutorials/src/example1_a.cpp:10:30: error: no matching function for call to
‘ros::NodeHandle::advertise(const char [8], int)’
/home/kirill/dev/rosbook/chapter2_tutorials/src/example1_a.cpp:10:30: note: candidates are:
/opt/ros/hydro/include/ros/node_handle.h:236:15: note: template<class M> ros::Publisher ros::NodeHandle::advertise(const string&, uint32_t, bool)
/opt/ros/hydro/include/ros/node_handle.h:300:13: note: template<class M> ros::Publisher ros::NodeHandle::advertise(const string&, uint32_t, const SubscriberStatusCallback&, const SubscriberStatusCallback&, const VoidConstPtr&, bool)
/home/kirill/dev/rosbook/chapter2_tutorials/src/example1_a.cpp:14:14: error: ‘String’ was not declared in this scope
/home/kirill/dev/rosbook/chapter2_tutorials/src/example1_a.cpp:14:14: note: suggested alternative:
/opt/ros/hydro/include/std_msgs/String.h:80:52: note: ‘std_msgs::String’
/home/kirill/dev/rosbook/chapter2_tutorials/src/example1_a.cpp:14:21: error: expected ‘;’ before ‘msg’
/home/kirill/dev/rosbook/chapter2_tutorials/src/example1_a.cpp:17:5: error: ‘msg’ was not declared in this scope
/home/kirill/dev/rosbook/chapter2_tutorials/src/example1_a.cpp:14:5: warning: label ‘std_msgs’ defined but not used [- Wunused-label]
make[3]: *** [CMakeFiles/example1_b.dir/src/example1_b.cpp.o] Error 1
make[3]: Leaving directory `/home/kirill/dev/rosbook/chapter2_tutorials/build'
make[2]: *** [CMakeFiles/example1_b.dir/all] Error 2
make[2]: *** Waiting for unfinished jobs....
make[3]: *** [CMakeFiles/example1_a.dir/src/example1_a.cpp.o] Error 1
make[3]: Leaving directory `/home/kirill/dev/rosbook/chapter2_tutorials/build'
make[2]: *** [CMakeFiles/example1_a.dir/all] Error 2
make[2]: Leaving directory `/home/kirill/dev/rosbook/chapter2_tutorials/build'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/home/kirill/dev/rosbook/chapter2_tutorials/build'
-------------------------------------------------------------------------------}
[ rosmake ] Output from build of package chapter2_tutorials written to:
[ rosmake ] /home/kirill/.ros/rosmake/rosmake_output-20140607-195627/chapter2_tutorials/build_output.log
[rosmake-3] Finished <<< chapter2_tutorials [FAIL] [ 3.77 seconds ]
[ rosmake ] Halting due to failure in package chapter2_tutorials.
[ rosmake ] Waiting for other threads to complete.
[ rosmake ] Results:
[ rosmake ] Built 25 packages with 1 failures.
[ rosmake ] Summary output to directory
[ rosmake ] /home/kirill/.ros/rosmake/rosmake_output-20140607-195627
kirill@kirill-Aspire-E1-571G:~/dev/rosbook/chapter2_tutorials$
I can't build tutorial node because of error:
error: ‘Init’ is not a member of ‘ros’
Could anyone give a clue how to solve this issue?
Regards,
Kirill
Originally posted by Robotics010 on ROS Answers with karma: 13 on 2014-06-07
Post score: 0
|
I am working on a configuration for my fall AI/Robotics undergraduate course. I would like to find the best version of Ubuntu and ROS for use on both NXT and Turtlebot2. Here is my problem:
Currently I am testing Ubunto 12.04 (Precise) with ROS Hydro. I think this will work fine with Turtlebot, both on the bot and the workstation. But I also want to use Lego Mindstorm NXT to get the students started. It looks like ROSNXT needs ROS Electric, but ROS Electric will not run on Ubunto 12.04.
So, it looks like I might have to go back to Ubunto 10.04 (Lucid) and ROS Electric to get support for ROS NXT, but Turtlebot2 is not supported in ROS Electric (you need Groovy)
So, I don't see a single configuration that supports ROS NXT and Turtlebot 2... Does that seem correct?
-- I could upgrade to Lego Mindstorm EV3 for the fall, if ROS Hydro will support it by September...?
-- Should I try building ROS NXT from source under Hydro, but this looks like it has challenges
-- Is it possible to run ROS Hydro under Ubuntu 10.04? It does not look like it
Any suggestions?
Originally posted by tgibbons on ROS Answers with karma: 11 on 2014-06-07
Post score: 0
|
Hi all
I followed the rviz source code 2D Pose Estimate which is the below function to set initialpose for AMCL in my own code.
void InitialPoseTool::onPoseSet(double x, double y, double theta)
It worked in publishing a single message to the topic initialpose. However this was not able to set the pose of the robot, because in rviz the pose of the robot never changed to the new one and in the console there also had not been showing any message like "[ROS_INFO] setting the robot pose to ..." as usual when we used the rviz 2D Pose Estimate tool.
But I finally made it work by using the latched ros publisher rather than the normal publisher
ros::Publisher advertise(const std::string& topic, uint32_t queue_size, bool latch = true)
The question I want to raise here is why the normal publisher without latch could work in rviz while I have to use the latched version to publish the message to set the pose?
Thanks all.
Originally posted by dalishi on ROS Answers with karma: 89 on 2014-06-08
Post score: 1
|
Hi all,
I am tuning the amcl with our differential robot running ros fuete. We are confronting the situation now and then when the particles all of the sudden got spread out (scattered all over the screen) and the robot got lost then. Below is my params for amcl and could anyone can advise which parameters I should adjust to prevent this from happening? Thanks. (The values in the brackets are the default)
~min_particles: 1000(100)
~max_particles: 10000(5000)
~kld_err: 0.05(0.01)
~kld_z: 0.99
~initial_cov_aa: 0.25((pi/12)*(pi/12)=0.06)
~update_min_d: 0.2
~update_min_a: 0.2(pi/6.0=0.52)
~resample_interval: 1(2)
~transform_tolerance: 1.0(0.1)
~recovery_alpha_slow: 0.001(0.0)
~recovery_alpha_fast: 0.1(0.0)
~gui_publish_rate: 10.0(-1.0 to disable)
~odom_model_type: diff
~base_frame_id: base_footprint
~odom_frame_id: odom
~odom_alpha1: 1(0.2)
~odom_alpha2: 1(0.2)
~odom_alpha3: 2(0.2)
~odom_alpha4: 5(0.2)
~laser_max_beams: 60(30)
~laser_z_hit: 0.5(0.95)
~laser_z_short: 0.05(0.1)
~laser_z_max: 0.05
~laser_z_rand: 0.5(0.05)
~laser_sigma_hit: 0.2
~laser_lambda_short: 0.1
~laser_model_type: likelihood_field
~laser_likelihood_max_dist: 2.0
Originally posted by dalishi on ROS Answers with karma: 89 on 2014-06-08
Post score: 0
Original comments
Comment by dornhege on 2014-06-08:
The environment, map and sensor type and robot type will be way more informative. Under normal conditions amcl works well for us with default parameters.
|
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]
Originally posted by richkappler on ROS Answers with karma: 106 on 2014-06-08
Post score: 0
Original comments
Comment by Alex Ortega on 2015-07-18:
I have the same problem. Have you found the solution to your problem? Help, please!
Comment by Boris on 2015-07-19:
Please do not use Answer form to ask questions, use comments or create your own question instead. ROS Answers is not a forum, but Q&A site.
Comment by Abdul Mannan on 2016-01-12:
I have followed the very same example from the book "Learning ROS for Robotics Programming second edition on Jade on ubuntu 15.04. I am also having the similar problem. Someone please sort it out. Thanks.
Comment by Suneet on 2017-09-03:
I also had the same issue .I solved it . After adding the the following lines(given below) in CMakeLists.txt . In the terminal I wrote :
$ cd catkin_ws
$ catkin_make
"add_executable(turtle_teleop_joy src/turtle_teleop_joy.cpp)
target_link_libraries(turtle_teleop_joy ${catkin_LIBRARIES})"
|
Hi,
I need to write a C++ class containing message_filters as members.
In the ROS Wiki they are declared in this way:
message_filters::Subscriber<std_msgs::UInt32> sub(nh, "my_topic", 1);
sub.registerCallback(myCallback);
while for using them in a class I found that this could be a way:
class DBCreator
{
ros::NodeHandle nh_;
message_filters::Subscriber<capygroovy::Ticks> ticks_sub_;
public:
DBCreator()
{
ticks_sub_ = nh_.subscribe("/ticks",1,&DBCreator::ticksCallback,this);
but I get this error:
/opt/ros/groovy/include/message_filters/subscriber.h:96:
note: no known conversion for
argument 1 from ‘ros::Subscriber’ to
'const message_filters::Subscriber< capygroovy::Ticks_< std::allocator < void > > >&'
that is, ticks_sub_ should be a ros::Subscriber object.
I'm not very familiar with this topic so I'd be glad if someone could help me understand how to initialize this object inside the class!!!
Thanks!
Originally posted by schizzz8 on ROS Answers with karma: 183 on 2014-06-08
Post score: 0
|
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:
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.
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/WritingTeleopNode), 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:
On line 2: #include <turtlesim/Velocity.h> - since I'm not using turtlesim, where do I get the header to include for Velocity.h?
On line 44: turtlesim::Velocity vel; - this will just be the package that I include for Velocity.h ?
I see that I'm using sensor msgs, should I have included them in my initial package, or are these part of std_msgs?
Once I'm done, does this get included in my launch file (I think I know it does) and how?
Originally posted by richkappler on ROS Answers with karma: 106 on 2014-06-08
Post score: 1
|
I have already install my hokuyolaser ( urg_node ) and it's working perfectly when I see the data on rviz.
But when I launch " roslaunch turtlebot_navigation gmapping_demo.launch" , after i had launch roscore - minimal.launch - urg_node , it's my kinect data on the screen.
I want to save a map with my lidar and not with my kinect.
How should I do to save a map with my Hokuyo and not with my kinect?
This is my file gmapping_demo.launch :
<include file="$(find turtlebot_bringup)/launch/3dsensor.launch">
<arg name="rgb_processing" value="false" />
<arg name="depth_registration" value="false" />
<arg name="depth_processing" value="false" />
<!-- We must specify an absolute topic name because if not it will be
prefixed by "$(arg camera)".
Probably is a bug in the nodelet manager : https://github.com/ros/nodelet_core/issues/7
<arg name="scan_topic" value="/scan" /> </include>
I want to change for my hokuyo but how ?
Thanks a lot
I have create my file : laser_gmapping_demo.launch and now, my laser working and I can make a map.
Thanks for all answer.
<launch>
<node pkg="urg_node" type="urg_node" name="laser_scan">
<param name="port" value="/dev/ttyACM0"/>
<param name="frame_id" value="base_link"/>
<param name="calibrate_time" type="bool" value="true"/>
<param name="intensity" type="bool" value="false"/>
<param name="min_ang" value="-2.356194437"/>
<param name="max_ang" value="2.35619443"/>
<param name="cluster" value="1"/>
<remap from="scan" to="base_scan" />
</node>
<node pkg="tf" type="static_transform_publisher" name="base_link_to_base_laser_link" args="0.058 0 0.125 0.0 0.0 3.1416 /base_link /base_laser_link 100" />
<node pkg="tf" type="static_transform_publisher" name="base_footprint_to_base_link" args="0 0 0 0 0 0 /base_footprint /base_link 100" />
<!-- Run self-filter -->
<node name="gmapping" pkg="gmapping" type="slam_gmapping" args="scan:=base_scan" output="screen">
<param name="linearUpdate" value="0.1" />
<param name="angularUpdate" value="0.05" />
<param name="xmin" value="-20" />
<param name="ymin" value="-20" />
<param name="xmax" value="20" />
<param name="ymax" value="20" />
<param name="maxUrange" value="6" />
</node>
<!--- Run gmapping -->
<include file="$(find turtlebot_navigation)/config/gmapping.launch.xml" >
<arg name="scan_topic" value="scan_filtered" />
</include>
<!--- Run Move Base and Robot Pose EKF -->
<include file="$(find turtlebot_navigation)/laser/move_base_laser.launch" />
</launch>
Originally posted by guigui on ROS Answers with karma: 33 on 2014-06-09
Post score: 1
|
Hi guys,
how can i delete old polygons in rviz. For Marker there is the command:
visualization_msgs::Marker::DELETE
I didn't found something similar for polygons. Does someone know the command for it? I searched also in google, but unfortunaly i find no answer yet.
Thanks a lot.
Originally posted by mr42 on ROS Answers with karma: 3 on 2014-06-09
Post score: 0
|
Hi all
I confronted a problem. In my application, I need to reset the pose of the robot now and then (by publish to the /initialpose for amcl), however, after I have reset the robot pose, the previous obstacles around the robot are still there on the costmap (global costmap and/or local?) which always resulted in no valid path found by the navfn global planner. I am asking what is the right way to clear out the obstacles on the costmap after I reset the pose of the robot? I am now using fuete.
Thank you everyone!
Originally posted by dalishi on ROS Answers with karma: 89 on 2014-06-09
Post score: 1
|
Hi!
In my task i need to detect the pose of an object (a cup in my case) because i have to grasp the cup with a robot.
I'm trying to catching the point cloud of the scene with ROS and a kinect.
I thought to segment my point cloud that represent the scene, because i want to keep only the point of the cup.
I have implemented a code in ROS that has a subscriber to detect the sensor_msgs/PointCloud2, then i transform the PointCloud2 in a pcl::PointXYZ.
And this is the code to the segmentation part:
pcl::ModelCoefficients::Ptr coefficients (new pcl::ModelCoefficients);
pcl::PointIndices::Ptr inliers (new pcl::PointIndices);
// Create the segmentation object
pcl::SACSegmentation<pcl::PointXYZ> seg;
// Optional
seg.setOptimizeCoefficients (true);
// Mandatory
seg.setModelType (pcl::SACMODEL_CYLINDER);
seg.setMethodType (pcl::SAC_RANSAC);
seg.setDistanceThreshold (0.01);
seg.setInputCloud (cloud);
seg.segment (*inliers, *coefficients);
it seems to work with a SACMODEL_PLANE, but with SACMODEL_CYLINDER this is the error that appears:
[pcl::SACSegmentation::initSACModel] No valid model given!
[pcl::SACSegmentation::segment] Error initializing the SAC model!
Could not estimate a planar model for the given dataset.
I found the various model here http://docs.pointclouds.org/1.7.0/group__sample__consensus.html
Help me please!
P.S. And tell me if i'm trying to do the correct things for my task...
Tank You!
Originally posted by lukeb88 on ROS Answers with karma: 33 on 2014-06-09
Post score: 1
|
Hellow all !
I'm trying to create a custom message using Geomety messages and std msgs. But I can't seem to link it correctly. I've been following this tutorial but so far I'm having this error :
CMake Error at /home/malcolm/ros_ws/hydro_ws/catkin_ws/build/Tobot/open_tld_3d/cmake/open_tld_3d-genmsg.cmake:3 (message):
Could not find messages which
'/home/malcolm/ros_ws/hydro_ws/catkin_ws/src/Tobot/open_tld_3d/msg/square.msg'
depends on. Did you forget to specify generate_messages(DEPENDENCIES ...)?
Cannot locate message [point] in package [open_tld_3d] with paths
[['/home/malcolm/ros_ws/hydro_ws/catkin_ws/src/Tobot/open_tld_3d/msg']]
Indeed you can find point in geometry_msgs and in my CMakeList.txt I added that:
generate_messages(
DEPENDENCIES
geometry_msgs
std_msgs
)
So for my understanding, it should be able to find Point...
This is my square.msg in case :
point x
point y
float64 width
float64 height
Nothing really complexe and I'm pretty sure I'm missing something trivial but still...
Thanks a lot !
Originally posted by Maya on ROS Answers with karma: 1172 on 2014-06-09
Post score: 4
Original comments
Comment by Maya on 2014-06-10:
Indeed that was it ! I didn't think you'll need it because yu don't have std_psgs in front of the float64
|
Hey there guys,
I am working on a Baxter and ROS Groovy. I want to make the arm move from point A to point B while keeping the wrist joint fixed. I tried this with the IK Service but it messes up the wrist joint by moving it as well.
Any suggestions on how can I make the arm move from point A to B with a fixed wrist joint ?
Please help !!!
Originally posted by ktiwari9 on ROS Answers with karma: 61 on 2014-06-09
Post score: 1
|
Hi everyone,
I am trying to get a Logitech webcam to work with visp_auto_tracker to do some QR tracking. I am running ROS Hydro on Ubuntu. I started off with usb_cam and that worked fine with the webcam, so now I am trying the live video example launch file (tracklive_usb.launch) on the wiki page at wiki.ros.org/visp_auto_tracker. The webcam light turns on, but there is no camera feed, and I get this error:
[ WARN] [1402326372.657815348]: Camera calibration file /home/toshiba/.ros/camera_info/head_camera.yaml not found.
terminate called after throwing an instance of 'std::runtime_error'
what(): uncalibrated camera
[visp_auto_tracker-1] process has died [pid 17186, exit code -6, cmd /opt/ros/hydro/lib/visp_auto_tracker/visp_auto_tracker /visp_auto_tracker/camera_info:=/usb_cam/camera_info /visp_auto_tracker/image_raw:=/usb_cam/image_raw __name:=visp_auto_tracker __log:=/home/toshiba/.ros/log/fc4ac0ee-eb3d-11e3-a916-70f1a177b603/visp_auto_tracker-1.log].
log file: /home/toshiba/.ros/log/fc4ac0ee-eb3d-11e3-a916-70f1a177b603/visp_auto_tracker-1*.log
So then I try to calibrate the camera with this line by following wiki.ros.org/camera_calibration/Tutorials/MonocularCalibration
rosrun camera_calibration cameracalibrator.py --size 8x6 --square 0.108 image:=/camera/image_raw camera:=/usb_cam
But I get this message:
('Waiting for service', '/usb_cam/set_camera_info', '...')
Service not found
I am pretty new to ROS having just started a few weeks ago, so I'm kind of stumped. Is it really a problem with calibration? Any help is much appreciated. Thanks!
Originally posted by Alvin on ROS Answers with karma: 37 on 2014-06-09
Post score: 0
|
Hi,
What is the difference between the time synchronizer and the exact time sync policy under message filter. In message_filters does both example 4.2 and 7.2 have the same outcome?
I might have overlooked something or might not be looking at this correctly.
Thanking you,
Benny
Originally posted by Benny on ROS Answers with karma: 132 on 2014-06-09
Post score: 0
|
Hi to all,
Well after having some conversations with @FelixEndres, and since I need RGBDSlam working on ROS Indigo so to implement it in a Odroid running Ubuntu 13.10, I decided to try to make the migration of the source code to Indigo, which will certainly be useful to others to come.
Some of the initial problems wore corrected by downloading and compiling g2o and OpenCV-2.4.9 from source, so to rgbdslam can detect them and then use them. But then, I got some errors on the code that should be resolved by adapting the code to the OpenCV architecture, but I will need some help on those, since Felix is busy with is PhD and I need this to my MSc thesis. So a help from someone with knowledge on OpenCV functions and headers will be great.
So, when doing catkin_make on my ws I get the following list of errors:
This code block was moved to the following github gist:
https://gist.github.com/answers-se-migration-openrobotics/b8f0064e06e8fca5bf09560a0a934930
Any tips on what substitutions on the headers should be done? I believe this is a include problem and not function problems, as it seems that there must be some kind of conflict with the namespace cv.
Thanks in advance!
Originally posted by TSC on ROS Answers with karma: 180 on 2014-06-09
Post score: 2
|
Hello,
I am currently using the navigation stack for simulation with a fake laser. However, I'd like to remove the laser since I plan on using data from a motion capture system. The entire area where the robot is moving can be precisely check for obstacle without the laser or a local costmap and a map (nav_msgs/occupancygrid) is generated. Every time I try to remove it one way or another, I get endless warnings of "The base_scan observation buffer has not been updated for X seconds, and it should be updated every 0.40 seconds." and "[/move_base_node]:Sensor data is out of date, we're not going to allow commanding of the base for safety", so nothing moves.
Is it possible to use this stack without a laser/point cloud?
Originally posted by TopSecret on ROS Answers with karma: 37 on 2014-06-09
Post score: 0
|
I want to ask anyone a question. I'm interested in global planner. I checked a code of a carrot_planner. carrot planner is very simple, but I think that it can't make a robot move a goal in case of being an obstacle between start position and goal position. Because the path(target_x,target_y,target_yaw) is made of following.
goal_x = goal.pose.position.x;
goal_y = goal.pose.position.y;
start_x = start.pose.position.x;
start_y = start.pose.position.y;
diff_x = goal_x - start_x;
diff_y = goal_y - start_y;
diff_yaw = angles::normalize_angle(goal_yaw-start_yaw);
target_x = goal_x;
target_y = goal_y;
target_yaw = goal_yaw;
target_x = start_x + scale * diff_x;
target_y = start_y + scale * diff_y;
target_yaw = angles::normalize_angle(start_yaw + scale * diff_yaw);
Carrot planner seems to make a plan for a robot to go straight. I mean that robot stops in front of an obstacle.
What do you think of it?
Originally posted by Ken_in_JAPAN on ROS Answers with karma: 894 on 2014-06-09
Post score: 0
|
I use
rosservice call spawn 2 2 0 "NewTurtle"
to create another turtle on the screen, how to use turtle_teleop_key command to control it?
It like this command only can control the first turtle.
Originally posted by MIller on ROS Answers with karma: 3 on 2014-06-09
Post score: 0
|
system: ubuntu 12.04 LTS
ROS version 1.9.54
I try to install ros-hydro-rqt, but failed.
sudo apt-get install ros-hydro-rqt
Failed to fetch http:packages.ros.org/ros/ubuntu/pool/main/r/ros-hydro-rqt/ros-hydro-rqt_0.2.13-0precise-20140130-2154-+0000_amd64.deb Something wicked happened resolving 'packages.ros.org:http' (-5 - No address associated with hostname)
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
Originally posted by MIller on ROS Answers with karma: 3 on 2014-06-09
Post score: 0
|
Hi all,
I have an observation when I re-set the initialpose of amcl by publishing to the initialpose topic and then sent goal to the navigation stack. The plan made by the navfn was still starting from the old pose of the robot rather than the new one that I just set. The navfn got the robot pose by looking up the transform published by amcl. Is this because the amcl need to take some time to publish the new transform after re-setting initialpose and navfn doesn't get the new robot pose immediately?
Please correct me if I am wrong and appreciate any solution on this. Thanks all.
Originally posted by dalishi on ROS Answers with karma: 89 on 2014-06-09
Post score: 0
|
I've just switched from catkin_make_isolated to catkin tools for building ROS from source. I added the --install command but I'm getting errors when building MoveIt! in a different workspace after sourcing the ROS installed from source workspace:
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
LIBFCL_LIBRARIES_FULL
linked by target "moveit_collision_detection_fcl" in directory /home/dave/ros/ws_moveit/src/moveit_core/collision_detection_fcl
-- Configuring incomplete, errors occurred!
There is something wrong with FCL or my environment, but I am not sure what to do. I have already built several other workspaces on top of the ROS-installed-from-source one, so it seems to mostly be working. Thanks!
--- EDIT ---
Perhaps this might be useful: there were some issues with FCL on this ROS Answer and there was a fix in moveit_core as noted in the changelog for 0.5.7
Originally posted by Dave Coleman on ROS Answers with karma: 1396 on 2014-06-09
Post score: 0
|
I might put a similar question on this web. As writing a subject, I want to understand how to write a code with OMPL to move a turtlebot. Now, I'm writing the code. I think global_planner with OMPL needs next steps.
1.isStateValid()
isStateValid() is a function to check if a position putting a sampler on a map is free space.
isStateValid() is a function to store information like free space and obstacle region.
2.makePlan()
makePlan() includes ob::PlannerPtr planner( og::RRT(ss.getSpaceInformation())), setStateValidityChecker() and so on.
On this article the contents I want to ask is following.
isStateValid has to receive state of OMPL format instead of costmap, so my code is wrong.
As I explain above, costmap has many information about an obstacle. So I think that I should use a costmap.
How should I edit this code? or Could anyone tell me more information if I'm not correct?
bool isStateValid(costmap_2d::Costmap2DROS* costmap_ros){
costmap_ros_ = costmap_ros;
costmap_ = costmap_ros_->getCostmap();
if(costmap_ > 253)
return false;
return true;
}
Thank you in advance!
Error message
/home/ken/catkin_ws/src/navigation/ompl_planner_rrt/src/ompl_planner_rrt.cpp: In function ‘bool ompl_planner_rrt::isStateValid(costmap_2d::Costmap2DROS*)’:
/home/ken/catkin_ws/src/navigation/ompl_planner_rrt/src/ompl_planner_rrt.cpp:62:3: error: ‘costmap_ros_’ was not declared in this scope
I edited ompl_planner_rrt.h like a following.
namespace ompl_planner_rrt{
class OMPLPlannerRRT : public nav_core::BaseGlobalPlanner {
public:
OMPLPlannerRRT();
OMPLPlannerRRT(std::string name, costmap_2d::Costmap2DROS* costmap_ros);
void initialize(std::string name, costmap_2d::Costmap2DROS* costmap_ros);
bool makePlan(const geometry_msgs::PoseStamped& start,
const geometry_msgs::PoseStamped& goal,
std::vector& plan);
~OMPLPlannerRRT();
private:
double footprintCost(double x_i, double y_i, double theta_i);
bool isStateValid(const ompl::base::State *state);
bool interpolatePathPose2D(std::vector& path);
void publishPlan(std::vector path);
void OMPLStateSE2ToROSPose2D(const ompl::base::State* ompl_state, geometry_msgs::Pose2D& pose2D);
void OMPLScopedStateSE2ToROSPose2D(const ompl::base::ScopedState scoped_state, geometry_msgs::Pose2D& pose2D);
void ROSPose2DToOMPLScopedStateSE2(ompl::base::ScopedState& scoped_state, const geometry_msgs::Pose2D pose2D);
void PoseToPose2D(const geometry_msgs::Pose pose, geometry_msgs::Pose2D& pose2D);
void Pose2DToPose(geometry_msgs::Pose& pose, const geometry_msgs::Pose2D pose2D);
};
};
Linking CXX shared library /home/ken/catkin_ws/devel/lib/libompl_planner_rrt.so
[100%] Built target ompl_planner_rrt
But, I have no confidence if my program works normally.
Originally posted by Ken_in_JAPAN on ROS Answers with karma: 894 on 2014-06-10
Post score: 0
Original comments
Comment by Ken_in_JAPAN on 2014-06-10:
Anyone is about to tell me to study C++.
Comment by alfa_80 on 2014-06-10:
Have you declared "costmap_ros_" variable? I guess that variable is a class variable.
Comment by Ken_in_JAPAN on 2014-06-10:
Thanks @alfa_80, I don't understand costmap_2d. I know that It consists of Layered costmap. But I don't know how to take out cost from costmap. I'm checking it.
Comment by Ken_in_JAPAN on 2014-06-10:
I quote a sample code GeomPlanningSE2_PRM.cpp on the web( http://robotics.naist.jp/edu/text/?Robotics%2FOMPL#OMPLProgramming ). isStateValid in this cpp just sets free space and obstacle region. That means this doesn't have a function to check if free space is.
Comment by Ken_in_JAPAN on 2014-06-10:
I guess that isStateValid() is necessary to store information of costmap. I need to know the way to transfer from costmap to statespace of OMPL format.
Comment by Ken_in_JAPAN on 2014-06-15:
I deleted my answer, because anyone denied my answer. I know the reason that I intend to use a code with a bug. I want to know an essential answer to move a turtlebot with OMPL.
|
I'm following the building packages tutorial, but getting stuck at catkin_make on a brand new catkin workspace.
$ cd ~/catkin_ws
$ catkin_make
gives:
-- Using CATKIN_DEVEL_PREFIX: /home/rufus/catkin_ws/devel
-- Using CMAKE_PREFIX_PATH: /opt/ros/hydro
-- This workspace overlays: /opt/ros/hydro
-- Using PYTHON_EXECUTABLE: /usr/bin/python
-- Python version: 2.7
-- Using Debian Python package layout
-- Using CATKIN_ENABLE_TESTING: ON
-- Call enable_testing()
-- Using CATKIN_TEST_RESULTS_DIR: /home/rufus/catkin_ws/build/test_results
-- Found gtest sources under '/usr/src/gtest': gtests will be built
-- catkin 0.5.86
/home/rufus/catkin_ws/devel/env.sh: 1: /opt/ros/hydro/etc/catkin/profile.d/05.catkin_make.bash: Syntax error: "(" unexpected
Traceback (most recent call last):
File "/home/rufus/catkin_ws/build/catkin_generated/generate_cached_setup.py", line 21, in <module>
code = generate_environment_script('/home/rufus/catkin_ws/devel/env.sh')
File "/opt/ros/hydro/lib/python2.7/dist-packages/catkin/environment_cache.py", line 61, in generate_environment_script
output = subprocess.check_output([env_script, sys.executable, '-c', python_code])
File "/usr/lib/python2.7/subprocess.py", line 544, in check_output
raise CalledProcessError(retcode, cmd, output=output)
subprocess.CalledProcessError: Command '['/home/rufus/catkin_ws/devel/env.sh', '/usr/bin/python', '-c', 'import os; print(dict(os.environ))']' returned non-zero exit status 2
CMake Error at /opt/ros/hydro/share/catkin/cmake/safe_execute_process.cmake:11 (message):
execute_process(/usr/bin/python
"/home/rufus/catkin_ws/build/catkin_generated/generate_cached_setup.py")
returned error code 1
Call Stack (most recent call first):
/opt/ros/hydro/share/catkin/cmake/all.cmake:178 (safe_execute_process)
/opt/ros/hydro/share/catkin/cmake/catkinConfig.cmake:20 (include)
CMakeLists.txt:52 (find_package)
-- Configuring incomplete, errors occurred!
Invoking "cmake" failed
Apparently something goes wrong in generating the environment. Same problem happens when using the zshell instead of bash.
I'm using:
ROS Hydro in an ubuntu virtual machine
GNU bash, version 4.2.25(1)-release (i686-pc-linux-gnu)
catkin 0.5.86
cat /proc/version:
Linux version 3.2.0-60-generic-pae (buildd@allspice) (gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5) ) #91-Ubuntu SMP Wed Feb 19 04:14:56 UTC 2014
Any suggestions?
Further information, in reaction to comment 1:
I work with a clean workspace, no packages. ROS Hydro was already installed in my virtual machine. After "sudo rosdep init" and "rosdep update", that seem to work properly, I generate my catkin workspace:
mkdir -p catkin_ws/src
cd ~/catkin_ws/src
catkin_init_workspace
source /opt/ros/hydro/setup.bash
cd ~/catkin_ws
catkin_make # do make on just clean catkin workspace
This gives the error as given above. Also after starting roscore the catkin_make gives the same error.
The package catkin can be found:
$ rospack find catkin # gives:
/opt/ros/hydro/share/catkin
However, the packages catkin_pkg or catkin-pkg cannot be found.
Originally posted by rufus on ROS Answers with karma: 16 on 2014-06-10
Post score: 0
Original comments
Comment by gvdhoorn on 2014-06-10:
Can you provide some more information on how you created the workspace? Any packages present in the workspace? The error seems to indicate a syntax error in a ROS distributed file, but the error could be caused by some other error earlier on.
|
Hello to all,
I have created a catkin package and it has an external dependence to work properly. The dependence is "libmodbus-dev", which can be installed by "apt-get install libmodbus-dev" command.
I would like to install it automatically by rosdep. In other words, when somebody compile the package with catkin make / catkin make install, the external dependence "libmodbus-dev" will be installed automatically, and for each compilation it will check whether the dependence is installed or not.
Is possible something like this? What have i to do?
Originally posted by Jose Luis on ROS Answers with karma: 375 on 2014-06-10
Post score: 1
|
I have a bag file with video and imu data defined with custom messages that I want to read (especially topics /capture and /imu_raw). I know from documentation what the structure of the custom messages is. How can I read the data? Doing rosbag info on the file shows:
types:
libks/ImageSet [b3ef08c9cff052c83f5039d098add069]
pximu/AttitudeData [bc609da5ddac9016c096c67da33d8b9c]
pximu/RawIMUData [0380911195329d307d8f033bc714dbbf]
[...]
topics:
/attitude 2174 msgs : pximu/AttitudeData
/capture 3282 msgs : libks/ImageSet
/imu_raw 10873 msgs : pximu/RawIMUData
[...]
I cannot play the file with 'rosbag play', probably because rosbag doesn't know the message definitions. Therefore, I thought I needed to use migration(see http_wiki_ros_org/rosbag_migration) and provide custom message definitions (see http_wiki_ros_org/msg) and use them in a rule file. I made a new package 'bag_analyser", and added the custom messages to the 'msg' folder and compiled. E.g. for ImageSet I made a file ImageSet.msg:
Header header
sensor_msgs/Image[] images
This seems to work, e.g. for ' rosmsg show bag_analyser/ImageSet' I get:
std_msgs/Header header
uint32 seq
time stamp
string frame_id
sensor_msgs/Image[] images
std_msgs/Header header
uint32 seq
time stamp
string frame_id
uint32 height
uint32 width
string encoding
uint8 is_bigendian
uint32 step
uint8[] data
I also made messages for RawIMUData and AttitudeData. Then I generated a rules file (rules.bmr, see full output at end), adjusted the rules that needed to be adjusted and executed:
rosbag fix original_bag.bag converted_bag.bag rules.bmr
which told me "bag migrated successfully". Doing rosbag info on the converted file gives me:
types: bag_analyser/AttitudeData [bc609da5ddac9016c096c67da33d8b9c]
bag_analyser/ImageSet [b3ef08c9cff052c83f5039d098add069]
bag_analyser/RawIMUData [0380911195329d307d8f033bc714dbbf]
[...]
topics: /attitude 2174 msgs : bag_analyser/AttitudeData
/capture 3282 msgs : bag_analyser/ImageSet
/imu_raw 10873 msgs : bag_analyser/RawIMUData
My problem is that I still cannot read the file. I tried using 'rosbag play' but it simply gives me:
[ INFO] [1402332944.127314834]: Opening converted_bag.bag
[FATAL] [1402332944.127848761]: Error opening file: converted_bag.bag
I also tried reading in the file using the rosbag API, which also fails opening the file (code in image_converter.cpp below). I changed the bagfile's permissions and set it to allow read/write/execute just to make sure it wasn't that. What am I doing wrong? How can I read the data from the file? I am fairly new to ROS, so any help or tips are greatly appreciated!
File listings:
folder bag/analyser/msg
ImageSet.msg
Header header
sensor_msgs/Image[] images
RawIMUData.msg
Header header
# Measured accelerations (in x, y, z)
Vector3f acc
# Measured angular speeds (around x, y, z)
Vector3f gyro
# Measured magnetic field (around x , y, z)
Vector3f mag
Vector3f.msg
float32 x
float32 y
float32 z
AttitudeData.msg
Header header
# roll angle [rad]
float32 roll
# pitch angle [rad]
float32 pitch
# yaw angle [rad]
float32 yaw
# roll angular speed [rad/s]
float32 rollspeed
# pitch angular speed [rad/s]
float32 pitchspeed
# yaw angular speed [rad/s]
float32 yawspeed
bag_analyser/image_converter.cpp ( includes message definition for ImageSet.h and tries to use rosbag API to read file):
#include <ros/ros.h>
#include <rosbag/bag.h>
#include <rosbag/view.h>
#include <boost/foreach.hpp>
#include <message_filters/subscriber.h>
#include <message_filters/time_synchronizer.h>
#include <image_transport/image_transport.h>
#include <cv_bridge/cv_bridge.h>
#include <sensor_msgs/image_encodings.h>
#include <opencv2/imgproc/imgproc.hpp>
#include <opencv2/highgui/highgui.hpp>
#include <vector>
#include <bag_analyser/ImageSet.h>
static const std::string OPENCV_WINDOW = "Image window";
void loadBag() {
rosbag::Bag bag("~/robotics/rosbook/src/bag_analyser/bag/converted_bag.bag"); // fails here
std::string l_cam_image = "/capture";
std::vector<std::string> topics;
topics.push_back(l_cam_image);
rosbag::View view(bag, rosbag::TopicQuery(topics));
BOOST_FOREACH(rosbag::MessageInstance const m, view)
{
if (m.getTopic() == l_cam_image || ("/" + m.getTopic() == l_cam_image))
{
boost::shared_ptr<bag_analyser::ImageSet> image_array =
m.instantiate<bag_analyser::ImageSet >();
bag_analyser::ImageSet* theSetPtr = image_array.get();
bag_analyser::ImageSet theSet = *theSetPtr;
cv_bridge::CvImagePtr cv_ptr;
try
{
cv_ptr = cv_bridge::toCvCopy(theSetPtr->images[0], sensor_msgs::image_encodings::BGR8);
}
catch (cv_bridge::Exception& e)
{
ROS_ERROR("cv_bridge exception: %s", e.what());
return;
}
// Update GUI Window
cv::imshow(OPENCV_WINDOW, cv_ptr->image);
cv::waitKey(3);
}
}
bag.close();
}
int main(int argc, char** argv)
{
ros::init(argc, argv, "image_converter");
loadBag();
ros::spin();
return 0;
}
bag_analyser/CMakeLists.txt
cmake_minimum_required(VERSION 2.8.3)
project(bag_analyser)
## Find catkin macros and libraries
find_package(catkin REQUIRED COMPONENTS
cv_bridge
image_transport
message_generation
roscpp
rospy
std_msgs
rosbag
)
## System dependencies are found with CMake's conventions
find_package(Boost REQUIRED COMPONENTS system)
find_package( OpenCV REQUIRED )
## Generate messages in the 'msg' folder
add_message_files(
FILES
ImageSet.msg
RawIMUData.msg
Vector3f.msg
AttitudeData.msg
)
## Generate added messages and services with any dependencies listed here
generate_messages(
DEPENDENCIES
std_msgs
sensor_msgs
)
## CATKIN_DEPENDS: catkin_packages dependent projects also need
catkin_package(
CATKIN_DEPENDS message_runtime
)
# include_directories(include)
include_directories(
${catkin_INCLUDE_DIRS}
${OpenCV_INCLUDE_DIRS}
)
## Declare a cpp executable
add_executable(image_converter src/image_converter.cpp)
target_link_libraries ( image_converter ${OpenCV_LIBRARIES} ${catkin_LIBRARIES} )
rules.bmr
class update_pximu_RawIMUData_0380911195329d307d8f033bc714dbbf(MessageUpdateRule):
old_type = "pximu/RawIMUData"
old_full_text = """
Header header
# Measured accelerations (in x, y, z)
Vector3f acc
# Measured angular speeds (around x, y, z)
Vector3f gyro
# Measured magnetic field (around x , y, z)
Vector3f mag
================================================================================
MSG: std_msgs/Header
# Standard metadata for higher-level stamped data types.
# This is generally used to communicate timestamped data
# in a particular coordinate frame.
#
# sequence ID: consecutively increasing ID
uint32 seq
#Two-integer timestamp that is expressed as:
# * stamp.secs: seconds (stamp_secs) since epoch
# * stamp.nsecs: nanoseconds since stamp_secs
# time-handling sugar is provided by the client library
time stamp
#Frame this data is associated with
# 0: no frame
# 1: global frame
string frame_id
================================================================================
MSG: pximu/Vector3f
float32 x
float32 y
float32 z
"""
new_type = "bag_analyser/RawIMUData"
new_full_text = """
Header header
# Measured accelerations (in x, y, z)
Vector3f acc
# Measured angular speeds (around x, y, z)
Vector3f gyro
# Measured magnetic field (around x , y, z)
Vector3f mag
================================================================================
MSG: std_msgs/Header
# Standard metadata for higher-level stamped data types.
# This is generally used to communicate timestamped data
# in a particular coordinate frame.
#
# sequence ID: consecutively increasing ID
uint32 seq
#Two-integer timestamp that is expressed as:
# * stamp.secs: seconds (stamp_secs) since epoch
# * stamp.nsecs: nanoseconds since stamp_secs
# time-handling sugar is provided by the client library
time stamp
#Frame this data is associated with
# 0: no frame
# 1: global frame
string frame_id
================================================================================
MSG: bag_analyser/Vector3f
float32 x
float32 y
float32 z
"""
order = 0
migrated_types = [
("Header","Header"),]
valid = True
def update(self, old_msg, new_msg):
self.migrate(old_msg.header, new_msg.header)
#No migration path between [Vector3f] and [Vector3f]
new_msg.acc = self.get_new_class('bag_analyser/Vector3f')(old_msg.acc)
#No migration path between [Vector3f] and [Vector3f]
new_msg.gyro = self.get_new_class('bag_analyser/Vector3f')(old_msg.gyro)
#No migration path between [Vector3f] and [Vector3f]
new_msg.mag = self.get_new_class('bag_analyser/Vector3f')(old_msg.mag)
class update_libks_ImageSet_b3ef08c9cff052c83f5039d098add069(MessageUpdateRule):
old_type = "libks/ImageSet"
old_full_text = """
Header header
sensor_msgs/Image[] images
================================================================================
MSG: std_msgs/Header
# Standard metadata for higher-level stamped data types.
# This is generally used to communicate timestamped data
# in a particular coordinate frame.
#
# sequence ID: consecutively increasing ID
uint32 seq
#Two-integer timestamp that is expressed as:
# * stamp.secs: seconds (stamp_secs) since epoch
# * stamp.nsecs: nanoseconds since stamp_secs
# time-handling sugar is provided by the client library
time stamp
#Frame this data is associated with
# 0: no frame
# 1: global frame
string frame_id
================================================================================
MSG: sensor_msgs/Image
# This message contains an uncompressed image
# (0, 0) is at top-left corner of image
#
Header header # Header timestamp should be acquisition time of image
# Header frame_id should be optical frame of camera
# origin of frame should be optical center of cameara
# +x should point to the right in the image
# +y should point down in the image
# +z should point into to plane of the image
# If the frame_id here and the frame_id of the CameraInfo
# message associated with the image conflict
# the behavior is undefined
uint32 height # image height, that is, number of rows
uint32 width # image width, that is, number of columns
# The legal values for encoding are in file src/image_encodings.cpp
# If you want to standardize a new string format, join
# [email protected] and send an email proposing a new encoding.
string encoding # Encoding of pixels -- channel meaning, ordering, size
# taken from the list of strings in src/image_encodings.cpp
uint8 is_bigendian # is this data bigendian?
uint32 step # Full row length in bytes
uint8[] data # actual matrix data, size is (step * rows)
"""
new_type = "bag_analyser/ImageSet"
new_full_text = """
Header header
sensor_msgs/Image[] images
================================================================================
MSG: std_msgs/Header
# Standard metadata for higher-level stamped data types.
# This is generally used to communicate timestamped data
# in a particular coordinate frame.
#
# sequence ID: consecutively increasing ID
uint32 seq
#Two-integer timestamp that is expressed as:
# * stamp.secs: seconds (stamp_secs) since epoch
# * stamp.nsecs: nanoseconds since stamp_secs
# time-handling sugar is provided by the client library
time stamp
#Frame this data is associated with
# 0: no frame
# 1: global frame
string frame_id
================================================================================
MSG: sensor_msgs/Image
# This message contains an uncompressed image
# (0, 0) is at top-left corner of image
#
Header header # Header timestamp should be acquisition time of image
# Header frame_id should be optical frame of camera
# origin of frame should be optical center of cameara
# +x should point to the right in the image
# +y should point down in the image
# +z should point into to plane of the image
# If the frame_id here and the frame_id of the CameraInfo
# message associated with the image conflict
# the behavior is undefined
uint32 height # image height, that is, number of rows
uint32 width # image width, that is, number of columns
# The legal values for encoding are in file src/image_encodings.cpp
# If you want to standardize a new string format, join
# [email protected] and send an email proposing a new encoding.
string encoding # Encoding of pixels -- channel meaning, ordering, size
# taken from the list of strings in include/sensor_msgs/image_encodings.h
uint8 is_bigendian # is this data bigendian?
uint32 step # Full row length in bytes
uint8[] data # actual matrix data, size is (step * rows)
"""
order = 0
migrated_types = [
("Header","Header"),
("sensor_msgs/Image","sensor_msgs/Image"),]
valid = True
def update(self, old_msg, new_msg):
self.migrate(old_msg.header, new_msg.header)
self.migrate_array(old_msg.images, new_msg.images, "sensor_msgs/Image")
class update_pximu_AttitudeData_bc609da5ddac9016c096c67da33d8b9c(MessageUpdateRule):
old_type = "pximu/AttitudeData"
old_full_text = """
Header header
# roll angle [rad]
float32 roll
# pitch angle [rad]
float32 pitch
# yaw angle [rad]
float32 yaw
# roll angular speed [rad/s]
float32 rollspeed
# pitch angular speed [rad/s]
float32 pitchspeed
# yaw angular speed [rad/s]
float32 yawspeed
================================================================================
MSG: std_msgs/Header
# Standard metadata for higher-level stamped data types.
# This is generally used to communicate timestamped data
# in a particular coordinate frame.
#
# sequence ID: consecutively increasing ID
uint32 seq
#Two-integer timestamp that is expressed as:
# * stamp.secs: seconds (stamp_secs) since epoch
# * stamp.nsecs: nanoseconds since stamp_secs
# time-handling sugar is provided by the client library
time stamp
#Frame this data is associated with
# 0: no frame
# 1: global frame
string frame_id
"""
new_type = "bag_analyser/AttitudeData"
new_full_text = """
Header header
# roll angle [rad]
float32 roll
# pitch angle [rad]
float32 pitch
# yaw angle [rad]
float32 yaw
# roll angular speed [rad/s]
float32 rollspeed
# pitch angular speed [rad/s]
float32 pitchspeed
# yaw angular speed [rad/s]
float32 yawspeed
================================================================================
MSG: std_msgs/Header
# Standard metadata for higher-level stamped data types.
# This is generally used to communicate timestamped data
# in a particular coordinate frame.
#
# sequence ID: consecutively increasing ID
uint32 seq
#Two-integer timestamp that is expressed as:
# * stamp.secs: seconds (stamp_secs) since epoch
# * stamp.nsecs: nanoseconds since stamp_secs
# time-handling sugar is provided by the client library
time stamp
#Frame this data is associated with
# 0: no frame
# 1: global frame
string frame_id
"""
order = 0
migrated_types = [
("Header","Header"),]
valid = True
def update(self, old_msg, new_msg):
self.migrate(old_msg.header, new_msg.header)
new_msg.roll = old_msg.roll
new_msg.pitch = old_msg.pitch
new_msg.yaw = old_msg.yaw
new_msg.rollspeed = old_msg.rollspeed
new_msg.pitchspeed = old_msg.pitchspeed
new_msg.yawspeed = old_msg.yawspeed
Originally posted by Ketill on ROS Answers with karma: 36 on 2014-06-10
Post score: 1
|
Hi,
I met a problem of migration from dry package (rosbuild) to wet package(catkin)..I'd like to know 2 things..
1 - The problems are about the .h files come from msg files.
I did:
add_message_files(
FILES
Message1.msg
Message2.msg
)
generate_messages(
DEPENDENCIES
std_msgs
)
catkin_package(
CATKIN_DEPENDS
message_runtime
)
and in package.xml add dependency too..need i add some things like Include_library(xx)?
the .h files is in a directory named "msg_gen" some thing like a generation directory...
2 - How to use pcl package in dry package:
Because i want use pcl in a ROS dry package, but i found only the indice of configuration for wet packages. So i tied to migration dry package to wet package.
Thank you for help....
New :
I adjust most of my problems with your help, but there is always a problem rest..this is part of my CMakeList.txt
find_package(catkin REQUIRED COMPONENTS
message_generation
pcl_ros
roscpp
rospy
std_msgs
tf
sensor_msgs
geometry_msgs
nav_msgs
std_srvs
)
find_package(PCL REQUIRED)
add_message_files(FILES
aaa.msg
bbb.msg
ccc.msg
ddd.msg
)
add_service_files(FILES
Test.srv
BaseStop.srv
ttt.srv
)
generate_messages(
DEPENDENCIES
std_msgs
sensor_msgs
)
catkin_package(
CATKIN_DEPENDS
message_runtime
pcl_ros
roscpp
rospy
std_msgs
tf
sensor_msgs
geometry_msgs
nav_msgs
std_srvs
DEPENDS system_lib
)
include_directories(
${catkin_INCLUDE_DIRS}${PCL_INCLUDE_DIRS} include
)
add_library(libdxl src/dynamixel_sdk/src/dxl_hal.c)
add_library(dynamixel src/dynamixel_sdk/src/dynamixel.c)
target_link_libraries(dynamixel libdxl)
add_library(ardu_instructions_lib src/driver/ardu_instructions.cpp)
add_library(duino_driver_lib src/driver/duino_driver.cpp)
target_link_libraries(duino_driver_lib ardu_instructions_lib)
add_library(servos_lib src/servos.cpp)
target_link_libraries(servos_lib dynamixel libdxl)
add_library(base_controller_lib src/controllers/base_controller.cpp)
add_library(aaa_controller_lib src/controllers/battery_controller.cpp)
add_library(bbb_controller_lib src/controllers/joint_controller.cpp)
target_link_libraries(bbb_controller_lib servos_lib)
add_library(ccc_controller_lib src/controllers/ccc_controller.cpp)
add_library(ddd_controller_lib src/controllers/ddd_controller.cpp)
add_executable(ardu src/ardu.cpp)
target_link_libraries(ardu duino_driver_lib base_controller_lib aaa_controller_lib bbb_controller_lib ccc_controller_lib ddd_controller_lib pthread dynamixel libdxl ${catkin_LIBRARIES}${PCL_LIBRARIES})
add_dependencies(libdxl ${catkin_EXPORTED_TARGETS})
add_dependencies(dynamixel ${catkin_EXPORTED_TARGETS})
add_dependencies(ardu_instructions_lib ${catkin_EXPORTED_TARGETS})
add_dependencies(duino_driver_lib ${catkin_EXPORTED_TARGETS})
add_dependencies(servos_lib ${catkin_EXPORTED_TARGETS})
add_dependencies(base_controller_lib ${catkin_EXPORTED_TARGETS})
add_dependencies(aaa_controller_lib ${catkin_EXPORTED_TARGETS})
add_dependencies(bbb_controller_lib ${catkin_EXPORTED_TARGETS})
add_dependencies(ccc_controller_lib ${catkin_EXPORTED_TARGETS})
add_dependencies(ddd_controller_lib ${catkin_EXPORTED_TARGETS})
add_dependencies(ardu ${catkin_EXPORTED_TARGETS})
and part of my package.xml:
.....................
<build_depend>pcl_ros</build_depend>
<build_depend>pcl_msg</build_depend>
<build_depend>message_generation</build_depend>
<build_depend>roscpp</build_depend>
<build_depend>rospy</build_depend>
<build_depend>std_msgs</build_depend>
<build_depend>tf</build_depend>
<build_depend>sensor_msgs</build_depend>
<build_depend>geometry_msgs</build_depend>
<build_depend>nav_msgs</build_depend>
<build_depend>std_srvs</build_depend>
<build_depend>libpcl-all-dev</build_depend>
<!-- <build_depend version_gte="1.7.0">pcl</build_depend>-->
<!--<run_depend version_gte="1.7.0">pcl</run_depend>-->
<run_depend>libpcl-all</run_depend>
<run_depend>std_srvs</run_depend>
<run_depend>nav_msgs</run_depend>
<run_depend>geometry_msgs</run_depend>
<run_depend>sensor_msgs</run_depend>
<run_depend>tf</run_depend>
<run_depend>std_msgs</run_depend>
<run_depend>rospy</run_depend>
<run_depend>pcl_ros</run_depend>
<run_depend>pcl_msg</run_depend>
<run_depend>roscpp</run_depend>
<run_depend>message_runtime</run_depend>
The system can't find always the BaseStop.h..but it can find the aaa.h or ddd.h in the same condition.. I'm so confused..
Originally posted by loulou0219 on ROS Answers with karma: 11 on 2014-06-10
Post score: 0
Original comments
Comment by joq on 2014-06-10:
For question 2, you should be able to use PCL from a dry package. If you want to do that, please open a new question, providing information about what you did and what went wrong.
|
Hey,
I am working on implementing a kinect in my robot-arm using MoveIt. I have an .urdf file with the kinect as a block hovering above the robot. I launch the freenect-node, perform a static transform from the TFs created by the freenect-node to my robot and visualize everything in Rviz.
My problem is, that the scale of the pointcloud2 is off, the distances are to small. At first I thought that a calibration of the camera wouldn't be necessary and that my robot model was off, but after measuring a couple of distances in Rviz as well as in the real world, it seems the error comes from the kinect.
My question is, where should I start to fix is and what is the common practice to calibrate? Is it normal, that the point-cloud is off (The object is 2m away from the kinect, the length according to the point cloud is about 10 cm shorter than the actual length), or shouldn't the kinect be calibrated from the factory?
I am using freenect launch version 0.3.2 with ROS hydro on Ubuntu 12.04.
Thanks in advance,
Rabe
Originally posted by Rabe on ROS Answers with karma: 683 on 2014-06-10
Post score: 0
|
I am implementing a ColorOcTree in OctoMap. Since the default in OctoMap is to build a heightmap, given by this piece of code in octomap_server/src/OctomapServer.cpp in OctomapServer::publishAll(const ros::Time& rostime):
//create marker:
if (publishMarkerArray){
unsigned idx = it.getDepth();
assert(idx < occupiedNodesVis.markers.size());
geometry_msgs::Point cubeCenter;
cubeCenter.x = x;
cubeCenter.y = y;
cubeCenter.z = z;
occupiedNodesVis.markers[idx].points.push_back(cubeCenter);
if (m_useHeightMap){
double minX, minY, minZ, maxX, maxY, maxZ;
m_octree->getMetricMin(minX, minY, minZ);
m_octree->getMetricMax(maxX, maxY, maxZ);
double h = (1.0 - std::min(std::max((cubeCenter.z-minZ)/ (maxZ - minZ), 0.0), 1.0)) *m_colorFactor;
occupiedNodesVis.markers[idx].colors.push_back(heightMapColor(h));
}
I am seeking to change the height map into a per-voxel color Octomap.
From what is stated in the paper for octomap, I can use the child class of OcTree (ColorOcTree). From what I understand, ColorOcTree contains all the methods for OcTree, plus the average color information. So, To get a colored Octomap, rewrite OctomapServer.cpp from a OcTree based structure to an ColorOcTree structure.
My question is, in order to do this in OctomapServer.cpp, is this the correct method or is there some better way to construct per-voxel colored octomap?
EDIT: I finished changing OctomapServer.cpp and associated nodes to ColorOcTree, however I notice that the color information isn't inputted from the point cloud, as per this code in OctomapServer.cpp
It seems like it is converting a PointCloud2 cloud into a PointCloud.
void OctomapServer::insertCloudCallback(const sensor_msgs::PointCloud2::ConstPtr& cloud){
ros::WallTime startTime = ros::WallTime::now();
//
// ground filtering in base frame
//
PCLPointCloud pc; // input cloud for filtering and ground-detection
pcl::fromROSMsg(*cloud, pc);
The second question becomes, I need to extract RGB data from either PointCloud or PointCloud2, and have it in a float32 representation. Do I use PointXYZRGB instead of PointXYZ in reading the PointCloud (If so how?) Or is there some better way to do it?
EDIT2: I did change PointXYZ to PointXYZRGB and got the associated RGB Data. however, after saving that data into the ColorOcTree and trying to send the ColorRGBA message (also in float32, I did so by dividing each one of the RGB data by 255.0) to the Occupied_cells_vis_array, I get blue color only. Can anyone explain why it is only outputting blue voxels?
Originally posted by xuningy on ROS Answers with karma: 101 on 2014-06-10
Post score: 1
Original comments
Comment by AHornung on 2014-06-11:
Isn't there a version of OctomapServer for colored maps already in RGBD-SLAM?
Comment by AHornung on 2014-06-11:
OctomapServer is publishing blue voxels as visualization for occupied nodes by default, unless you enable the parameter for the height map coloring. Only then it will set a different color for each voxel.
Comment by xuningy on 2014-06-11:
Hi Armin, There is a OctomapServer for colored maps? I could not find it in the rgbdslam_freiburg directory. Can you be more specific? I realized your second comment is true, but in order to override it, is there any way? I already have extracted data from PC and i believe it is in the tree. How would I use it if I choose to modify OctomapServer.cpp? Thanks!
Comment by xuningy on 2014-06-11:
The line in RGBDSLAM package refers me to this repository, which is not the default repository in octomap_server (nor does the ros stack contains the color octomap nodes at all). Do you advise downloading this and using this package instead :https://code.google.com/p/alufr-ros-pkg/source/browse/branches/octomap_mapping_color/?r=1940#octomap_mapping_color%2Foctomap_server%2Fsrc? This is a deprecated package.
Comment by AHornung on 2014-06-12:
Here is a file called ColorOctomapServer.cpp in RGBDSLAM: https://code.google.com/p/alufr-ros-pkg/source/browse/trunk/rgbdslam_freiburg/rgbdslam/src/?r=4116
Comment by AHornung on 2014-06-12:
That code in the branches at alufr-ros-pkg is definitely outdated though.
Comment by xuningy on 2014-06-13:
Thanks Armin! I just ended up rewriting OctomapServer overall. Still need to address deprecated packages...
|
Hi everybody!
I want to know the list (or number) of subscribers on a topic programmatically. I know that I can use the rostopic list but I need that information in my node.
Thanks!
Edit: There is a method to find it: uint32_t ros::Publisher::getNumSubscribers() const
But I need to know the number of subscribers on a topic from another node and I don't have the Publisher object, just the name of the topic
Originally posted by ricardoej on ROS Answers with karma: 85 on 2014-06-10
Post score: 8
|
Hi everyone,
I'm having trouble installing packages in ROS Hydro on BeagleBone Black with Ubuntu ARM 12.04.
For example, when I tried to install vision_visp package, I did:
sudo apt-get install ros-hydro-vision-visp
But I get:
E: Unable to locate package ros-hydro-vision-visp
The same error seem to occur when I try installing other packages as well. There is no problem with the internet connection, since I can ping another computer, and also ssh from another computer into the Beaglebone. Could I have done something wrong during the Hydro or Ubuntu installation process?
Any help is much appreciated! Thank you.
Originally posted by Alvin on ROS Answers with karma: 37 on 2014-06-10
Post score: 0
|
Hi,guys. I have big trouble.....in TurtleBot2.
When I launch rviz, TurtleBot2 rotations itself........but in fact it is not rotation......
This is video: Turtlebot2 error
I use groovy in ros and Ubuntu 12.04LTS 64-bit.
Originally posted by FfoNy on ROS Answers with karma: 62 on 2014-06-10
Post score: 0
Original comments
Comment by FfoNy on 2014-06-11:
I found the problem........
"/odom" has problem but I have no idea to solve.
|
On Ubuntu Precise, I get the following error when trying to run wstool up to create a new workspace:
$ wstool up
ERROR: Cannot find required rosinstall library version, check your installation (also of vcstools) is up-to-date. One frequent cause is that rosinstall 0.5 is still installed in /usr/local/lib.
cannot import name urlopen_netrc
I've checked, and I have the latest versions of the wstool, vcstools and rosinstall libraries:
$ dpkg -l python-wstool python-vcstool python-bloom python-rosinstall
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Description
+++-===================-===================-======================================================
ii python-bloom 0.5.9-1 Bloom is a release automation tool.
ii python-rosinstall 0.7.3-1 The installer for ROS
ii python-vcstool 0.1.6-1 vcstool provides a command line tool to invoke vcs com
ii python-wstool 0.1.3-1 workspace multi-SCM commands
If I try to import the rosinstall module in ipython, I get the following stacktrace:
In [1]: import rosinstall
---------------------------------------------------------------------------
ImportError Traceback (most recent call last)
/home/hendrix/junior/src/<ipython-input-1-c1a82de03eac> in <module>()
----> 1 import rosinstall
/usr/lib/pymodules/python2.7/rosinstall/__init__.py in <module>()
31 # POSSIBILITY OF SUCH DAMAGE.
32
---> 33 import wstool.helpers
/usr/lib/pymodules/python2.7/wstool/helpers.py in <module>()
35 import codecs
36 import subprocess
---> 37 from wstool.config_elements import SetupConfigElement
38
39 ROSINSTALL_FILENAME = ".rosinstall"
/usr/lib/pymodules/python2.7/wstool/config_elements.py in <module>()
40
41 from wstool.common import samefile, MultiProjectException
---> 42 from wstool.config_yaml import PathSpec
43 from wstool.ui import Ui
44
/usr/lib/pymodules/python2.7/wstool/config_yaml.py in <module>()
33 import os
34 import yaml
---> 35 from vcstools.common import urlopen_netrc
36 from wstool.common import MultiProjectException
37
ImportError: cannot import name urlopen_netrc
I'm pretty sure that I only have rosinstall installed from debs, and the paths listed in the stack trace agree. Any thoughts?
Originally posted by ahendrix on ROS Answers with karma: 47576 on 2014-06-11
Post score: 0
Original comments
Comment by William on 2014-06-11:
That looks like a problem with vcstools, did you check to make sure it is up-to-date and that it is not installed from pip?
|
Hi , is there any way i can use EasyVR shield 2.0 with ros? I have been planning to make a speech recognition using EasyVR and managed to generate code using easyvr commander and quick synthesis. This code is successfully working in arduino , and now , i need to find libraries or packages that can enable it to work in ros groovy.
Thanks in advance,
Steve
Originally posted by manaXmizery on ROS Answers with karma: 41 on 2014-06-11
Post score: 0
|
Hi guys,
I know this might be an old topic that the robot using navigation stack keeps turning on spot and since I've not been able to searched for a suitable solution for this, I raised the question here with hope that I could get some help.
I am using Fuete navigation stack on our tracked robot of rectangular shape with differential drive. There are two cases when I found the robot was performing a weird in-place rotating:
(1) when the robot is about to enter a narrow corridor, it is very likely that the robot would rotate several rounds before going into the corridor. The rotating direction will always be clock-wise. There were cases when the robot kept turning and seemed it would never want to proceed.
(2) also when the robot was going to a narrow space, by right it only needed to turn left (anti-clockwise) for maybe just a small angle and then it could go into the place, however, in fact it insisted on turning right (clockwise) and after this big round turning then went into the place.
Some one once suggested that this might be because of the recovery behaviours. But even we disabled the recovery behaviours, the problem remained. We believe it must be the base local planner.
Has anyone ever experienced the same problem and can give some advise one this? Thanks very much.
Originally posted by dalishi on ROS Answers with karma: 89 on 2014-06-11
Post score: 0
Original comments
Comment by David Lu on 2014-06-13:
Which local planner are you using?
Comment by dalishi on 2014-06-14:
Hi David, I am using the default TrajectoryPlannerROS. So we wanted give the DWAPlannerROS a try to see if it could solve the problem but DWAPlannerROS in our fuerte does not work. I placed an issue in git and was suggested to try the new version of local planner after Fuerte. May be Hydro.
|
Hello all !
I have a package with a server that use a custom message for a service. The thing is that I need to compile twice for it to see the message for the server.
Lets say I suppress my build and devel in my catkin. Then I use catkin_make
The first time I have this error :
fatal error: open_tld_3d/model.h: No such file or directory
Then catkin_make again and everything is fine this time.
I was wondering what could cause this behavior since everything seem to be ok the second time. I guess it's just that it is not able to see the message created at first and then on the second run it is able to finally find it but I don't know what to change to make it find the message on the firs run.
I don't want to put all my CMakeList.txt here (because they're big) so if you could please tell me what could be relevant to find the reason and I'll put it on this post.
Thanks a lot
Originally posted by Maya on ROS Answers with karma: 1172 on 2014-06-11
Post score: 0
|
Dear all.
I just compiled navigation_experimental-hydro-devel with catkin-make in ROS hydro. However, it does not compile due to changes in costmap2d.
Just wondering if there might be any patches or some solution to make sbpl compile in hydro.
In advance thank you.
Originally posted by acp on ROS Answers with karma: 556 on 2014-06-11
Post score: 0
Original comments
Comment by acp on 2014-06-30:
Hi, thank you very much for your answer, I have solved the issues with unicycleplussidewaysplusbackturn.mprim, however I have another issue, Sometimes it get stuck when it gets trap in inflated obstacles even though there is enough space around the robot.
I found the package sbpl_recovery in this site thttps://github.com/ros-planning/navigation_experimental/tree/hydro-devel/sbpl_recovery hat I think it could help to recover when the robot gets trap. But the package does compile under Hydro due to changes in costmap2d. Or is there some other solution.
|
Hi,
I want to use a package::header as usual like this:
void callbackBB(package_msgs::header msgs_x)
{
}
but the compiler indicates the headerfile is ambiguous and should be used like
header()
or
header(const package_msgs::header<#0> &)
Does this mean this header can't be instantiated ? The writer doesn't give support so can't ask. Thanks.
Code sample:
void callback_BB_Twist(amigo_msgs::arm_links msgs_ls_t)
Error by Eclipse
Description
'amigo_msgs::arm_links' is ambiguous '
Candidates are:
arm_links()
arm_links(const amigo_msgs::arm_links<#0> &)
Compiler error:
error: ‘amigo_msgs::arm_links’ is not a type
A full minimal example:
#include "amigo_msgs/arm_links.h"
class ImageP
{
void callbackBB(amigo_msgs::armlinks msgs_x)
{
}
ImageP(ros::nodehandle* n)
{
ls_sub = n->subscribe("<topic>", &ImageP::callbackBB, this);
}
void run()
{
}
};
int main()
{
ros::init(argc,argv,"imagedo");
ros::Rate loop_rate(30);
while(ros::ok())
{
imagep.run();
ros::spinOnce();
loop_rate.sleep;
}
}
Originally posted by hvn on ROS Answers with karma: 72 on 2014-06-11
Post score: 0
Original comments
Comment by ahendrix on 2014-06-11:
That doesn't make much sense. Can you include the code sample you're trying to compile and the exact compiler output?
Comment by hvn on 2014-06-11:
I edited the question. Hope you can make some sense out of it.
Comment by ahendrix on 2014-06-11:
Your include #include "amigo_msgs::arm_links" doesn't look right at all. Is that a typo?
Comment by hvn on 2014-06-12:
Yes, that was a typo. I corrected it.
|
I install the driver and ros package successfully but when I launch this commande:
>$ roslaunch ueye_cam bayer_rggb_image_proc.launch
I got this error:
[bayer_rggb_image_proc.launch] is neither a launch file in package [ueye_cam] nor is [ueye_cam] a launch file name
What's going wrong ?
Originally posted by ROSkinect on ROS Answers with karma: 751 on 2014-06-11
Post score: 0
|
Hi there,
I am trying to put a delay between a movement of turtlebot so that I can execute the movement step by step.
However, the behavior of the turtlebot is different from what I expected. It's only execute the first movement and skip the other command. Could anybody help me out here? Here I attached my sample of program. Thank you.
#include <ros/ros.h>
#include <stdlib.h>
#include <iostream.h>
#include <geometry_msgs/Twist.h>
#include <geometry_msgs/Pose.h>
#include <numeric>
using namespace std;
ros::Publisher pub_vel;
geometry_msgs::Twist cmdvel;
geometry_msgs::Pose Curr_Loc;
void odomCB(const nav_msgs::Odometry::ConstPtr& msg)
{
Curr_Loc = msg->pose.pose;
double x=msg->pose.pose.position.x;
double y=msg->pose.pose.position.y;
double Z=msg->pose.pose.orientation.z;
double W=msg->pose.pose.orientation.w;
cout<<"Current location: "<<x<<", "<<y<<" Orientation "<<Z<<", "<<W<<endl;
cmdvel.angular.z=0.0;
cmdvel.linear.x=0.2;
usleep(300000); //delay
cmdvel.angular.z=-0.2;
cmdvel.linear.x=0.0;
usleep(300000); //delay
pub_vel.publish(cmdvel);
}
int main(int argc, char** argv)
{
ros::init(argc, argv, "sequence move");
ros::NodeHandle n;
pub_vel=n.advertise<geometry_msgs::Twist>("cmd_vel",1);
pub_vel.publish(cmdvel);
ros::Subscriber Sub_Odom=n.subscribe("odom",1,odomCB); //subcribe
ros::spin();
return 0;
}
Originally posted by nadal11 on ROS Answers with karma: 23 on 2014-06-11
Post score: 0
|
when i am trying to run the cmd i am geting the fallowing error
Xlib: extension "XInputExtension" missing on display ":10.0".
python: Fatal IO error 11 (Resource temporarily unavailable) on X server
i was fallowing ur tutorial it would be a great help if u can rply asap
i am running ubuntu 12.04 in a virtual sys
Originally posted by nishok on ROS Answers with karma: 1 on 2014-06-11
Post score: 0
Original comments
Comment by Miquel Massot on 2014-06-12:
are you calling ssh with -XY flags?
Comment by nishok on 2014-06-12:
i am very new to this i was following ros tutorial when i used this cmd i got that error. from last 2 days i am trying really hard for a solution
this was the tutorial http://wiki.ros.org/ROS/Tutorials/UnderstandingTopics
|
I am trying to integrate leap motion sensor with youBot. I wrote a test publisher to move the joints. However, when I run the python script, I am getting this error:
youbot@youbot-desktop:~$ rosrun youbot_leap leap_armcontrol.py Traceback (most recent call last): File "/home/youbot/catkin_ws/src/youbotleap/scripts/leap_armcontrol.py", line 96, in <module> sender() File "/home/youbot/catkin_ws/src/youbotleap/scripts/leap_armcontrol.py", line 25, in sender msg.positions.joint_uri = "arm_joint_1" AttributeError: 'list' object has no attribute 'joint_uri'
While through the terminal, it runs fine on the bot:
youbot@youbot-desktop:~/catkin_ws$ rostopic pub -1 /arm_1/arm_controller/position_command brics_actuator/JointPositions '{positions:[{joint_uri: arm_joint_5, unit: rad, value: 1}]}' publishing and latching message for 3.0 seconds
The message:
youbot@youbot-desktop:~$ rosmsg show brics_actuator/JointPositions brics_actuator/Poison poisonStamp string originator string description float32 qos brics_actuator/JointValue[] positions time timeStamp string joint_uri string unit float64 value
Here's the code:
import rospy
from brics_actuator.msg import JointPositions
pub_youbotleap_arm = rospy.Publisher('arm_1/arm_controller/position_command', JointPositions)
rospy.init_node('armcontrol')
rate = rospy.Rate(20)
msg = JointPositions()
msg.positions.joint_uri = "arm_joint_1"
msg.positions.unit = "rad"
msg.positions.value = 2
pub_youbotleap_arm.publish(msg)
if __name__ == '__main__':
sender()
rospy.spin()
Originally posted by ratneshmadaan on ROS Answers with karma: 71 on 2014-06-11
Post score: 0
|
Hey all,
Im quite new to ROS, did a lot of tutorial stuff lately and didn't find an answer in the answers database.
My program has 2 frames. A fixed "world" frame and a "ego" frame, that is moving within the fixed one. Rviz is set up with a .rviz config file. Now I wonna know, if it's possible to focus the camera on the moving frame and update camera every time the moving frame changes relatively to the fixed frame.
If yes, do I have to modify my .rviz config file or my program?
I think these are the important lines of my .rviz config file:
Views:
Current:
Class: rviz/Orbit
Distance: 139.139
Focal Point:
X: -1.5004
Y: 59.5032
Z: -26.4407
Name: Current View
Near Clip Distance: 0.01
Pitch: 0.839797
Target Frame: <Fixed Frame>
Value: Orbit (rviz)
Yaw: 5.10348
edit Thanks for your answers so far. But It turned out i meant something different to what I explained ^^ I dont want to move things relative to the ego frame. I still want to target the world frame, but tell rviz to set the focal point according to the ego frame that is moving within the world frame.
I found the documentation of the rviz::VisualizationManager that controls the visualization of rviz:
For example, there's rviz::ViewController with a method lookAt(float x, float y, float z) or
rviz::OrbitViewController with a method move(float x, float y, float z) that might work in this case, but I don't quite find a way to use these in my program.
Got any ideas on that?
Thanks in advance!
greetz Joey
Originally posted by JoeayMB on ROS Answers with karma: 1 on 2014-06-11
Post score: 0
|
Hi, I'm new and just going through the turtlesim tutorials. When I probe the variables with rqt_plot and watch them change over time, I would really like to expand the x-axis from a 5 second window to an n-second window, in order to see larger patterns, but I don't know how even after some googling. Thoughts? One can pause the graph and change x-min and x-max in the Figure options, but that only works when the graph is paused. The change vanishes once you turn auto-scrolling back on.
Originally posted by Eric Schneider on ROS Answers with karma: 60 on 2014-06-11
Post score: 0
|
Hello there,
I am following the tutorial (I can't publish links! The title is: "Installing ROS Indigo onto NAO with help of virtual-nao") from the ROS Wiki, which involves compiling ROS to a virtual Nao, before copying files to the real robot. I had some excellent help with a problem from yesterday, so was hoping someone might be able to help once again.
I am now at the stage of copying packages from the virtual Nao to the actual Nao. Packages such as rosversion, rospkg, lz4 etc. appear to have been copied across successfully. However, the package "Netifaces" is giving me problems now. I have attempted to copy multiple folders/packages called "netifaces" or "netifaces-0.10.4-py2.7-linux-i686.egg" into the following locations - all of which give me the same (or very similar) errors:
/home/nao/nao_ros_ws/install_isolated/lib/python2.7/site-packages
/usr/lib/python2.7/site-packages/
/home/nao/.local/lib/python2.7/site-packages
It is worth mentioning these locations are where I have copied all of the other packages, unless suggested otherwise in the Wiki.
However, when attempting the following commands:
$ ssh nao@<Nao_IP>
$ source install_isolated/setup.bash
$ roslaunch nao_bringup nao.launch force_python:=true
the following error is displayed (there is no cut&paste from the VM - I have to type so please forgive spelling errors):
... logging to /home/nao/.ros/log/3c8e50e2-9959-11db-b7b2-0001c005b836/roslaunch
-nao-13384.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.
;/home/nao/nao_ros_ws/install_isolated/share/nao_bringup/nao.launch
DEPRECATED IN HYDRO:
The <include> tag should be prepended with 'xacro' if that is the intended use
of it, such <xacro:include ...>. Use the following script to fix incorrect
xacro includes:
sed -i 's/<include/<xacro:include/g' 'find . -iname *.xacro'
DEPRECATED IN HYDRO:
The <include> tag should be prepended with 'xacro' if that is the intended use
of it, such <xacro:include ...>. Use the following script to fix incorrect
xacro includes:
sed -i 's/<include/<xacro:include/g' 'find . -iname *.xacro'
Traceback (most recent call last):
File "/home/nao/nao_ros_ws/install_isolated/lib/python2.7/site-packages/rosla
unch/__init__.py", line 279, in main
p.start()
File "/home/nao/nao_ros_ws/install_isolated/lib/python2.7/site-packages/rosla
unch/parent.py", line 258, in start
self._start_infrastructure()
File "/home/nao/nao_ros_ws/install_isolated/lib/python2.7/site-packages/rosla
unch/parent.py", line 206, in start_infrastucture
self._load_config()
File "/home/nao/nao_ros_ws/install_isolated/lib/python2.7/site-packages/rosla
unch/parent.py", line 121, in _load_config
self.config = roslaunch.config.load_config_default(self.roslaunch_files, sel
f.port, verbose=self.verbose)
File "/home/nao/nao_ros_ws/install_isolated/lib/python2.7/site-packages/rosla
unch/config.py", line 458, in load_config_default
config.assign_machines()
File "/home/nao/nao_ros_ws/install_isolated/lib/python2.7/site-packages/rosla
unch/config.py", line 218, in assign_machines
if [m for m in machine_unify_dict.itervalues() if not is_machine_local(m)]:
File "/home/nao/nao_ros_ws/install_isolated/lib/python2.7/site-packages/rosla
unch/core.py", line 91, in is_machine_local
local_addresses = ['localhost'] + rosgraph.network.get_local_addresses()
File "/home/nao/nao_ros_ws/install_isolated/lib/python2.7/site-packages/rosgra
ph/network.py", line 215, in get_local_addresses
import netifaces
ImportError: No module named netifaces
Once again, I am using VirtualBox Graphical User Interface Version 4.2.10_Ubuntu r84101.
The OpenNao image is "opennao-vm-2.0.1.54.ova"
Any help, please feel free to suggest something.
Thanks
Originally posted by Dominic on ROS Answers with karma: 11 on 2014-06-11
Post score: 0
|
I have been following this tutorial: http://moveit.ros.org/wiki/Kinematics/IKFast while attempting to setup the ikfast solver for a ur5. I have gotten to the point where I am required to make a collada .dae file from the urdf file provided by the universal_robot repository. I have attempted to use collada_urdf to convert the file with the command:
rosrun collada_urdf urdf_to_collada ur5_robot.urdf ur5_robot.dae
however, this fails and gives the following terminal output:
[ WARN] [1402506614.940955494]: failed to load resource /home/robotcontroller/catkin_ws/src/universal_robot/ur_description/meshes/ur5/visual/Base.dae
[ WARN] [1402506614.941741160]: failed to load resource /home/robotcontroller/catkin_ws/src/universal_robot/ur_description/meshes/ur5/visual/Shoulder.dae
[ WARN] [1402506614.942159294]: failed to load resource /home/robotcontroller/catkin_ws/src/universal_robot/ur_description/meshes/ur5/visual/UpperArm.dae
[ WARN] [1402506614.942558970]: failed to load resource /home/robotcontroller/catkin_ws/src/universal_robot/ur_description/meshes/ur5/visual/Forearm.dae
[ WARN] [1402506614.943012926]: failed to load resource /home/robotcontroller/catkin_ws/src/universal_robot/ur_description/meshes/ur5/visual/Wrist1.dae
[ WARN] [1402506614.943426780]: failed to load resource /home/robotcontroller/catkin_ws/src/universal_robot/ur_description/meshes/ur5/visual/Wrist2.dae
[ WARN] [1402506614.943796708]: failed to load resource /home/robotcontroller/catkin_ws/src/universal_robot/ur_description/meshes/ur5/visual/Wrist3.dae
I/O error : No such file or directory
I/O error : No such file or directory
error : xmlNewTextWriterFilename : cannot open uri
Document successfully written to ur5_robot.dae
despite the "document successfully written" message, I can not find any output file named ur5_robot.dae. Is there another way to convert these files? Or another way to install IKFast to use with a ur5?
Originally posted by airplanesrule on ROS Answers with karma: 110 on 2014-06-11
Post score: 2
Original comments
Comment by gvdhoorn on 2014-06-11:
It is considered more 'future-proof' to include as much as possible any error text / output directly in your question, as links to services like pastebin can go stale. That would leave future readers guessing as to what the error actually was. I've edited your question to include it.
Comment by Stephane Caron on 2015-03-19:
Same problem here on a fresh install of ROS Indigo, Ubuntu 14.04.2...
Comment by gvdhoorn on 2015-03-19:
I've seen more people report problems with trying to convert from urdt to dae on Indigo. See robot_model/issues/89 fi.
|
Hi
I am really new with ROS, what I want to do is track the skeleton using openni_tracker with groovy which is already working but I need to get the data from the joints (position) and I can see it with rostopic echo /tf, but my I have some questions.
1.- How can I actually interpret the output values?
2.- The openni_tracker is path is "opt/ros/groovy/stacks/openni_tracker" and I do not know how to write a subscriber to the transforms, I saw the tutorial but did not help much
3.- Is there any way I can put the openni tracker inside my own workspace? because I tried several things but it kept thrwoing errors during the rosmake
Any help will be much appreciated
Originally posted by morenot on ROS Answers with karma: 1 on 2014-06-11
Post score: 0
|
Hi,
I'm using Roscopter package and want to send some waypoints to my copter.
The /waypoint is a service I can find using rosservice list
they type of /waypoint is roscopter/SendWaypoint I use rossrv show to check the type format:
roscopter/Waypoint waypoint
uint8 TYPE_NAV=1
uint8 TYPE_CONDITION_YAW=2
uint8 TYPE_CONDITION_CHANGE_ALT=3
uint8 TYPE_TAKEOFF=4
int32 latitude
int32 longitude
int32 altitude
uint16 pos_acc
uint8 speed_to
uint16 hold_time
int32 yaw_from
int32 pan_angle
int32 tilt_angle
uint8 waypoint_type
---
bool result
then I run the command:
rosservice call /waypoint 15 22 0 40 0 30 3 0 0 0
I put 10 arguments for 10 parameters but got the error:
ERROR: Incompatible arguments to call service:
Too many arguments:
* Given: [15, 22, 0, 40, 0, 30, 3, 0, 0, 0]
* Expected: ['waypoint']
Provided arguments are:
* 15 (type int)
* 22 (type int)
* 0 (type int)
* 40 (type int)
* 0 (type int)
* 30 (type int)
* 3 (type int)
* 0 (type int)
* 0 (type int)
* 0 (type int)
Service arguments are: [waypoint.latitude waypoint.longitude waypoint.altitude waypoint.pos_acc waypoint.speed_to waypoint.hold_time waypoint.yaw_from waypoint.pan_angle waypoint.tilt_angle waypoint.waypoint_type]
the content of waypoint.msg
# latitude and longitude given in decimal degrees (* 10^7)
int32 latitude
int32 longitude
# height in mm
int32 altitude
# posAcc given in mm
uint16 pos_acc
# max speed to travel to waypoint in % of 100
uint8 speed_to
# time to stay at waypoint in ms
uint16 hold_time
# yawFrom angle given in degrees (* 1000)
int32 yaw_from
# camera pan and tilt angles during waypoint travel given in degrees (* 1000)
int32 pan_angle
int32 tilt_angle
# Type of Waypoint
uint8 waypoint_type
uint8 TYPE_NAV = 1
uint8 TYPE_CONDITION_YAW = 2
uint8 TYPE_CONDITION_CHANGE_ALT = 3
uint8 TYPE_TAKEOFF = 4
Then I used the following format but there is still an error:
>rosservice call /waypoint "{waypoint.latitude: 15, waypoint.longitude: 22, waypoint.speedTo: 0, waypoint.altitude: 40, waypoint.hold_time: 0, waypoint.yaw_from: 30, waypoint.pos_acc: 3, waypoint.pan_angle: 0,waypoint.tilt_angle: 0,waypoint_type: 1}"
ERROR: Incompatible arguments to call service:
No field name [waypoint.longitude]
Provided arguments are:
* {'waypoint.longitude': 22, 'waypoint.speedTo': 0, 'waypoint.altitude': 40, 'waypoint.tilt_angle': 0, 'waypoint.pan_angle': 0, 'waypoint.latitude': 15, 'waypoint.hold_time': 0, 'waypoint.yaw_from': 30, 'waypoint_type': 1, 'waypoint.pos_acc': 3} (type dict)
Service arguments are: [waypoint.latitude waypoint.longitude waypoint.altitude waypoint.pos_acc waypoint.speed_to waypoint.hold_time waypoint.yaw_from waypoint.pan_angle waypoint.tilt_angle waypoint.waypoint_type]
So I think I should send all the data in one group as the type waypoint, but I don't know what to do...
Thanks
Originally posted by lanyusea on ROS Answers with karma: 279 on 2014-06-11
Post score: 1
|
Hi All,
I am having a problem with an undefined reference when attempting to use tf with rospy.
The error message is:
[imu_cmp_sync_stick-16] process has died [pid 8677, exit code 1, cmd /home/mech801/catkin_ws/src/ros_opto22/src/imu_cmp.py imu1:=/imu_sync/stick_imu __name:=imu_cmp_sync_stick __log:=/home/mech801/.ros/log/6aec55c6-f1d8-11e3-a955-0002b333179f/imu_cmp_sync_stick-16.log].
log file: /home/mech801/.ros/log/6aec55c6-f1d8-11e3-a955-0002b333179f/imu_cmp_sync_stick-16*.log
Traceback (most recent call last):
File "/home/mech801/catkin_ws/src/ros_opto22/src/imu_cmp.py", line 46, in <module>
import tf
File "/home/mech801/catkin_ws/devel/lib/python2.7/dist-packages/tf/__init__.py", line 34, in <module>
exec(__fh.read())
File "<string>", line 28, in <module>
ImportError: /home/mech801/catkin_ws/devel/lib/python2.7/dist-packages/tf/_tf.so: undefined symbol: _ZN3ros7console13g_initializedE
Clearly there is a problem with the linking of the function ros::console::g_initialized(). However, I am not sure how to fix it, as this is a Python program and I am getting a C++ linker error.
catkin_make works fine, even on a 100% clean catkin_ws directory (i.e. devel and build directories deleted before running catkin_make again).
The python code segment that causes the error is an import tf directive. This can be proved by running python and attempting to import tf at the command prompt.
>>> import tf
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/mech801/catkin_ws/src/geometry/tf/src/tf/__init__.py", line 28, in <module>
from _tf import *
ImportError: No module named _tf
Note that the tf package has been installed and its directory tree exists as /opt/ros/groovy/lib/python2.7/dist-packages/tf. I am not sure why it's trying to read it form my local catkin_ws directory tree.
Thanks,
Bart
Originally posted by bjem85 on ROS Answers with karma: 163 on 2014-06-11
Post score: 0
|
Hi, I'm very new to ROS. I just want to know, in this tutorial, for hydro turtlebot, wiki.ros.org/turtlebot_simulator/Tutorials/hydro/Explore%20the%20Gazebo%20world, where we have the 3D view in Gazebo while having the robot's view, how can I achieve that? Can someone tell me how can I have this kind of synchronization please?
In addition, can I also have a synchronized 2D overlooking map of the building of the world we have in Gazebo, such that the location of the robot changes accordingly while we move the robot in Gazebo?
Thanks so much.
Originally posted by JJ on ROS Answers with karma: 23 on 2014-06-11
Post score: 0
Original comments
Comment by JJ on 2014-06-11:
My Karma is not enough to add links. The link above should have http:// before it =) thanks!
|
rosmake ardrone_autonomy is ok, but rosmake tum_ardrone has problem. All source from wiki.ros.org/tum_ardrone.
My error is showed as follows:
{-------------------------------------------------------------------------------
cd thirdparty && make
make[1]: Entering directory /home/yaya/fuerte_workspace/tum_ardrone/thirdparty' making third party libs cd libcvd && make make[2]: Entering directory /home/yaya/fuerte_workspace/tum_ardrone/thirdparty/libcvd'
make[2]: Nothing to be done for all'. make[2]: Leaving directory /home/yaya/fuerte_workspace/tum_ardrone/thirdparty/libcvd'
cd gvars3 && make
make[2]: Entering directory /home/yaya/fuerte_workspace/tum_ardrone/thirdparty/gvars3' make[2]: Nothing to be done for all'.
make[2]: Leaving directory /home/yaya/fuerte_workspace/tum_ardrone/thirdparty/gvars3' make[1]: Leaving directory /home/yaya/fuerte_workspace/tum_ardrone/thirdparty'
make -f Makefile_package
make[1]: Entering directory /home/yaya/fuerte_workspace/tum_ardrone' mkdir -p bin cd build && cmake -Wdev -DCMAKE_TOOLCHAIN_FILE=rospack find rosbuild`/rostoolchain.cmake ..
[rosbuild] Building package tum_ardrone
Failed to invoke /opt/ros/fuerte/bin/rospack deps-manifests tum_ardrone
[rospack] Error: package/stack tum_ardrone depends on non-existent package tld_tracker
CMake Error at /opt/ros/fuerte/share/ros/core/rosbuild/public.cmake:129 (message):
Failed to invoke rospack to get compile flags for package 'tum_ardrone'.
Look above for errors from rospack itself. Aborting. Please fix the
broken dependency!
Call Stack (most recent call first):
/opt/ros/fuerte/share/ros/core/rosbuild/public.cmake:203 (rosbuild_invoke_rospack)
CMakeLists.txt:16 (rosbuild_init)
-- Configuring incomplete, errors occurred!
make[1]: *** [all] Error 1
make[1]: Leaving directory `/home/yaya/fuerte_workspace/tum_ardrone'
[ rosmake ] Output from build of package tum_ardrone written to:
[ rosmake ] /home/yaya/.ros/rosmake/rosmake_output-20140612-113318/tum_ardrone/build_output.log
[rosmake-0] Finished <<< tum_ardrone [FAIL] [ 0.10 seconds ]
[ rosmake ] Halting due to failure in package tum_ardrone.
[ rosmake ] Waiting for other threads to complete.
[ rosmake ] Results:
[ rosmake ] Built 27 packages with 1 failures.
[ rosmake ] Summary output to directory
I just start to use ROS, and spend a lot of time to this problem above, but still can't solve this error. Plase help me, thank you in advance.
Originally posted by yaya on ROS Answers with karma: 1 on 2014-06-11
Post score: 0
|
I am using OpenCV to create some random numbers. I initialize the generator as:
RNG rng( 0xFFFFFFFF );
And then to get a number:
rng.uniform( 0, 100);
But everytime I run my program the generated sequence is the same. How do I get a different sequence?
Originally posted by Luis Ruiz on ROS Answers with karma: 114 on 2014-06-12
Post score: 0
|
How do i increase hokuyo URG-04LX-01 to scan at a higher Frequency.
current it is 10Hz. i have add param name="Skip" value = "1"/ to my launch file, but a i increase the Value the Frequency Drop
Originally posted by vinod9910 on ROS Answers with karma: 61 on 2014-06-12
Post score: 0
|
I'm trying to roslaunch ardrone_driver. I have installed the ardrone_autonomy and tum_ardrone packages. when i try to roslaunch ardrone_driver i get this message:
[ardrone_driver-1] process has died
[pid 19905, exit code -11, cmd
/opt/ros/hydro/ardrone_autonomy/bin/ardrone_driver
__name:=ardrone_driver __log:=/home/michael/.ros/log/1b4dd950-f22c-11e3-a388-d0df9a5bc38d/ardrone_driver-1.log].
log file:
/home/michael/.ros/log/1b4dd950-f22c-11e3-a388-d0df9a5bc38d/ardrone_driver-1*.log
all processes on machine have died,
roslaunch will exit shutting down
processing monitor... ... shutting
down processing monitor complete done
And if i leave it long enough it says:
Timeout when reading navdatas -
resending a navdata request on port
5554
If someone knows any solution to this problem i would appreciate the help.
I'm using ROS Hydro on Ubuntu 12.04. The ardrone is an AR Drone 2.0 firmware 2.3.3
Originally posted by Michael Panayiotou on ROS Answers with karma: 61 on 2014-06-12
Post score: 1
|
is the data obtained from asus xtion pro using rgbdslam in meters??
i kept the object against a wall whch is 3m away, But i am not able to make sense of the depth values for the scene in the PCD file,
the depth value fluctuates between -1 to 3
Originally posted by SangeethaKrishnan on ROS Answers with karma: 1 on 2014-06-12
Post score: 0
|
I am working on ROS and Opencv. I am able to run the code but after some times the code stops and show the error Segmentation Fault (Core Dumped). The following is the code in which a quadrotor is finding the color box which I will modify by giving the values of RGB through trackbars. I have added some of the debugging statements to find out the line of error. and I think the line of error is hsv=cv2.cvtColor(cv_image,cv2.COLOR_BGR2HSV)
The following is the whole code
#!/usr/bin/env python
import roslib
import sys
import time
import math
import rospy
import cv2
import cv2.cv as cv
import numpy as np
from geometry_msgs.msg import PoseStamped
from geometry_msgs.msg import Vector3
from geometry_msgs.msg import Twist
from geometry_msgs.msg import Wrench
from geometry_msgs.msg import Pose
from geometry_msgs.msg import Point
from sensor_msgs.msg import NavSatFix
from sensor_msgs.msg import CameraInfo
from sensor_msgs.msg import Image
from sensor_msgs.msg import RegionOfInterest
from cv_bridge import CvBridge, CvBridgeError
from rospy.numpy_msg import numpy_msg
H_MIN = 0
H_MAX = 255
V_MIN = 0
V_MAX = 255
S_MIN = 0
S_MAX = 255
class test_vision_node_fly:
def __init__(self):
print('a')
self.image_pub = rospy.Publisher("quadrotor/videocamera1/camera_info",Image)
print('b')
self.ROI = rospy.Publisher("roi", RegionOfInterest)
print('c')
rospy.sleep(1)
print('d')
self.cv_window_name = "Image window"
print('e')
cv.NamedWindow(self.cv_window_name, 0)
print('f')
cv.NamedWindow("trackbars" , 0)
print('g')
self.bridge = CvBridge()
print('h')
self.image_sub = rospy.Subscriber("quadrotor/videocamera1/image",Image,self.callback)
print('i')
rospy.loginfo("Waiting for image topics...")
print('j')
def on_trackbar(self,x):
global H_MAX
global H_MIN
global S_MAX
global S_MIN
global V_MAX
global V_MIN
print('k')
H_MIN = cv2.getTrackbarPos('H_MIN', 'trackbars')
H_MAX = cv2.getTrackbarPos('H_MAX', 'trackbars')
S_MAX = cv2.getTrackbarPos('S_MAX', 'trackbars')
S_MIN = cv2.getTrackbarPos('S_MIN', 'trackbars')
V_MIN = cv2.getTrackbarPos('V_MIN', 'trackbars')
V_MAX = cv2.getTrackbarPos('V_MAX', 'trackbars')
print('l')
pass
def callback(self,data):
""" Convert the raw image to OpenCV format using the convert_image() helper function """
cv_image = self.convert_image(data)
print('m')
# Convert the image to a Numpy array since most cv2 functions
# require Numpy arrays.
cv_image = np.array(cv_image, dtype=np.uint8)
print('n')
""" Apply the CamShift algorithm using the do_camshift() helper function """
cv_image = self.do_camshift(cv_image)
print('o')
""" Refresh the displayed image """
cv.ShowImage(self.cv_window_name, cv_image)
print('p')
def convert_image(self, ros_image):
try:
cv_image = self.bridge.imgmsg_to_cv(ros_image, "bgr8")
print('q')
return cv_image
except CvBridgeError, e:
print e
def do_camshift(self, cv_image):
''' converting bgr to hsv '''
print('r')
hsv=cv2.cvtColor(cv_image,cv2.COLOR_BGR2HSV)
print('s')
'''creating trackbars'''
cv2.createTrackbar('H_MIN', 'trackbars', H_MIN, H_MAX, self.on_trackbar)
cv2.createTrackbar('H_MAX', 'trackbars', H_MAX, H_MAX, self.on_trackbar)
cv2.createTrackbar('S_MIN', 'trackbars', S_MIN, S_MAX, self.on_trackbar)
cv2.createTrackbar('S_MAX', 'trackbars', S_MAX, S_MAX, self.on_trackbar)
cv2.createTrackbar('V_MIN', 'trackbars', V_MIN, V_MAX, self.on_trackbar)
cv2.createTrackbar('V_MAX', 'trackbars', V_MAX, V_MAX, self.on_trackbar)
print('t')
''' threshdolding '''
COLOR_MIN = np.array([H_MIN, S_MIN, V_MIN],dtype=np.uint8)
print('u')
COLOR_MAX = np.array([H_MAX, S_MAX, V_MAX],dtype=np.uint8)
print('v')
mask=cv2.inRange(hsv, COLOR_MIN, COLOR_MAX)
print('w')
new_mask = mask.copy()
print('z')
# Bitwise-AND mask and original image
res = cv2.bitwise_and(cv_image,cv_image, mask= mask)
print('aa')
#removing noise
kernel = np.ones((12,12),np.uint8)
print('ab')
new_mask = cv2.morphologyEx(new_mask, cv2.MORPH_CLOSE, kernel)
print('ac')
new_mask = cv2.morphologyEx(new_mask, cv2.MORPH_OPEN, kernel)
print('ad')
contours, hierarchy = cv2.findContours(new_mask,cv2.RETR_TREE,cv2.CHAIN_APPROX_SIMPLE)
print('ae')
# Draw contours on the original image
cv2.drawContours(cv_image, contours, -1, (0,0,0), 3)
print('af')
x,y,w,h = cv2.boundingRect(contours[-1])
print('ag')
cv2.rectangle(cv_image,(x,y),(x+w,y+h),(0,254,0),3)
print('ah')
if x>0 or y>0 or w>0 or h>0:
print('ai')
roi = RegionOfInterest()
print('aj')
roi.x_offset = x
print('ak')
roi.y_offset = y
print('al')
roi.width = w
roi.height = h
self.ROI.publish(roi)
print('am')
''' displaying'''
print('an')
cv2.imshow("Image window", cv_image)
print('ao')
cv2.imshow("mask", mask)
print('ap')
cv2.imshow("resulatant", res)
cv.WaitKey(3)
print('aq')
def stop():
cmd = rospy.Publisher("/quadrotor/rotorcraftvelocity", Twist)
motion = Twist()
motion.linear.x = +0.0
motion.linear.y = +0.0
motion.linear.z = +0.0
cmd.publish(motion)
print 'stop'
def left():
cmd = rospy.Publisher("/quadrotor/rotorcraftvelocity", Twist)
motion = Twist()
motion.linear.y = -0.2
cmd.publish(motion)
print 'left'
def right():
cmd = rospy.Publisher("/quadrotor/rotorcraftvelocity", Twist)
motion = Twist()
motion.linear.y = +0.2
cmd.publish(motion)
print 'right'
def straight():
cmd = rospy.Publisher("/quadrotor/rotorcraftvelocity", Twist)
motion = Twist()
motion.linear.x = -0.2
cmd.publish(motion)
print 'straight'
def back():
cmd = rospy.Publisher("/quadrotor/rotorcraftvelocity", Twist)
motion = Twist()
motion.linear.x = +0.2
cmd.publish(motion)
print 'back'
def up():
cmd = rospy.Publisher("/quadrotor/rotorcraftvelocity", Twist)
motion = Twist()
motion.linear.z = +0.1
cmd.publish(motion)
print 'up'
def find(argv):
vn = test_vision_node_fly()
print('ar')
print('yes')
def where(msg):
global x
global y
global z
x = msg.pose.position.x
y = msg.pose.position.y
z = msg.pose.position.z
if z < 2.5 and y <= -1 and y > -1.09:
up()
find(sys.argv)
#stop()
print('1')
print(z)
elif y > -2.4 and z > 2.498 and z < 2.6 and x >= 0 and x < 0.5:
left()
print(y)
print('2')
stop()
elif x > -7 and y < -2.4 and y > -3.15 and z > 2.498 and z < 2.6:
straight()
stop()
print(x)
print('3')
elif y < -2.4 and x < -7 and x > -8 and z > 2.498 and z < 2.6:
right()
stop()
print(y)
print('4')
elif x < -0.6 and y > -2.4 and y < -1.4 and z > 2.498 and z < 2.6:
back()
stop()
print(x)
print('5')
elif y < -1.3 and x < 0 and x > -0.9 and z > 2.498 and z < 2.6:
right()
stop()
print(y)
print('6')
elif x > -6.5 and y < -0.5 and y > -1.3 and z > 2.498 and z < 2.6:
straight()
stop()
print(x)
print('7')
elif y < -0.3 and x < -7 and x > -8 and z > 2.498 and z < 2.6:
right()
stop()
print(y)
print('8')
elif x < -0.8 and y > -0.3 and y < 0.7 and z > 2.498 and z < 2.6:
back()
stop()
print(x)
print('9')
elif y < 1 and x < 0 and x > -0.9 and z > 2.498 and z < 2.6:
right()
stop()
print(y)
print('10')
elif x > -6.5 and y < 1.8 and y > 1.0 and z > 2.498 and z < 2.6:
straight()
stop()
print(x)
print('11')
elif y < 1.9 and x < -7 and x > -8 and z > 2.498 and z < 2.6:
right()
stop()
print(y)
print('12')
elif x < -0.8 and y > 1.9 and y < 2.5 and z > 2.498 and z < 2.6:
back()
stop()
print(x)
print('13')
elif y < 2.7 and x < 0 and x > -0.9 and z > 2.498 and z < 2.6:
right()
stop()
print(y)
print('14')
elif x > -6.5 and y < 3.3 and y > 2.7 and z > 2.498 and z < 2.6:
straight()
stop()
print(x)
print('15')
elif y < 3.4 and x < -7 and x > -8 and z > 2.498 and z < 2.6:
right()
stop()
print(y)
print('16')
elif x < -0.8 and y > 3.4 and y < 4.0 and z > 2.498 and z < 2.6:
back()
stop()
print(x)
print('17')
elif y < 4.2 and x < 0 and x > -0.9 and z > 2.498 and z < 2.6:
right()
stop()
print(y)
print('18')
elif x > -6.5 and y < 4.75 and y > 4.2 and z > 2.498 and z < 2.6:
straight()
stop()
print(x)
print('19')
print('20')
elif y < 4.8 and x < -7 and x > -8 and z > 2.498 and z < 2.6:
right()
stop()
print(y)
print('21')
elif x < -0.6 and y > 4.8 and y < 5.3 and z > 2.498 and z < 2.6:
back()
stop()
print(x)
print('22')
elif y < 5.35 and x < 0 and x > -0.9 and z > 2.498 and z < 2.6:
right()
stop()
print(y)
print('23')
elif x > -6.5 and y < 5.85 and y > 5.35 and z > 2.498 and z < 2.6:
straight()
stop()
print(x)
print('24')
elif y < 5.9 and x < -7 and x > -8 and z > 2.498 and z < 2.6:
right()
stop()
print(y)
print('25')
elif x < -0.7 and y > 5.9 and y < 6.35 and z > 2.498 and z < 2.6:
back()
stop()
print(x)
print('26')
else:
stop()
find(sys.argv)
print(z)
#def getCameraInfo(msg):
# global image_width
# global image_height
# image_width = msg.width
# image_height = msg.height
def pilot():
rospy.init_node("pilot")
#rospy.Subscriber("/quadrotor/videocamera/camera_info", CameraInfo, getCameraInfo)
rospy.Subscriber("/quadrotor/pose", PoseStamped, where)
print('hi')
rospy.spin() # this will block untill you hit Ctrl+C
if __name__ == '__main__':
pilot()
Originally posted by jashanvir on ROS Answers with karma: 68 on 2014-06-12
Post score: 0
Original comments
Comment by Vincent Rabaud on 2014-06-12:
use bridge.imgmsg_to_cv2 and drop cv. support is a first advice
What is the error message ?
Please also print the shape of the numpy array.
Comment by jashanvir on 2014-06-12:
The following is the error:-
o
OpenCV Error: Assertion failed (size.width>0 && size.height>0) in imshow, file /tmp/buildd/ros-hydro-opencv2-2.4.6-3precise-20140303-2244/modules/highgui/src/window.cpp, line 261
[ERROR] [WallTime: 1402584675.408560] bad callback: <bound method test_vision_node_fly.callback of <main.test_vision_node_fly instance at 0x3431170>>
Traceback (most recent call last):
File "/opt/ros/hydro/lib/python2.7/dist-packages/rospy/topics.py", line 682, in _invoke_callback
cb(msg)
File "/home/user/catkin_ws/src/my_package/scripts/pilot.py", line 81, in callback
cv2.imshow(self.cv_window_name, cv_image)
error: /tmp/buildd/ros-hydro-opencv2-2.4.6-3precise-20140303-2244/modules/highgui/src/window.cpp:261: error: (-215) size.width>0 && size.height>0 in function imshow
m
(256, 256, 3)
and when i print the numpy arraY I GOT
|
Hi everyone,
I have Ubuntu 12.04 and ROS Hydro installed on a Beaglebone Black and I am trying to connect a webcam to it. When I do lsusb, i see the webcam listed and it is recognized as /dev/video0. However, when I run:
rosrun usb_cam usb_cam_node
I get this error at the bottom:
[ INFO] [1402520069.293107674]: Camera name: head_camera
[ INFO] [1402520069.296888674]: Camera info url:
[ INFO] [1402520069.301380049]: usb_cam video_device set to [/dev/video0]
[ INFO] [1402520069.304736965]: usb_cam io_method set to [mmap]
[ INFO] [1402520069.307870465]: usb_cam image_width set to [640]
[ INFO] [1402520069.311110715]: usb_cam image_height set to [480]
[ INFO] [1402520069.314403132]: usb_cam pixel_format set to [mjpeg]
[ INFO] [1402520069.317508174]: usb_cam auto_focus set to [0]
[swscaler @ 0x3f640] No accelerated colorspace conversion found from yuv422p to rgb24.
[ INFO] [1402520069.502437715]: using default calibration URL
[ INFO] [1402520069.506553799]: camera calibration URL: file:///home/ubuntu/.ros/camera_info/head_camera.yaml
[swscaler @ 0x3fee0] No accelerated colorspace conversion found from yuv422p to rgb24.
[swscaler @ 0x3fee0] No accelerated colorspace conversion found from yuv422p to rgb24.
[swscaler @ 0x3fee0] No accelerated colorspace conversion found from yuv422p to rgb24.
[swscaler @ 0x3fee0] No accelerated colorspace conversion found from yuv422p to rgb24.
[swscaler @ 0x3fee0] No accelerated colorspace conversion found from yuv422p to rgb24.
[swscaler @ 0x3fee0] No accelerated colorspace conversion found from yuv422p to rgb24.
Is there a way to fix this conversion issue? Googling hasn't helped me much with this. I appreciate any kind of help...thanks!
Originally posted by Alvin on ROS Answers with karma: 37 on 2014-06-12
Post score: 2
Original comments
Comment by miltmobley on 2014-06-29:
Does your webcam work on a pc running similar ubuntu version? if not, the problem is probably not with the beagle. in a quick scan of the kernel source webcams are controlled by drivers/usb/gadget/webcam.c, which doesn't do data conversions. There is no beagle specific camera code except for cameras on capes.
Can you change the camera to some other mode, and retest?
Finally as the other responder points out the messages are prefixed by 'INFO', which in Unix usually means they are not fatal.
Comment by Alvin on 2014-07-09:
It works! I just had to view the images from a laptop instead
Comment by Morpheus on 2016-01-14:
Alvin,
What were your setting with Rviz?
Thanks,
Brent
|
Currently the joy node sends a joystick value on update only. For example if I push the joystick all the way forward I get a single max value of 1. This value is published only once. A new value is only sent when the joystick moves. What I would prefer is for the last joy value to keep being published, thus if I push the joystick to its max limit the value of 1 will continue to be published. Is there something I can add to my joy launch file that will repeat the last received joy message?
Originally posted by Vince Cross on ROS Answers with karma: 11 on 2014-06-12
Post score: 1
Original comments
Comment by BIRLxu on 2014-11-22:
Hi,I have the same problem,did you find an answer?
Comment by tonybaltovski on 2014-11-22:
Did you try the autorepeat?
Comment by BIRLxu on 2014-11-22:
Actually,I am a ROS beginner and I just don't know how to do that.Could you give me some further information?Thanks.
|
Hi everyone!
I made a custom service following this tutorial: http://wiki.ros.org/ROS/Tutorials/CreatingMsgAndSrv#Common_step_for_msg_and_srv
I edited the CMakeLists.txt and package.xml files as instructed.
I can see my service when I run rossrv list, but the .py file does not appear in devel/lib/python2.7/dist-packages/my_package/srv. The full path exists, but the srv directory is empty.
When I try and import the service in my python file using
from my_package.srv import my_service
I get the error:
ImportError: No module named srv
Here is my CMakeLists.txt file for your review:
cmake_minimum_required(VERSION 2.8.3)
project(my_package)
find_package(catkin REQUIRED COMPONENTS
geometry_msgs
nav_msgs
roscpp
rospy
std_msgs
message_generation
)
add_service_files(
FILES
my_service.srv
)
generate_messages(
DEPENDENCIES
geometry_msgs nav_msgs std_msgs
)
catkin_package(
CATKIN_DEPENDS geometry_msgs nav_msgs roscpp rospy std_msgs message_runtime
)
include_directories(
${catkin_INCLUDE_DIRS}
)
Any help?
Ubuntu 12.04
ROS Hydro
Originally posted by Robocop87 on ROS Answers with karma: 255 on 2014-06-12
Post score: 1
|
Hi, I'm new to Ubuntu/Linux and I am trying to install ROS. I am following the instructions but run into a cmake error when I run catkin_make. Here's the output from that command. It seems that there are similar problems but I don't see the exact same error message in other posts. Any help would be appreciated and thanks in advance.
joroso2121@ubuntu:~/catkin_ws$ catkin_make
Base path: /home/joroso2121/catkin_ws
Source space: /home/joroso2121/catkin_ws/src
Build space: /home/joroso2121/catkin_ws/build
Devel space: /home/joroso2121/catkin_ws/devel
Install space: /home/joroso2121/catkin_ws/install
####
#### Running command: "cmake /home/joroso2121/catkin_ws/src -DCATKIN_DEVEL_PREFIX=/home/joroso2121/catkin_ws/devel -DCMAKE_INSTALL_PREFIX=/home/joroso2121/catkin_ws/install" in "/home/joroso2121/catkin_ws/build"
####
-- Using CATKIN_DEVEL_PREFIX: /home/joroso2121/catkin_ws/devel
-- Using CMAKE_PREFIX_PATH: /opt/ros/hydro
-- This workspace overlays: /opt/ros/hydro
-- Using PYTHON_EXECUTABLE: /usr/local/bin/python
-- Python version: 2.7
-- Using Debian Python package layout
-- Using CATKIN_ENABLE_TESTING: ON
-- Call enable_testing()
-- Using CATKIN_TEST_RESULTS_DIR: /home/joroso2121/catkin_ws/build/test_results
-- Found gtest sources under '/usr/src/gtest': gtests will be built
ImportError: "from catkin_pkg.package import parse_package" failed: No module named catkin_pkg.package
Make sure that you have installed "catkin_pkg", it is up to date and on the PYTHONPATH.
CMake Error at /opt/ros/hydro/share/catkin/cmake/safe_execute_process.cmake:11 (message):
execute_process(/usr/local/bin/python
"/opt/ros/hydro/share/catkin/cmake/parse_package_xml.py"
"/opt/ros/hydro/share/catkin/cmake/../package.xml"
"/home/joroso2121/catkin_ws/build/catkin/catkin_generated/version/package.cmake")
returned error code 1
Call Stack (most recent call first):
/opt/ros/hydro/share/catkin/cmake/catkin_package_xml.cmake:63 (safe_execute_process)
/opt/ros/hydro/share/catkin/cmake/all.cmake:143 (_catkin_package_xml)
/opt/ros/hydro/share/catkin/cmake/catkinConfig.cmake:20 (include)
CMakeLists.txt:52 (find_package)
-- Configuring incomplete, errors occurred!
Invoking "cmake" failed
joroso2121@ubuntu:~/catkin_ws$
Originally posted by JoSo on ROS Answers with karma: 120 on 2014-06-12
Post score: 0
Original comments
Comment by tfoote on 2014-06-12:
@JoSo please us the block quote functionality for readability, (highlight the text and press the 1010 button, or put 4 spaces in front of each line) I've done this for you.
Comment by JoSo on 2014-06-12:
I reverted back to the original Python that came with Ubuntu 13.04 and everything worked. I was able to go through the beginner's tutorials with success. Thanks. As a side note, my issues with opening the Rviz plugin with MOVEIT! also cleared.
Heard on the block quote.
Comment by tfoote on 2014-06-12:
Great. Please accept the answer using the checkbox so others know your problem is solved.
|
When installing Indigo on Mac. I get an error stating that Boost cannot be found while compiling cpp_common. Did anyone have the same problem?
Im compiling using:
./src/catkin/bin/catkin_make_isolated --install -DCMAKE_BUILD_TYPE=Release
Error:
[ 50%] Building CXX object CMakeFiles/cpp_common.dir/src/header.cpp.o
In file included from
/Users/codeporter/Development/indigo/ros_catkin_ws/src/roscpp_core/cpp_common/src/header.cpp:35:
/Users/codeporter/Development/indigo/ros_catkin_ws/src/roscpp_core/cpp_common/include/ros/header.h:41:10:fatal error: 'boost/shared_array.hpp' file not found
#include <boost/shared_array.hpp> ^
1 error generated.
make[2]: *** [CMakeFiles/cpp_common.dir/src/header.cpp.o] Error 1
make[1]: *** [CMakeFiles/cpp_common.dir/all] Error 2
make: *** [all] Error 2
<== Failed to process package 'cpp_common':
Command '/Users/codeporter/Development/indigo/ros_catkin_ws/install_isolated/env.sh make -j4 -l4' returned non-zero exit status 2
Originally posted by CodePorter on ROS Answers with karma: 36 on 2014-06-12
Post score: 1
|
Hello, I have a simple turtle_move.cpp file that is suppose to make the turtlebot move in a square. The turtlesim program moves like its suppose to fine with my source code. I am using ROS groovy and a turtlebot 2.
#include <ros/ros.h>
#include <geometry_msgs/Twist.h>
int main(int argc, char **argv) {
// Initialize the ROS system and become a node.
ros::init(argc, argv, "turtle_move");
ros::NodeHandle nh;
// Create a publisher object.
ros::Publisher pub = nh.advertise<geometry_msgs::Twist>(
"cmd_vel", 1);
// Seed the random number generator.
// Loop at 2Hz until the node is shut down.
ros::Rate rate(.5);
// Create and fill in the message.
geometry_msgs::Twist vel;
vel.angular.z = 0.0;
vel.linear.x = 0.0;
do{
// Publish the message.
pub.publish(vel);
rate.sleep();
vel.angular.z = 0.0;
vel.linear.x = 5.0;
ROS_INFO_STREAM("Sending random velocity command:"
<< " linear=" << vel.linear.x
<< " angular=" << vel.angular.z);
pub.publish(vel);
rate.sleep();
vel.angular.z = (float)1.5708;
vel.linear.x = 0.0;
// Send a message to rosout with the details.
ROS_INFO_STREAM("Sending random velocity command:"
<< " linear=" << vel.linear.x
<< " angular=" << vel.angular.z);
// Wait until it's time for another iteration.
rate.sleep();
}while(ros::ok());
}
The turtlebot is suppose to follow a square path. I have verified that my turtlebot is on and functional by running the turtlebot_teleop program first and everything was running fine. But when I try to run my program to make the turltebot follow a square it doesn't work. I have made sure that all my dependencies are accurate, my CMakeLists.txt includes an executable turtle_move.cpp file that runs just like I ran my code for the turtlesim which is working.
I noticed that a launch file exists does anyone know if this might be the reason my code is not controlling the turtlebot.
Thank you.
Originally posted by choog on ROS Answers with karma: 101 on 2014-06-12
Post score: 0
|
Hi, guys. I am new to ROS. I am currently trying to use robot_pose_ekf to fuse data from odometry, imu and gps. But I can't get output from the EKF package. I think it might be caused by the issue of frame_id and child_frame_id after searching similar problems. But I don't know how to set the ids for my sensors. Can anyone help me with that. Thanks a lot.
Originally posted by fyxbird on ROS Answers with karma: 28 on 2014-06-12
Post score: 0
Original comments
Comment by al-dev on 2014-06-12:
Hi fyxbird, do you mean that you cannot get any output when you do "rostopic echo /robot_pose_ekf/odom_combined" or "rosrun tf tf_echo /world /tf_message" ?
If so, have you checked that something is actually published on the topics robot_pose_ekf is listening to (/odom, /imu_data and /vo) ?
Comment by fyxbird on 2014-06-13:
Hi al-dev, I am sure data are published on topics, odom. Imu_data and gps. When I use rostopic hz, I can get the publishing rate. And these data can be seen by echo. But when I echo odom_combined, these is nothing come out.
Comment by al-dev on 2014-06-13:
I guess the transform odom_combined → base_footprint isn't published either?
Can you edit your subject to give the outputs of "rosrun tf view_frames" and "rosrun robot_pose_ekf wtf.py" ?
Comment by fyxbird on 2014-06-13:
when I try rostopic list there are four topics related to imu, including imu_data. gps, odom_combined and odom are also existed. Along with two topics about tf. But no data in odom_combined and tf. when I try tf view_frames, there is no tree there. Besides, the data published by imu and gps have no frame_id, I think that might be the problem.
Comment by al-dev on 2014-06-13:
If you don't see any tree in view_frames, it could be that you are not publishing the transform configuration, as explained in this tutorial : http://wiki.ros.org/navigation/Tutorials/RobotSetup/TF.
You might want to follow the other RobotSetup tutorial as well, they are pretty detailed.
Comment by fyxbird on 2014-06-13:
I will try that, thanks, al-dev.
Comment by al-dev on 2014-06-16:
Hey fyxbird, did you solve your problem? If so, don't forget to mark the answer for the other users.
Comment by fyxbird on 2014-06-16:
Hi, al-dev, I haven't work on that for the last two days. I will try and respond to this quesiton. Thanks.
|
Dear Ros-users,
I downloaded package youbot_navigation for ros-hydro. I compiled it with catkin_make without error but when I try to run the lowpass_filter get
ERROR: cannot launch node of type [youbot_navigation_common/lowpass_filter]: can't locate node [lowpass_filter] in package [youbot_navigation_common]
even if the node is correctly compiled with catkin_make:
[ 15%] Built target lowpass_filter
the launch file is: roslaunch youbot_navigation_local move_base_local.launch
The complete output of catkin_make is:
raffaele@raffaele:~/ros/hydro_node/catkin_ws$ catkin_make
Base path: /home/raffaele/ros/hydro_node/catkin_ws
Source space: /home/raffaele/ros/hydro_node/catkin_ws/src
Build space: /home/raffaele/ros/hydro_node/catkin_ws/build
Devel space: /home/raffaele/ros/hydro_node/catkin_ws/devel
Install space: /home/raffaele/ros/hydro_node/catkin_ws/install
Running command: "make cmake_check_build_system" in "/home/raffaele/ros/hydro_node/catkin_ws/build"
Running command: "make -j6 -l6" in "/home/raffaele/ros/hydro_node/catkin_ws/build"
[ 0%] [ 0%] Built target std_msgs_generate_messages_cpp
Built target std_msgs_generate_messages_lisp
[ 0%] Built target std_msgs_generate_messages_py
[ 7%] [ 23%] Built target listener
Built target beginner_tutorials_generate_messages_lisp
[ 30%] Built target lowpass_filter
[ 46%] Built target beginner_tutorials_generate_messages_cpp
[ 76%] Built target beginner_tutorials_generate_messages_py
[ 76%] Built target beginner_tutorials_gencpp
[ 76%] Built target beginner_tutorials_generate_messages
[ 84%] Built target talker
[ 92%] Built target add_two_ints_server
[100%] Built target add_two_ints_client
raffaele@raffaele:~/ros/hydro_node/catkin_ws$
Thank you!
Originally posted by Rahndall on ROS Answers with karma: 133 on 2014-06-13
Post score: 0
Original comments
Comment by al-dev on 2014-06-13:
Hi Rahndall, can you edit your post to give us the complete output of catkin_make?
And which launch command are you using?
|
Dear Ros-users,
I'm using the simulator for youbot in ros-hydro (package youbot_gazebo_robot)
Launching the youbot.launch I got this problem on the controller of the arm
[ERROR] [1402654097.573003559, 0.963000000]: Could not load controller 'arm_1/arm_controller' because controller type 'effort_controllers/JointTrajectoryController' does not exist.
The package effort_controllers is correctly installed
Thank you for your help!
Originally posted by Rahndall on ROS Answers with karma: 133 on 2014-06-13
Post score: 0
|
I have a perfect working car model in urdf and now I wanted to scale it. I made a smaller robot so I wanted to scale them.
Is there a way to do it in ROS?
Originally posted by Dpp_coder on ROS Answers with karma: 60 on 2014-06-13
Post score: 0
|
Hi,
For a bunch of reasons (compatibility and functionality), I need to be able to specify a different location for the Boost headers.
So, instead of /usr/include, (default) I want rosmake to look FIRST in /my/example/path for inclusions of the style #include <boost/someheader.hpp> How can I do this???
Thanks a lot in advance!
Originally posted by sanchises on ROS Answers with karma: 13 on 2014-06-13
Post score: 0
|
Hi, I've written a small sensor_msgs::Imu publisher on a arduino micro which works for a short time but crashes after some seconds with following status:
[INFO] [WallTime: 1402665675.175567] Note: publish buffer size is 512 bytes
[INFO] [WallTime: 1402665675.176102] Setup publisher on /imu_data [sensor_msgs/Imu]
[WARN] [WallTime: 1402665687.484972] Serial Port read returned short (expected 1 bytes, received 0 instead).
[WARN] [WallTime: 1402665687.485703] Serial Port read failure:
[ERROR] [WallTime: 1402665699.934101] Lost sync with device, restarting...
I supposed this might be some buffer overflow, which is why I increased the nh.spinOnce() during the loop to no effect.
What does the message mean and how can I fix it? Thnx in advance.
Originally posted by honky on ROS Answers with karma: 51 on 2014-06-13
Post score: 0
Original comments
Comment by al-dev on 2014-06-13:
You can check how much RAM you actually use with avr-size, see here : http://answers.ros.org/question/11159/problem-setting-up-rosserial_arduino/
and the rosserial documentation : http://wiki.ros.org/rosserial/Overview/Limitations
|
Is there a way to load a .yaml file without overriding parameters? I have two independent .launch files that depend on the same .yaml file storing the configuration of the package, but one section of the package (corresponding to a one .launch file) might change the parameters (without dumping into the .yaml file), and the other section needs to get the newest parameters, which in this case would be those in the parameter server, not in the .yaml file.
Thanks in advance
Originally posted by crpizarr on ROS Answers with karma: 229 on 2014-06-13
Post score: 2
|
Hi all,
I need to perform transformations between all objects manipulated by the robot. So I intended to create a thread to publish a tf::Transform at the center of each CollisionObject at, say, 50Hz. But to do that I need to access the pose of the collision objects in real time with respect to some frame (base_link for instance). Is this pose published somewhere in a topic, accessible through a service or is present in some field?
I am the one defining the initial position of all CollisionObject and asking the robot to take/leave this object, so thanks to the position of the end effector I could update my own copy of the pose but:
This value is necessarily known by MoveIt! to display the objects
It's annoying to wonder when the pose has or has not changed
If I do it the pose would be duplicated with the internal value of MoveIt!
Another question: is the field frame_id of a CollisionObject used by MoveIt?
I would like to anchor an object (e.g. a cup of tea) to another (e.g. a tray) and ask the robot to manipulate the tray (with moveit_msgs::AttachedCollisionObject.lik_name = end effector of the robot). The goal is obiously to keep the cup fastened to the tray. I wanted to set the frame_id of the cup to the tray like I would so with a regular RViz marker for that but apparently this field is not used, the two CollisionObjects are not linked. Any clue to achieve this goal?
Many thanks for your help
Originally posted by courrier on ROS Answers with karma: 454 on 2014-06-13
Post score: 3
|
I have basically spent about two days to find a solution to this problem and figured that bringing this up here would be the best option.
I am basically trying to publish diagnostics info on the /diagnostics topic using python nodes with fuerte. On the fuerte part of the wiki I see a link to a git repo. In the repo (1.7.0 branch) I see python api to use the diagnostics api but on my machine, even after updating, I cannot see the diagnostics api in python lib under /opt/ros/fuerte/lib (so I cannot do import diagnostic_updater). I am not sure how to add a lib from an online source but maybe there is an easier way.
I have nodes written in python but the current diagnostics_updater api is in c++. I am not sure how I can use a c++ stack to update the /diagnostics topic in python code. Perhaps I can use the diagnostics_msgs under /opt/ros/fuerte/lib which I can actually import in python. However I also do not know how.
If there is an easier way to publish on the diagnostics topic without messing with any class I can also do that so please share any insight or suggestions. (I just need basic robot info)
If anyone has done something like this and is willing to share a small tutorial I think you will add so much to the ROS community.
Thanks in advance
Originally posted by goshawk on ROS Answers with karma: 70 on 2014-06-13
Post score: 1
|
Hi all,
I have a SolidWorks model of my robot which I have been able to get into RVIZ/MoveIt. This is tested and generally works well.
Now I need a more accurate model, one feature of which is to properly constrain my joint angles.
In the initial model the angles were set up to move between [-pi,pi] which was arbitrary and does not represent the range of motion of the actuators.
These constraints were crudely configured by setting them in the URDF exporter plugin.
But now I want to limit the joints to what I have configured in SolidWorks using the mates.
In SolidWorks I have setup mates that constrains the joints to the region I want using the "Limit Angle" advanced mate. Whilst this constraint works nicely in SolidWorks, allowing me to move the joints within the correct region, i have not been able to get this same functionality into ROS/URDF.
Ideally I would like to import these mates automatically so that if/when i change the model, this is updated in the URDF upon exporting. Is there a way to do this or am i stuck with manually setting these limits each time in the exporter tool?
Regards and thanks in advance,
Chris.
Originally posted by anonymous8676 on ROS Answers with karma: 327 on 2014-06-13
Post score: 0
|
Note: the original question was "How can one make a .bag out of a sensor's serial data, then play it back in real-time using gmapping?" - I changed the question to better reflect what I meant to ask, now knowing what I was looking for.
Hi everyone!
What I'm trying to do is to take a sensor's output data - namely the distance measured by a rangefinder - and use gmapping in ROS to create a map from that data. I want the map to update in rviz as more data comes in. Ideally, I want to be able to move the rangefinder around and collect data with it all while watching the map get created/updated in real time on a laptop running ROS (as opposed to surveying the entire area, creating a bag, then watching the map get created AFTER surveying).
I want to get a function similar to what's shown in this video: http://www.youtube.com/watch?v=SY7rScDd5h8 (I haven't been able to find any detailed info on the making-of process of this gadget)
Would you do this by creating a .bag file of the data from the sensor? How can you do this with serial data input?
Originally posted by jc17 on ROS Answers with karma: 39 on 2014-06-13
Post score: 1
|
Hi I'm using Occipital (RGB-D sensor like Kinect) on Parrot AR. DRONE for navigation using SLAM algorithm.... What do I do for obstacle avoidance, is it done by the SLAM or should I use additional sensors If I use additional sensors, how do I make it a part of the SLAM algorithm.
Originally posted by Francis Dom on ROS Answers with karma: 21 on 2014-06-14
Post score: 2
|
I am new to ROS. I tried to use " rosbag record -O mylaserdata /base_scan /tf " to record the distance data. But after I finish the recording, there is no message recorded to the ".bag" file. Does anyone know the solution? Thanks in advance.
Is it necessary to set "base_scan" for my laser sensor first? If yes, how?
Originally posted by Cole on ROS Answers with karma: 61 on 2014-06-14
Post score: 1
|
hi, all,
I am using navigation stack, move_base, for a simple navigation implementation.
my base is driven by two differential wheels, and rotates using speed difference between the two driving wheels. i.e. only speed on X axis and rotational speed
from time to time, speed on Y axis is received on "cmd_vel" topic, and the base doesn't know what to do with it.
how do I configure the move_base properly so that it generates velocity command that suits my robot base?
---
linear:
x: 0.105263157895
y: 0.0
z: 0.0
angular:
x: 0.0
y: 0.0
z: 0.157894736842
---
linear:
x: 0.1
***y: -0.1***
z: 0.0
angular:
x: 0.0
y: 0.0
z: 0.0
Originally posted by dreamcase on ROS Answers with karma: 91 on 2014-06-14
Post score: 0
|
HI,
I am new to ROS so this might be a completely ignorant question. So far I was using pyserial so run serial communication in ROS but now I am trying to use C++ for serial communication. I looked around and realized that https://github.com/wjwwood/serial library is suitable for me. I downloaded it and installed it exactly like the instructions. However when I tried to run the serial example I get the error while running catkin_make that serial.h is not found. I am assuming that I have to add the path of the new library to the ROS and I am not sure how to do that. I would appreciate any help in this matter.
Thank you,
TM
EDIT (By wjwwood):
CMakeLists.txt:
cmake_minimum_required(VERSION 2.8.3)
project(beginner_tutorials)
## Find catkin macros and libraries
## if COMPONENTS list like find_package(catkin REQUIRED COMPONENTS xyz)
## is used, also find other catkin packages
find_package(catkin REQUIRED COMPONENTS
roscpp
rospy
std_msgs
message_generation
)
## System dependencies are found with CMake's conventions
# find_package(Boost REQUIRED COMPONENTS system)
## Uncomment this if the package has a setup.py. This macro ensures
## modules and global scripts declared therein get installed
## See http://ros.org/doc/api/catkin/html/user_guide/setup_dot_py.html
# catkin_python_setup()
################################################
## Declare ROS messages, services and actions ##
################################################
## To declare and build messages, services or actions from within this
## package, follow these steps:
## * Let MSG_DEP_SET be the set of packages whose message types you use in
## your messages/services/actions (e.g. std_msgs, actionlib_msgs, ...).
## * In the file package.xml:
## * add a build_depend and a run_depend tag for each package in MSG_DEP_SET
## * If MSG_DEP_SET isn't empty the following dependencies might have been
## pulled in transitively but can be declared for certainty nonetheless:
## * add a build_depend tag for "message_generation"
## * add a run_depend tag for "message_runtime"
## * In this file (CMakeLists.txt):
## * add "message_generation" and every package in MSG_DEP_SET to
## find_package(catkin REQUIRED COMPONENTS ...)
## * add "message_runtime" and every package in MSG_DEP_SET to
## catkin_package(CATKIN_DEPENDS ...)
## * uncomment the add_*_files sections below as needed
## and list every .msg/.srv/.action file to be processed
## * uncomment the generate_messages entry below
## * add every package in MSG_DEP_SET to generate_messages(DEPENDENCIES ...)
## Generate messages in the 'msg' folder
add_message_files(
FILES
Num.msg
# Message2.msg
)
## Generate services in the 'srv' folder
add_service_files(
FILES
AddTwoInts.srv
# Service2.srv
)
## Generate actions in the 'action' folder
# add_action_files(
# FILES
# Action1.action
# Action2.action
# )
## Generate added messages and services with any dependencies listed here
generate_messages(
DEPENDENCIES
std_msgs
)
###################################
## catkin specific configuration ##
###################################
## The catkin_package macro generates cmake config files for your package
## Declare things to be passed to dependent projects
## INCLUDE_DIRS: uncomment this if you package contains header files
## LIBRARIES: libraries you create in this project that dependent projects also need
## CATKIN_DEPENDS: catkin_packages dependent projects also need
## DEPENDS: system dependencies of this project that dependent projects also need
###########
## Build ##
###########
## Specify additional locations of header files
## Your package locations should be listed before other locations
# include_directories(include)
include_directories(
${catkin_INCLUDE_DIRS}
)
## Declare a cpp library
# add_library(beginner_tutorials
# src/${PROJECT_NAME}/beginner_tutorials.cpp
# )
## Declare a cpp executable
# add_executable(beginner_tutorials_node src/beginner_tutorials_node.cpp)
## Add cmake target dependencies of the executable/library
## as an example, message headers may need to be generated before nodes
#add_dependencies( talker beginner_tutorials_generate_messages_cpp)
#beginner_tutorials_node
## Specify libraries to link a library or executable target against
# target_link_libraries(beginner_tutorials_node
# ${catkin_LIBRARIES}
# )
#############
## Install ##
#############
# all install targets should use catkin DESTINATION variables
# See http://ros.org/doc/api/catkin/html/adv_user_guide/variables.html
## Mark executable scripts (Python etc.) for installation
## in contrast to setup.py, you can choose the destination
# install(PROGRAMS
# scripts/my_python_script
# DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
# )
## Mark executables and/or libraries for installation
# install(TARGETS beginner_tutorials beginner_tutorials_node
# ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
# LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
# RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
# )
## Mark cpp header files for installation
# install(DIRECTORY include/${PROJECT_NAME}/
# DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION}
# FILES_MATCHING PATTERN "*.h"
# PATTERN ".svn" EXCLUDE
# )
## Mark other files for installation (e.g. launch and bag files, etc.)
# install(FILES
# # myfile1
# # myfile2
# DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
# )
#############
## Testing ##
#############
## Add gtest based cpp test target and link libraries
# catkin_add_gtest(${PROJECT_NAME}-test test/test_beginner_tutorials.cpp)
# if(TARGET ${PROJECT_NAME}-test)
# target_link_libraries(${PROJECT_NAME}-test ${PROJECT_NAME})
# endif()
## Add folders to be run by python nosetests
# catkin_add_nosetests(test)
include_directories(include ${catkin_INCLUDE_DIRS})
add_executable(talker src/talker.cpp)
target_link_libraries(talker ${catkin_LIBRARIES})
add_executable(serial_example src/serial_example.cc)
target_link_libraries(serial_example ${catkin_LIBRARIES})
add_executable(listener src/listener.cpp)
target_link_libraries(listener ${catkin_LIBRARIES})
package.xml:
<?xml version="1.0"?>
<package>
<name>beginner_tutorials</name>
<version>0.0.0</version>
<description>The beginner_tutorials package</description>
<!-- One maintainer tag required, multiple allowed, one person per tag -->
<!-- Example: -->
<!-- <maintainer email="[email protected]">Jane Doe</maintainer> -->
<maintainer email="[email protected]">andromeda</maintainer>
<!-- One license tag required, multiple allowed, one license per tag -->
<!-- Commonly used license strings: -->
<!-- BSD, MIT, Boost Software License, GPLv2, GPLv3, LGPLv2.1, LGPLv3 -->
<license>TODO</license>
<!-- Url tags are optional, but mutiple are allowed, one per tag -->
<!-- Optional attribute type can be: website, bugtracker, or repository -->
<!-- Example: -->
<!-- <url type="website">http://wiki.ros.org/beginner_tutorials</url> -->
<!-- Author tags are optional, mutiple are allowed, one per tag -->
<!-- Authors do not have to be maintianers, but could be -->
<!-- Example: -->
<!-- <author email="[email protected]">Jane Doe</author> -->
<!-- The *_depend tags are used to specify dependencies -->
<!-- Dependencies can be catkin packages or system dependencies -->
<!-- Examples: -->
<!-- Use build_depend for packages you need at compile time: -->
<build_depend>message_generation</build_depend>
<!-- Use buildtool_depend for build tool packages: -->
<!-- <buildtool_depend>catkin</buildtool_depend> -->
<!-- Use run_depend for packages you need at runtime: -->
<run_depend>message_runtime</run_depend>
<!-- Use test_depend for packages you need only for testing: -->
<!-- <test_depend>gtest</test_depend> -->
<buildtool_depend>catkin</buildtool_depend>
<build_depend>roscpp</build_depend>
<build_depend>rospy</build_depend>
<build_depend>std_msgs</build_depend>
<run_depend>roscpp</run_depend>
<run_depend>rospy</run_depend>
<run_depend>std_msgs</run_depend>
<!-- The export tag contains other, unspecified, tags -->
<export>
<!-- You can specify that this package is a metapackage here: -->
<!-- <metapackage/> -->
<!-- Other tools can request additional information be placed here -->
</export>
</package>
Output from catkin_make:
Base path: /home/andromeda/catkin_ws
Source space: /home/andromeda/catkin_ws/src
Build space: /home/andromeda/catkin_ws/build
Devel space: /home/andromeda/catkin_ws/devel
Install space: /home/andromeda/catkin_ws/install
####
#### Running command: "make cmake_check_build_system" in "/home/andromeda/catkin_ws/build"
####
####
#### Running command: "make -j4 -l4" in "/home/andromeda/catkin_ws/build"
####
[ 0%] [ 0%] [ 0%] Built target std_msgs_generate_messages_py
Built target std_msgs_generate_messages_cpp
Built target std_msgs_generate_messages_lisp
[ 9%] Built target listener
[ 18%] Building CXX object beginner_tutorials/CMakeFiles/serial_example.dir/src/serial_example.cc.o
[ 36%] Built target beginner_tutorials_generate_messages_cpp
[ 72%] [ 81%] Built target beginner_tutorials_generate_messages_py
Built target talker
[100%] Built target beginner_tutorials_generate_messages_lisp
[100%] Built target beginner_tutorials_generate_messages
/home/andromeda/catkin_ws/src/beginner_tutorials/src/serial_example.cc: In function ‘void enumerate_ports()’:
/home/andromeda/catkin_ws/src/beginner_tutorials/src/serial_example.cc:49:8: error: ‘PortInfo’ is not a member of ‘serial’
/home/andromeda/catkin_ws/src/beginner_tutorials/src/serial_example.cc:49:8: error: ‘PortInfo’ is not a member of ‘serial’
/home/andromeda/catkin_ws/src/beginner_tutorials/src/serial_example.cc:49:24: error: template argument 1 is invalid
/home/andromeda/catkin_ws/src/beginner_tutorials/src/serial_example.cc:49:24: error: template argument 2 is invalid
/home/andromeda/catkin_ws/src/beginner_tutorials/src/serial_example.cc:49:40: error: invalid type in declaration before ‘=’ token
/home/andromeda/catkin_ws/src/beginner_tutorials/src/serial_example.cc:49:42: error: ‘list_ports’ is not a member of ‘serial’
/home/andromeda/catkin_ws/src/beginner_tutorials/src/serial_example.cc:51:8: error: ‘PortInfo’ is not a member of ‘serial’
/home/andromeda/catkin_ws/src/beginner_tutorials/src/serial_example.cc:51:8: error: ‘PortInfo’ is not a member of ‘serial’
/home/andromeda/catkin_ws/src/beginner_tutorials/src/serial_example.cc:51:24: error: template argument 1 is invalid
/home/andromeda/catkin_ws/src/beginner_tutorials/src/serial_example.cc:51:24: error: template argument 2 is invalid
/home/andromeda/catkin_ws/src/beginner_tutorials/src/serial_example.cc:51:36: error: expected initializer before ‘iter’
/home/andromeda/catkin_ws/src/beginner_tutorials/src/serial_example.cc:53:8: error: ‘iter’ was not declared in this scope
/home/andromeda/catkin_ws/src/beginner_tutorials/src/serial_example.cc:53:30: error: request for member ‘end’ in ‘devices_found’, which is of non-class type ‘int’
/home/andromeda/catkin_ws/src/beginner_tutorials/src/serial_example.cc:55:1: error: ‘PortInfo’ is not a member of ‘serial’
/home/andromeda/catkin_ws/src/beginner_tutorials/src/serial_example.cc:55:18: error: expected ‘;’ before ‘device’
/home/andromeda/catkin_ws/src/beginner_tutorials/src/serial_example.cc:57:27: error: ‘device’ was not declared in this scope
make[2]: *** [beginner_tutorials/CMakeFiles/serial_example.dir/src/serial_example.cc.o] Error 1
make[1]: *** [beginner_tutorials/CMakeFiles/serial_example.dir/all] Error 2
make: *** [all] Error 2
Invoking "make" failed
Originally posted by nicobari on ROS Answers with karma: 86 on 2014-06-14
Post score: 0
|
I am facing below error when I try to run gazebo any help regarding this is highly appreciated
Error [RTShaderSystem.cc:408] Unable to find shader lib. Shader generating will fail.terminate called after throwing an instance of 'Ogre::ItemIdentityException' what(): OGRE EXCEPTION(5:ItemIdentityException): Cannot locate material called 'Gazebo/shadow_caster' in SceneManager::setShadowTextureCasterMaterial at /build/buildd/ogre-1.7.4/OgreMain/src/OgreSceneManager.cpp (line 5833)
Originally posted by Raghu Parvatha on ROS Answers with karma: 23 on 2014-06-14
Post score: 0
Original comments
Comment by Haz88 on 2015-04-20:
BH
I too ran into this error.
Are you using indigo with ubuntu 14.04?
|
Hi everyone! I've been following this tutorial (wiki.ros.org/hydro/Installation/OSX/Homebrew/Source) and got some great help from you all before. I need a little more help before I can get onto my feet and hopefully start helping others.
I am trying to install ROS Hydro on OSX 10.9 through Homebrew. Following the above linked tutorial, I am stuck trying to run this:
rosdep install --from-paths src --ignore-src --rosdistro hydro -y
And it will fail trying to install PCL. So I try running "brew install pcl" instead. I get:
Configuring incomplete, errors occurred!
make: * * * [cmake_check_build_system] Error 1
...along with a referral to the homebrew troubleshooting page.
Hansg91 suggested trying "brew install pcl -v" for more verbose output. Here's what I saw that I thought might be relevant:
==> make
CMake Error: Parse error in cache file /tmp/vtk5-1lKn/VTK5.10.1/build/CMakeCache.txt. Offending entry: File "setup_install_paths.py", line xxx, in module.
This error was repeated several times with different lines being mentioned and different error reasons mentioned (in module, in get_install_path, TypeError: 'int' object has no attribute 'getitem' - and more).
The final error listed that seemed to sum it all up was that vtk5 5.10.1 did not build - how might I be able to fix this?
I'm dead stuck. I have been following the tutorial to the letter, because otherwise I'd have no idea what I'm doing. Any ideas on how to get past this and continue with the installation? I can always provide more details if necessary. Thank you!
Originally posted by jc17 on ROS Answers with karma: 39 on 2014-06-14
Post score: 1
Original comments
Comment by Hansg91 on 2014-06-17:
This is perhaps stating the obvious, but do you have vtk5 installed? What does "brew info vtk5" say?
Comment by jc17 on 2014-06-19:
It was installed at the time, but following demmeln's suggestion fixed things up
|
I am trying to using add_custom_target to invoke a binary during the build process. This is tricky because the binary is built by another Catkin package and is installed its libexec directory. I can't figure out how to make this work when both packages are built in the same Catkin workspace. I also am not sure how to call the binary in a way that is portable between the devel and install spaces.
These seem to be two separate issues:
How do make my custom target depend on the binary built by the other package? I can't simply add it as a dependency, because that would fail when the other package is in a chained workspace.
What is the correct way of resolving the path to the binary? Should I use rosrun, rospack, or catkin_find? Or do I need to somehow export a CMake variable that contains the path?
Originally posted by mkoval on ROS Answers with karma: 524 on 2014-06-15
Post score: 1
|
Hi - my goal is to build a very simple Android app that will run on my phone (HTC ONE M8) and will:
Connect to a remote ROS master on the same network
Publish Int16 messages to two separate topics
Ideally, I'd like to just create a new project in Android Studio and add dependencies to ros android libs from some external maven repository, and then use things like RosActivity and NodeMain in my project. I'd rather not have to build any ros-android or rosjava libs from source myself. Really want to just keep things as simple as possible here.
Is it possible to do this? I can't find any simple instructions on how to do the above anywhere on wiki.ros.org, and have failed miserably trying to follow the various android setup/build instructions that are on wiki.ros.org.
Any help would be greatly appreciated.
Thanks,
Zach
Originally posted by zcox on ROS Answers with karma: 41 on 2014-06-15
Post score: 0
|
Hi, i just started using ROS and i'm trying to use rosserial_arduino.
I'm trying to get the examples working but I have some problems, when I launch:
rosrun rosserial_python serial_node.py /dev/ttyACM0
I have this error on the console:
[ERROR] [WallTime: 1402855665.112426] Unable to sync with device; possible link problem or link software version mismatch such as hydro rosserial_python with groovy Arduino
I read other threads and i loaded the sketch on a Mega 2650 and a UNO with atmega328 to exclude memory issues but i have always the same error.
Some additional information:
$rospack find rosserial
[rospack] Error: stack/package rosserial not found
$rospack find rosserial_arduino
/opt/ros/hydro/share/rosserial_arduino
$rospack find rosserial_python
/opt/ros/hydro/share/rosserial_python
$rosmsg show Adc
[rosserial_arduino/Adc]:
uint16 adc0
uint16 adc1
uint16 adc2
uint16 adc3
uint16 adc4
uint16 adc5
I'm running Hydro on Ubuntu 13.04 64-bit
Any help would be appreciated
Originally posted by Wedontplay on ROS Answers with karma: 42 on 2014-06-15
Post score: 0
|
Hi
I have created a package, that contains custom messages. They seem to be compiled correctly. Because I can call
rosmsg package my_package
and get
my_package/Collision
which is correct. But when I try to run a python script that depends on this message like:
from my_package.msg import Collision
I get:
ImportError: No module named my_package.msg
Do you have any Ideas what I am doing wrong?
Some additional Info:
export | grep ROS
declare -x ROS
declare -x ROS_DISTRO="hydro"
declare -x ROS_ETC_DIR="/opt/ros/hydro/etc/ros"
declare -x ROS_MASTER_URI="http://localhost:11311"
declare -x ROS_PACKAGE_PATH="/home/aub-ch/ros/hydro_ws/src:/home/aub-ch/ros/hydro_mynavigationtest/src:/opt/ros/hydro/share:/opt/ros/hydro/stacks"
declare -x ROS_ROOT="/opt/ros/hydro/share/ros"
declare -x ROS_TEST_RESULTS_DIR="/home/aub-ch/ros/hydro_mynavigationtest/build/test_results"
and
echo $PYTHONPATH
/home/aub-ch/ros/hydro_mynavigationtest/devel/lib/python2.7/dist-packages:/opt/ros/hydro/lib/python2.7/dist-packages
Originally posted by ct2034 on ROS Answers with karma: 862 on 2014-06-16
Post score: 0
Original comments
Comment by ct2034 on 2014-06-16:
For clarification: I have set the my_package as dependency in both CMakeLists.txt and package.xml of the package using the message.
Comment by ct2034 on 2014-06-24:
Hi al-dev. I added the data. Do I have to add the oder path to the PYTHONPATH as well?
|
Hello,
I have a problem with the move_base package. It keeps saying those kind of things :
[ WARN] [1402905398.913790779]: Control loop missed its desired rate of 3.0000Hz... the loop actually took 0.5543 seconds
And after the first time an error is prited. Meaning I run it once, it gets a lots of warning and the robot just go crazy and then I have this error the second time, along with the above warning :
[ERROR] [1402905389.655349880]: You must specify at least three points for the robot footprint, reverting to previous footprint.
The thing is I'm not using the footprint since I defined a radius. Here is the costmap_common_params.yaml file :
obstacle_range: 2.5
raytrace_range: 3.0
robot_radius: 0.285
inflation_radius: 0.3
max_obstacle_height: 1
min_obstacle_height: 0.0
observation_sources: scan
scan: {data_type: LaserScan, topic: /scan, marking: true, clearing: true}
So I don't have any footprint but it's normal. THe same exact file work flawlessly on Groovy, the problem is on hydro.
It follow exactly the same scheme as here without being fatal but I though it has been corrected.
Here I ask the robot to go more or less forward...
I really don't know what is wrong there. Any help will be greatly appreciated ! Thanks
Originally posted by Maya on ROS Answers with karma: 1172 on 2014-06-16
Post score: 1
|
I'm using hector GPS in my robot.
I followed the instructions to introduce it in the EKF (robot_pose_ekf). However, the estimated pose is much worse taking the gps into account than that obtained ignoring it.
I think that the problem comes from de gps I am using because when I move the robot around it accumulates an error which never disappears. My GPS is Hector gps
Originally posted by arenillas on ROS Answers with karma: 223 on 2014-06-16
Post score: 0
|
I'm trying to go through the tutorial for Kobuki Turtlebot on this page: wiki.ros.org/kobuki/Tutorials/Write%20your%20own%20controller%20for%20Kobuki
But when I tried to launch the bump_blink_controller, it gets stuck at waiting for service kobuki/load_nodelet. I already did minimal.launch and it seems fine.
Below is the full roslaunch output, and the last line is where it's stuck. I followed catkin instruction to initialize my catkin workspace, is there anything I missed while trying to build the package?
turtlebot@turtlebot:/opt/ros/hydro/share/kobuki_controller_tutorial$ roslaunch kobuki_controller_tutorial bump_blink_app.launch --screen ... logging to /home/turtlebot/.ros/log/50d2e6c2-f25b-11e3-a454-240a641beb01/roslaunch-turtlebot-15308.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:// 192.168.1.108:54204/
SUMMARY ========
PARAMETERS * /rosdistro * /rosversion
NODES / bump_blink_controller (nodelet/nodelet)
ROS_MASTER_URI=http:// localhost:11311
core service [/rosout] found process[bump_blink_controller-1]: started with pid [15326] [ INFO] [1402595998.924197642]: Loading nodelet /bump_blink_controller of type kobuki_controller_tutorial/BumpBlinkControllerNodelet to manager kobuki with the following remappings: [ INFO] [1402595998.924404875]: /bump_blink_controller/commands/led1 -> /mobile_base/commands/led1 [ INFO] [1402595998.924468276]: /bump_blink_controller/events/bumper -> /mobile_base/events/bumper
> [ INFO] [1402595998.928954200]:
> waitForService: Service
> [/kobuki/load_nodelet] has not been
> advertised, waiting...
Originally posted by yis on ROS Answers with karma: 1 on 2014-06-16
Post score: 0
|
I would like recommendations or suggestions for automatically collecting usage information on a set of indoor robots. The robots all run ROS Hydro on Ubuntu Precise and have fairly good but not perfect wireless internet connection. We have a server that can host the data and run its own ROS master, if that helps.
I would like to know:
when and how long each robot is actually running
how far it travels
cumulative hardware diagnostic information
bag files for some relatively low-bandwidth topics
I see no problem with launching some data collection nodes with low-level robot components, so the information gets collected automatically for almost everything.
Eventually, I expect to use ROCON with multimaster cooperation between the robots, but probably not for all tests and experiments.
Surely other ROS projects have similar needs.
What do you recommend?
What packages have you found useful?
Are existing multimaster solutions robust enough?
Originally posted by joq on ROS Answers with karma: 25443 on 2014-06-16
Post score: 5
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.