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

lolz733's profile - activity

2022-02-16 10:57:23 -0500 received badge  Famous Question (source)
2019-09-25 02:45:30 -0500 received badge  Famous Question (source)
2019-09-25 02:45:30 -0500 received badge  Notable Question (source)
2018-09-18 19:53:26 -0500 marked best answer How i change the existing package with programme to what i need?

Hi , i am a newbie in ros and currently i am trying to rebuild a programme that came with the package. But how do i do that anyone have any idea? i am currently using rospeex to do voice recognition and answer. Initially i though that all that i was required to do was to change the source cpp file for the English version. After i did that , i rebuild it by using the catkin_build_isolated. However , despite that me changing the programme of the source code and using the catkin_build_isolated. The programme didnt change itself like it still only react to the two words " what time" while i tried to change it to "the time" just to see if the programme would actually be able to change. However it seems like its not possible. Anyone mind telling me where went wrong was it the fact that i used catkin_make_isolated ? because thats what the website actually says to use to compile the programme. Anyone have any suggestion or any ways in which i should do to be able to change the programme ?

I have made another file using their file as reference and apparently it keeps not getting any response from the server as the program uses the server of either google or national institute of information and communication technology.

I have tried to get the api key for google and manage to get one and adding it in and despite that i still get errors. while using the nict's server did not give me any response at all and instead a timeout.

Anyone have suggestions?

the cpp file from the package

#include <iostream> #include <sstream> #include <boost regex.hpp=""> #include <boost date_time="" posix_time="" posix_time.hpp=""> #include <ros ros.h=""> #include “rospeex_if/rospeex.h”

static rospeex::Interface interface;

void sr_response( const std::string& msg ) { using boost::posix_time::ptime; using boost::posix_time::second_clock; std::string msg_tr(msg); std::cerr << "you said : " << msg << std::endl; std::transform(msg_tr.begin(), msg_tr.end(), msg_tr.begin(), ::tolower);

boost::regex time_reg(".*what time.+"); 
if ( boost::regex_match(msg_tr, time_reg) )

{ std::string text = ""; ptime now = second_clock::local_time(); std::stringstream ss; ss << "It's " << now.time_of_day().hours() << ":" << now.time_of_day().minutes() << "."; text = ss.str(); std::cerr << "rospeex reply : " << text << std::endl; interface.say(text, "en", "nict"); } }

int main( int argc, char** argv ) { ros::init(argc, argv, "sr_ss_demo");

interface.init(); interface.registerSRResponse( sr_response ); interface.setSPIConfig("en", "nict"); ros::spin(); return 0; }

2018-03-26 08:52:23 -0500 received badge  Famous Question (source)
2017-04-20 12:56:30 -0500 received badge  Famous Question (source)
2017-01-21 04:42:50 -0500 received badge  Notable Question (source)
2017-01-20 11:00:31 -0500 received badge  Popular Question (source)
2017-01-19 22:10:24 -0500 asked a question Hi , is it possible to use c++ file to execute a executable file?

I was using publisher and subscribers(C++) , i am thinking whether is it possible to execute a executable file using a int receive from the publisher?

2016-12-13 19:20:09 -0500 received badge  Notable Question (source)
2016-10-21 02:58:08 -0500 received badge  Famous Question (source)
2016-10-21 01:02:41 -0500 commented answer Anyone can help? i made a simple node where it publish Int8 and subsribe to that Int8 but it didnt work

It's ok I got it to work I forgot to put <output/> on the launch file

2016-10-21 00:11:58 -0500 commented answer Anyone can help? i made a simple node where it publish Int8 and subsribe to that Int8 but it didnt work

i changed the

  // Declare number here
  std_msgs::Int8 number;

to

int number;

and it worked if i rosrun the executable directly but when i roslaunch the two files it doesnt work.why is it like that?

2016-10-21 00:06:52 -0500 commented answer Anyone can help? i made a simple node where it publish Int8 and subsribe to that Int8 but it didnt work

