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

underwater's profile - activity

2014-07-29 15:27:56 -0500 commented answer ROS: Skill required?

very thanks Mehdi.

2014-07-28 20:06:53 -0500 commented answer ROS: Skill required?

Do you have good tutorials for Python? I want to learn it, I find Python3 its OK?

2014-06-26 15:00:05 -0500 received badge  Famous Question (source)
2014-05-15 10:01:57 -0500 received badge  Taxonomist
2014-04-15 03:22:18 -0500 received badge  Famous Question (source)
2014-04-01 04:50:12 -0500 commented answer convert the yaw Euler angle into into the range [0 , 360].

very thanks

2014-03-18 23:11:53 -0500 received badge  Notable Question (source)
2014-03-18 22:53:55 -0500 commented answer convert the yaw Euler angle into into the range [0 , 360].

thanks for your answer, please can you tell me how to use the angles package? I am not succeed.

2014-03-18 22:50:04 -0500 commented answer convert the yaw Euler angle into into the range [0 , 360].

nice very thanks

2014-03-18 12:24:38 -0500 received badge  Popular Question (source)
2014-03-18 06:59:36 -0500 asked a question convert the yaw Euler angle into into the range [0 , 360].

Hi everyone,

I used the following code to get the yaw Euler angle:

// Convert quaternion to RPY.
  tf::Quaternion q;
  tf::quaternionMsgToTF(imu_msg->orientation, q);
  tf::Matrix3x3(q).getRPY(roll, pitch, yaw);

I get the Euler angle varying from [0,PI] and [-PI, 0]

I need rotation angles in the range of 0 to 360. Is it possible to get that directly?

Thanks in advance

2014-01-28 17:29:53 -0500 marked best answer Error : required from here

Hi everyone,

I have problem in eclipse program. I used simplest code for publisher and I get on this problem: required from here by this statement (line 38):

  output_modem_publisher_.publish(m2);

The code is :

#include "ros/ros.h"
#include "std_msgs/String.h"

#include <sstream>


int main(int argc, char** argv)
{
  ros::init(argc, argv, "test");
  ros::NodeHandle nh;
    ros::Publisher output_modem_publisher_;
    const std::string modem_topic_ = "monsun/modem/in";
    output_modem_publisher_ = nh.advertise<std_msgs::String>(modem_topic_, 1000);


  ros::Rate loop_rate(15);

  int count = 0;

  while (ros::ok())
  {

        std::string out_modem2;
        std::stringstream monsun2;

        monsun2 << 2 << "Ammar" ;
        out_modem2 = monsun2.str();
        std_msgs::String m2;
        m2.data = out_modem2;
        output_modem_publisher_.publish(m2);
        ROS_INFO("m2222222222 ");

    ros::spinOnce();
    loop_rate.sleep();

    ++count;
  }

  return 0;
}

And the output of build project is:

16:12:09 * Incremental Build of project modem_test-RelWithDebInfo@modem_test * /usr/bin/make -j8 all mkdir -p bin cd build && cmake -Wdev -DCMAKE_TOOLCHAIN_FILE=/opt/ros/groovy/share/ros/core/rosbuild/rostoolchain.cmake .. Re-run cmake no build system arguments [rosbuild] Building package modem_test -- Using CATKIN_DEVEL_PREFIX: /home/amory/ros_workspace/modem_test/build/devel -- Using CMAKE_PREFIX_PATH: /opt/ros/groovy -- This workspace overlays: /opt/ros/groovy -- Found gtest sources under '/usr/src/gtest': gtests will be built -- catkin 0.5.63 [rosbuild] Including /opt/ros/groovy/share/roscpp/rosbuild/roscpp.cmake [rosbuild] Including /opt/ros/groovy/share/rospy/rosbuild/rospy.cmake -- Configuring done -- Generating done CMake Warning: Manually-specified variables were not used by the project:

CMAKE_TOOLCHAIN_FILE