compilation error though :(

2016-10-20 18:51:16 -0500 commented answer Anyone can help? i made a simple node where it publish Int8 and subsribe to that Int8 but it didnt work

And I was able to get string variables but idk why it seems like I'm not able to get integer type variables . So do I store the msg->data into a integer variable that is a global variable ?

2016-10-20 18:44:11 -0500 commented answer Anyone can help? i made a simple node where it publish Int8 and subsribe to that Int8 but it didnt work

And the way integration is gonna work is by subscribing to topic. This way each group can just forcus on their own pkg and there no need for someone to integrate the project by creating a package to have all the Programmes of the Pkg from all the teams

2016-10-20 18:42:28 -0500 received badge  Commentator
2016-10-20 18:42:28 -0500 commented answer Anyone can help? i made a simple node where it publish Int8 and subsribe to that Int8 but it didnt work

Oh, this is because I want to test the thing to see how do I actually receive the variable from a topic. As I am currently doing a project in which my part is already done. What is left is integration of the projects.

2016-10-20 15:19:10 -0500 received badge  Notable Question (source)
2016-10-20 11:22:49 -0500 commented answer Anyone can help? i made a simple node where it publish Int8 and subsribe to that Int8 but it didnt work

And the delcaration of the variable in which I wanna put my data:21 into. Do I just delcaration as global variable int number ? Or do i have declare number as a string and then input the data into the string if I just want to use it for an if statement like as above if the number == 21 thig happen

2016-10-20 11:20:02 -0500 commented answer Anyone can help? i made a simple node where it publish Int8 and subsribe to that Int8 but it didnt work

Do I use ROS::spinOnce() or ROS::spin() ? What's the difference ?

2016-10-20 10:19:04 -0500 received badge  Popular Question (source)
2016-10-20 08:12:37 -0500 asked a question Anyone can help? i made a simple node where it publish Int8 and subsribe to that Int8 but it didnt work

this is the talker and listener i modified . when i compile. it says my std_msgs::Int8 number is not derived from 'const std::istream_iterator..' am i doing something wrong for the variable declaration? i tried int but when i compiled and ran the while(ros::ok()) loop didn't work. the "21!!!!!" did not show up. But it worked fine as in that the listener is subsribed to the talker's topic " chatter" but it was publising the data:21. Anyone have any suggestion or reason as to why i cant use the data or why the programme didn't work?

listener.cpp:

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

using namespace std;

void chatterCallback(const std_msgs::Int8::ConstPtr& msg)
{
  // Declare number here
  std_msgs::Int8 number;

  ROS_INFO("I heard: [%d]", msg->data);
  number = msg->data;

  // Check if the number received is 21
  if(number==21)
   {
    ROS_INFO("21!!!!!");
   }
}

int main(int argc, char **argv)
{
  ros::init(argc, argv, "listener");

  ros::NodeHandle n;

  ros::Subscriber sub = n.subscribe("chatter", 1000, chatterCallback);

  ros::spin();

  return 0;
}

talker.cpp:

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

#include <sstream>


int main(int argc, char **argv)
{

  ros::init(argc, argv, "talker");


  ros::NodeHandle n;

  ros::Publisher chatter_pub = n.advertise<std_msgs::Int8>("chatter", 1000);

  ros::Rate loop_rate(10);


  int count = 0;
  while (ros::ok())
  {

    std_msgs::Int8 msg;
    msg.data = 21;
    ROS_INFO("%d", msg.data);

    chatter_pub.publish(msg);

    ros::spinOnce();

    loop_rate.sleep();
    ++count;
  }


  return 0;
}
2016-10-12 04:51:02 -0500 asked a question anyone have any http get response type of node for ros?

i need to be able to use ros to make a node to be able to find the weather from the internet for example yahoo weather by using the api. Anyone have any already made node that does that ? mind sharing. Thanks

2016-09-26 02:50:03 -0500 received badge  Student (source)
2016-09-26 00:56:13 -0500 commented answer Error:cannot launch node of type[test/test]:cannot locate node test in package test

yeah but weird thing is i tried doing it on my friend laptop and it works but its ok >.> its project but thanks anyway

2016-09-26 00:08:42 -0500 received badge  Popular Question (source)
2016-09-26 00:08:30 -0500 received badge  Enthusiast
2016-09-25 23:31:52 -0500 received badge  Popular Question (source)
2016-09-25 23:30:57 -0500 commented answer Error:cannot launch node of type[test/test]:cannot locate node test in package test

ps it was typo* my original launch file is the correct one >.> but it still says the same error.

2016-09-25 20:00:51 -0500 asked a question Error:cannot launch node of type[test/test]:cannot locate node test in package test

Hi, i have created a new pkg called test to test out the sound_play pkg . If i could use it to make my own pkg for my project. Thus , i created a simple pkg with just 1 launch file and 1 cpp file with a package and cmake file. The package is able to compile but when i roslaunch it give the eroor of not being able of launch the node type and it is because it cant locate the node. Anyone have any help? Is it because my launch file wrote wrongly?

my launch file:

<launch>
  <node name="soundplay_node" pkg="sound_play"  type="soundplay_node.py"
  <node name="test" pkg="test' type="test"/>
<launch>

I know that my package is called test but for node name , is it declared under the the add executable isn't it? For that i wrote : add_executable (test src/test.cpp)

for the dependencies : add_dependencies (test ${catkin_EXPORTED_TARGETS})

for link_target libraries target_link_libraries (test ${catkin_LIBRARIES})

My error is: ERROR: cannot launch node of type [test/test]: can't locate node [test] in package [test]

2016-09-25 14:29:16 -0500 received badge  Notable Question (source)
2016-09-25 04:09:52 -0500 received badge  Famous Question (source)
2016-09-25 02:21:36 -0500 edited question Why can't my audio_common(audio_capture and audio_play) compile

For some reason, the file which i source from : git https://github.com/ros-drivers/audio_... . The common_audio file, i could not compile it. What i did was to firstly install the audio_common package for ros-indigo. Then i updated my rosdep. FInally then i git clone it to my work space's src and then i catkin_make it. Despite going through the installation of audio_common , it still says that im missing gstreamer-1.0 package.

As, currently the project that im doing now require me to use pocketsphinx. i actually install pocketsphinx and gstreamer 0.1 together : sudo apt-get install gstreamer0.10-pocketsphinx. Which is the problem here. Isn't gstreamer 1.0 and gstream 0.1 the same thing? From what i have found online it seems to say that gstreamer 1.0 is a older version of gstreamer 0.1.

Is there anyway in which i will be able to solve the missing package of gstreamer1.0? and do i actually need the audio_capture for me to be using the sound_play?

the main reason i need to compile the audio_common is due to the fact that i need to try out the sound_play program inside the audio_common file. I can't compile with the audio_capture file and the audio_play file.

Now, i have created a new package and deleted the the common_audio as i realised my errors but problem now is this =.=

My new package compilation:

Scanning dependencies of target sound_test_node
[100%] Building CXX object program/CMakeFiles/sound_test_node.dir/src/sound_test.cpp.o
In file included from /home/low/catkin_ws/src/program/src/sound_test.cpp:2:0:
/home/low/catkin_ws/src/program/include/sound_play/sound_play.h: In member function ‘void sound_play::SoundClient::sendMsg(int, int, const string&, const string&, const float&)’:
/home/low/catkin_ws/src/program/include/sound_play/sound_play.h:388:11: error: ‘sound_play::SoundRequest’ has no member named ‘volume’
       msg.volume = 0;
           ^
/home/low/catkin_ws/src/program/include/sound_play/sound_play.h:390:11: error: ‘sound_play::SoundRequest’ has no member named ‘volume’
       msg.volume = 1.0f;
           ^
/home/low/catkin_ws/src/program/include/sound_play/sound_play.h:392:11: error: ‘sound_play::SoundRequest’ has no member named ‘volume’
       msg.volume = vol;
           ^
make[2]: *** [program/CMakeFiles/sound_test_node.dir/src/sound_test.cpp.o] Error 1
make[1]: *** [program/CMakeFiles/sound_test_node.dir/all] Error 2
make: *** [all] Error 2
Invoking "make -j4 -l4" failed