-- Build files have been written to: /home/amory/ros_workspace/modem_test/build cd build && /usr/bin/make make[1]: Entering directory /home/amory/ros_workspace/modem_test/build' /usr/bin/cmake -H/home/amory/ros_workspace/modem_test -B/home/amory/ros_workspace/modem_test/build --check-build-system CMakeFiles/Makefile.cmake 0 /usr/bin/cmake -E cmake_progress_start /home/amory/ros_workspace/modem_test/build/CMakeFiles /home/amory/ros_workspace/modem_test/build/CMakeFiles/progress.marks /usr/bin/make -f CMakeFiles/Makefile2 all make[2]: Entering directory/home/amory/ros_workspace/modem_test/build' /usr/bin/make -f CMakeFiles/rospack_genmsg_libexe.dir/build.make CMakeFiles/rospack_genmsg_libexe.dir/depend make[3]: Entering directory /home/amory/ros_workspace/modem_test/build' cd /home/amory/ros_workspace/modem_test/build && /usr/bin/cmake -E cmake_depends "Unix Makefiles" /home/amory/ros_workspace/modem_test /home/amory/ros_workspace/modem_test /home/amory/ros_workspace/modem_test/build /home/amory/ros_workspace/modem_test/build /home/amory/ros_workspace/modem_test/build/CMakeFiles/rospack_genmsg_libexe.dir/DependInfo.cmake --color= make[3]: Leaving directory/home/amory/ros_workspace/modem_test/build' /usr/bin/make -f CMakeFiles/rospack_genmsg_libexe.dir/build.make CMakeFiles/rospack_genmsg_libexe.dir/build make[3]: Entering directory /home/amory/ros_workspace/modem_test/build' make[3]: Nothing to be done forCMakeFiles/rospack_genmsg_libexe.dir/build'. make[3]: Leaving directory /home/amory/ros_workspace/modem_test/build' /usr/bin/cmake -E cmake_progress_report /home/amory/ros_workspace/modem_test/build/CMakeFiles [ 0%] Built target rospack_genmsg_libexe /usr/bin/make -f CMakeFiles/rosbuild_precompile.dir/build.make CMakeFiles/rosbuild_precompile.dir/depend make[3]: Entering directory/home/amory/ros_workspace/modem_test/build' cd /home/amory/ros_workspace/modem_test/build && /usr/bin/cmake -E cmake_depends "Unix Makefiles" /home/amory/ros_workspace/modem_test /home/amory/ros_workspace/modem_test /home/amory/ros_workspace/modem_test/build /home/amory/ros_workspace/modem_test/build /home/amory/ros_workspace/modem_test/build/CMakeFiles ... (more)

2014-01-28 17:29:49 -0500 marked best answer fatal error No such file or directory compilationin

Hi everyone,

I use groovy/ROS with catkin and Eclipse IDE. I need to use btQuaternion for this reason I do include for this #include <linearmath btquaternion.h=""> in my main program .cpp. Of course LinearMath exist in tf2 package. I add in package.xml the following : <build_depend>tf2</build_depend> <run_depend>tf2</run_depend> . Additinaly I go to propertise->C/C++Include Paths and symbols -> Add External Include Path -> /opt/ros/groovy/stacks/geometry_experimental/tf2/include. However the results were not satisfactory and after build project I get following error:

fatal error: LinearMath/btQuaternion.h: No such file or directory compilation terminated. make[2]: *

or all result of built of project are:

10:27:24 * Build of project move_monsun@move_monsun * /usr/bin/make -j8 all /usr/bin/cmake -H/home/amory/catkin_ws/src/move_monsun -B/home/amory/catkin_ws/src/move_monsun --check-build-system CMakeFiles/Makefile.cmake 0 /usr/bin/cmake -E cmake_progress_start /home/amory/catkin_ws/src/move_monsun/CMakeFiles /home/amory/catkin_ws/src/move_monsun/CMakeFiles/progress.marks /usr/bin/make -f CMakeFiles/Makefile2 all make[1]: Entering directory /home/amory/catkin_ws/src/move_monsun' /usr/bin/make -f CMakeFiles/move_monsun.dir/build.make CMakeFiles/move_monsun.dir/depend make[2]: Entering directory/home/amory/catkin_ws/src/move_monsun' cd /home/amory/catkin_ws/src/move_monsun && /usr/bin/cmake -E cmake_depends "Unix Makefiles" /home/amory/catkin_ws/src/move_monsun /home/amory/catkin_ws/src/move_monsun /home/amory/catkin_ws/src/move_monsun /home/amory/catkin_ws/src/move_monsun /home/amory/catkin_ws/src/move_monsun/CMakeFiles/move_monsun.dir/DependInfo.cmake --color= make[2]: Leaving directory /home/amory/catkin_ws/src/move_monsun' /usr/bin/make -f CMakeFiles/move_monsun.dir/build.make CMakeFiles/move_monsun.dir/build make[2]: Entering directory/home/amory/catkin_ws/src/move_monsun' /usr/bin/cmake -E cmake_progress_report /home/amory/catkin_ws/src/move_monsun/CMakeFiles 4 [ 50%] Building CXX object CMakeFiles/move_monsun.dir/src/move_monsun.cpp.o /usr/bin/c++ -Dmove_monsun_EXPORTS -DROS_PACKAGE_NAME=\"move_monsun\" -fPIC -I/home/amory/catkin_ws/src/move_monsun/include -I/opt/ros/groovy/include -o CMakeFiles/move_monsun.dir/src/move_monsun.cpp.o -c /home/amory/catkin_ws/src/move_monsun/src/move_monsun.cpp /home/amory/catkin_ws/src/move_monsun/src/move_monsun.cpp:2:37: fatal error: LinearMath/btQuaternion.h: No such file or directory compilation terminated. make[2]: * [CMakeFiles/move_monsun.dir/src/move_monsun.cpp.o] Error 1 make[2]: Leaving directory /home/amory/catkin_ws/src/move_monsun' make[1]: *** [CMakeFiles/move_monsun.dir/all] Error 2 make[1]: Leaving directory/home/amory/catkin_ws/src/move_monsun' make: * [all] Error 2

10:27:27 Build Finished (took 2s.764ms)

Have any one Idee or solution?

thanks

2014-01-28 17:29:46 -0500 marked best answer publishers two message on the same topic not working for subscriber

Hi everyone; I am sending two deferent data message publishers on the same topic, and I see both data publisher in output when I use echo. I use two node and I make the subscriber from this publisher I see just the last message publish. Always loses the first message and stay the last. M y code is:

  output_modem_publisher_ = nh_.advertise<std_msgs::String>(modem_topic_, 100);
  modemin_subscriber_ = nh_.subscribe(modem_in_, 100, &Depth::modeminCallback, this);

void Depth::callPublisher()
{
    std::string out_modem2;
    std::stringstream monsun2;
    monsun2 << 2 << "@" << "d";
    out_modem2 = monsun2.str();
    std_msgs::String m2;
    m2.data = out_modem2;
    output_modem_publisher_.publish(m2);    


    std::string out_modem3;
    std::stringstream monsun3;
    monsun3 << 3 << "@" << "d" ;
    out_modem3 = monsun3.str();
    std_msgs::String m3;
    m3.data = out_modem3;
    output_modem_publisher_.publish(m3);    
}
 ...
 ...

  ros::Rate loop_rate(15);
  int count = 0;
  while (ros::ok())
  {
    depth.callPublisher();
    ros::spinOnce();
    loop_rate.sleep();
    ++count;
  }

The echo results are for the publisher:

rostopic echo depth/modem_topic 

data: 2@d
---
data: 3@d
---
data: 2@d
---
data: 3@d
---

... The echo results are for the subscriber :

rostopic echo depth2/modem_in:


    data: 3@d
    ---
    data: 3@d
    ---
    data: 3@d
    ---
    ...

when I use usleep(ms) for 10ms I see both data by subscriber. But I don't like to use usleep() due to make low performance for my program.

the code of subscriber is:

void DepthMonsun::modeminCallback(const std_msgs::StringPtr& modemin_msg)
{
//  ROS_INFO(" modeminCallback ");

  std::string in_modem;
  in_modem = modemin_msg->data;
  std::vector<std::string> v;
  split(in_modem, v, '@');
    //decoder the data that received from modem/out of MONSUN

    if (in_modem[0] == '2')
    {
      std::vector<std::string> v;
      split(in_modem, v, '@');
      x = 0;
      x = atof(v.at(2).c_str());
....
    }
else if (in_modem[0] == '3')
{
      std::vector<std::string> v;
      split(in_modem, v, '@');
      y = 0;
      y = atof(v.at(2).c_str());
...
}

Any idea for solving this problem...,

thanks

2014-01-28 17:26:13 -0500 marked best answer Invalid arguments, Convert from Quaternion to Euler

Hi everyone, I used the section code for convert from Quaternion to Euler as :

void Nav::compassCallback(const sensor_msgs::Imu::ConstPtr& msg)
{
    // Convert quaternion to RPY.
    btQuaternion q;
    double roll, pitch, yaw;
    tf::quaternionMsgToTF(msg->orientation, q);
    btMatrix3x3(q).getRPY(roll, pitch, yaw);
    ROS_DEBUG("RPY = (%lf, %lf, %lf)", roll, pitch, yaw);
} // end compassCallback()

I get it from: link text

but I got this error from Eclipse :

Invalid arguments ' Candidates are: void getRPY(float &, float &, float &, unsigned int) '

I tried to used make on console on ROS and everything was good without error.

2013-11-11 22:29:52 -0500 marked best answer Update Problem, Error: is not a package or launch file name

Hi, everything was OK before I did update. After update of ROS packages the ROS Groovy not work or give me the following message:

[move_monsun] is not a package or launch file name when I use the lanch file

roslaunch move_monsun move_monsun.launch
<launch>
    <group ns="monsun"> 
      <node pkg="move_monsun" name="PID_Move" type="move_monsun_node" output="screen">
    <param name="k_p" value="1.0" type="double"/>
    <param name="k_i" value="0.0" />
    <param name="k_d" value="0.0" />
    <param name="k_pl" value="1.0" type="double"/>
    <param name="k_il" value="0.0" />
    <param name="k_dl" value="0.0" />
    <param name="i_max" value="0.0" />
    <param name="output_min" value="-60.0" />
    <param name="output_max" value="60.0" />
    <param name="output_minl" value="-40.0" />
    <param name="output_maxl" value="40.0" />
     </node>
    </group>
</launch>

I am sure, I don't make any change in path of ros_workspace. I am run for the same packages before the update and they work and after the update don't work. I'm sure I did not do to change anything in the my files only I've update for my ROS_packages. I tred rosmake agin for the same packges and I get the follwing:

[ rosmake ] rosmake starting...                                                                                                        
[ rosmake ] No package or stack specified.  And current directory 'move_monsun' is not a package name or stack name.                   
[ rosmake ] Packages requested are: []                                                                                                 
[ rosmake ] Logging to directory /home/amory/.ros/rosmake/rosmake_output-20130703-172136                                               
[ rosmake ] Expanded args [] to:
[]                                                                                                    
[ rosmake ] ERROR: No arguments could be parsed into valid package or stack names.

In my .bashrc there the path of ROS

source /opt/ros/groovy/setup.bash
export ROS_PACKAGE_PATH=~/ros_workspace:$ROS_PACKAGE_PATH
export ROS_WORKSPACE=~/ros_workspace

And roscd is working. Any ideas thanks

2013-08-01 02:52:59 -0500 received badge  Famous Question (source)
2013-07-31 23:46:57 -0500 edited question What the best simulator to connect with ROS?

Hi everyone,

I have once underwater robot with six thruster (Dc motors), and I want to create swarm of underwater robots. It is more difficult to create the swarm in practice.

For this reason i want to simulate the swarm of underwater robots to work with ROS.

I don't know what is the best and suitable for the underwater robots and water environment such as the drag, density and pressure that connect with ROS. Any suggestion ...??

2013-07-29 21:43:08 -0500 received badge  Famous Question (source)
2013-07-29 03:54:04 -0500 marked best answer How to install ROS hydro beta?

Hi everyone,

I have ubuntu 12.04 LTS. I want to install ROS hydro beta same way as Groovy ROS: http://www.ros.org/wiki/groovy/Installation/Ubuntu.

I search in ROS website but i don't found how to install it. Any idea? thanks

2013-07-29 01:13:27 -0500 received badge  Notable Question (source)
2013-07-28 22:57:56 -0500 received badge  Notable Question (source)
2013-07-28 21:55:03 -0500 received badge  Popular Question (source)
2013-07-28 18:12:44 -0500 received badge  Student (source)