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

LucYang's profile - activity

2019-05-16 06:55:50 -0500 received badge  Self-Learner (source)
2019-05-16 06:55:50 -0500 received badge  Teacher (source)
2018-08-08 01:58:15 -0500 marked best answer Turtlebot_navigation issue:local_map drifts after a long-distance movement.

I want to upload some pictures to show my problem, but I don't have enough points. Therefore, I can only explain it with my poor English. Sorry. I am using a turtlebot2 to do my experiments. It worked well for a long time. But this Monday, after I built a new map or maybe after I decrease the max_vel_x, I found it can not locate itself well any more. I usually start my turtlebot2 at the same position as the position that I start to gmapping. At first, the local_map can match the static map well. But if I send a goal that is a long-distance away, the local_map would drift. Then the local_map can not match the static map well with not only distance but also orientation. I have tried everthing I can think out to fix it, but none of them worked. Need help~~

The map is a big rectangle, about 6m*6m. I can upload now. image description image description

2018-08-07 11:03:46 -0500 edited answer Problem insatlling ROS indigo in ubuntu 14.04: python-catkin-pkg is not getting installed

It is the most feasible way to reinstall the whole ubuntu. The key operation is to update the ubuntu to the latest. Ther

2018-08-07 11:02:47 -0500 edited answer Problem insatlling ROS indigo in ubuntu 14.04: python-catkin-pkg is not getting installed

It is the most feasible way to reinstall the whole ubuntu. The key operation is to update the ubuntu to the latest. Ther

2018-08-07 10:59:53 -0500 answered a question Problem insatlling ROS indigo in ubuntu 14.04: python-catkin-pkg is not getting installed

It is the most feasible way to reinstall the whole ubuntu. The key operation is to update the ubuntu to the latest. Ther

2018-08-07 10:58:00 -0500 commented question Problem insatlling ROS indigo in ubuntu 14.04: python-catkin-pkg is not getting installed

For more details to view this web page. link text

2018-08-07 10:56:23 -0500 commented question Problem insatlling ROS indigo in ubuntu 14.04: python-catkin-pkg is not getting installed

It is the most feasible way to reinstall the whole ubuntu. The key operation is to update the ubuntu to the latest. Ther

2018-08-01 21:38:25 -0500 commented question Problem insatlling ROS indigo in ubuntu 14.04: python-catkin-pkg is not getting installed

Hi, I have solved this issue. Once you have meet the error , you can only reinstall system, then follow the installation

2018-08-01 21:38:02 -0500 commented question Problem insatlling ROS indigo in ubuntu 14.04: python-catkin-pkg is not getting installed

Hi, I have solved this issue. Once you have meet the error , you can only reinstall system, then follow the installation

2018-08-01 14:52:30 -0500 commented question Problem insatlling ROS indigo in ubuntu 14.04: python-catkin-pkg is not getting installed

The same. It may be Ubuntu 14.04's problem.See this link text

2018-08-01 02:57:42 -0500 commented question single rosmaster multi-turtlebots 2

Hello. I have tried it. My worry is right, because the tf trees on different turtlebot is the same , when I launch the s

2018-08-01 02:54:19 -0500 commented question single rosmaster multi-turtlebots 2

Hello. I have tried it. My worry is right, because the tf trees on different turtlebot is the same , when I launch the s

2018-08-01 02:51:29 -0500 commented question single rosmaster multi-turtlebots 2

Hello. I have tried it. My worry is right, because the tf trees on different turtlebot is the same , when I launch the s

2018-07-31 19:33:08 -0500 commented question single rosmaster multi-turtlebots 2

I can also teleop them by roslaunch turtlebot_teleop keyboard_teleop.launch under different ROS_NAMESPACE. I am trying t

2018-07-31 19:32:01 -0500 commented question single rosmaster multi-turtlebots 2

I can also teleop them by roslaunch turtlebot_teleop keyboard_teleop.launch under different ROS_NAMESPACE. I am trying t

2018-07-31 19:27:27 -0500 commented question single rosmaster multi-turtlebots 2

Thank you for your advice, I have successfully implemented multi-master with multimaster_fkie. As my turtlebot is not th

2018-07-31 19:27:27 -0500 received badge  Commentator
2018-07-31 03:02:40 -0500 commented question single rosmaster multi-turtlebots 2

It is really good to know someone has done it. Could please help me to ask the other engineers what are their solutions?

2018-07-30 23:29:04 -0500 commented question single rosmaster multi-turtlebots 2

So you have done this problem at last? Thank you very much for giving the advice and hope.

2018-07-30 22:58:40 -0500 commented question Why tf trees for multi-robot system not showing?

Hi,I am trying to run multi turtlebots on one master. Have you solved this problem? I wonder how did you make your tf t

2018-07-30 08:07:20 -0500 commented question single rosmaster multi-turtlebots 2

Hello, I wonder if you have solved this problem? If so, please tell me how to do it, I am dealing with the same problem

2018-07-28 11:40:29 -0500 commented question Multiple Robot Navigation

I wonder if you have done this?Let me know,please.

2018-07-28 11:39:23 -0500 received badge  Famous Question (source)
2018-07-28 11:37:38 -0500 answered a question Multiple Robot Navigation

I wonder if you have done this?Let me know,please.

2018-03-29 19:42:52 -0500 commented answer What is "Rolling Window" used for?

Can I increase the size of rolling window to help the robot locate itself better?

2018-03-28 10:23:09 -0500 received badge  Notable Question (source)
2018-03-28 07:29:24 -0500 answered a question Turtlebot_navigation issue:local_map drifts after a long-distance movement.

I did this and the turtlebot2 behaved better, but still not good enough.

2018-03-27 02:34:49 -0500 received badge  Popular Question (source)
2018-03-26 22:09:56 -0500 commented question Turtlebot_navigation issue:local_map drifts after a long-distance movement.

No,the map is the same as it was at last week and it worked well. This problem appeared just yesterday.

2018-03-26 22:03:15 -0500 edited question Turtlebot_navigation issue:local_map drifts after a long-distance movement.

Turtlebot_navigation issue:local_map drifts after a long-distance movement. I want to upload some pictures to show my pr

2018-03-26 21:36:42 -0500 marked best answer How to send hex type data to the serial port using wjwwood_serial in ros?

I am trying to connect a VOC sensor in ROS via RS485 communication port. I opened the port with serial package downloaded form wjwwood.com now. Then I defined a char array request[8]={0x01,0x03,0x00,0x00,0x00,0x02,0xc4,0x0b} and sent it to the port by the code ser.write(request).As a result, I received an response frame ("01 83 03 01 31") which means my request frame was wrong in Modbus protocol. Is it right to send a char array to the port?How to send hex type data to the serial port? Sorry for my poor English. Here are my codes.

#include <string>
#include <iostream>
#include <cstdio>

// OS Specific sleep
#ifdef _WIN32
#include <windows.h>
#else
#include <unistd.h>
#endif

#include "serial/serial.h"

using std::string;
using std::exception;
using std::cout;
using std::cerr;
using std::endl;
using std::vector;



void my_sleep(unsigned long milliseconds) {
#ifdef _WIN32
      Sleep(milliseconds); // 100 ms
#else
      usleep(milliseconds*1000); // 100 ms
#endif
}

void enumerate_ports()
{
    vector<serial::PortInfo> devices_found = serial::list_ports();

    vector<serial::PortInfo>::iterator iter = devices_found.begin();

    while( iter != devices_found.end() )
    {
        serial::PortInfo device = *iter++;

        printf( "(%s, %s, %s)\n", device.port.c_str(), device.description.c_str(),
     device.hardware_id.c_str() );
    }
}

void print_usage()
{
    cerr << "Usage: test_serial {-e|<serial port address>} ";
    cerr << "<baudrate> [test string]" << endl;
}



int run(int argc, char **argv)
{
  if(argc < 2) {
      print_usage();
    return 0;
  }

  // Argument 1 is the serial port or enumerate flag
  string port(argv[1]);

  if( port == "-e" ) {
      enumerate_ports();
      return 0;
  }
  else if( argc < 3 ) {
      print_usage();
      return 1;
  }

  // Argument 2 is the baudrate
  unsigned long baud = 0;
#if defined(WIN32) && !defined(__MINGW32__)
  sscanf_s(argv[2], "%lu", &baud);
#else
  sscanf(argv[2], "%lu", &baud);
#endif

  // port, baudrate, timeout in milliseconds
  serial::Serial my_serial(port, baud, serial::Timeout::simpleTimeout(1000));

  cout << "Is the serial port open?";
  if(my_serial.isOpen())
    cout << " Yes." << endl;
  else
    cout << " No." << endl;

  // Get the Test string
  char ask[8]={0x01,0x03,0x00,0x00,0x00,0x02,0xc4,0x0b};
  int count = 0;
  int i=0;
  string test_string;
  if (argc == 4) {
    test_string = ask;
  } else {
    test_string = ask;
  }

  // Test the timeout, there should be 1 second between prints
  cout << "Timeout == 1000ms, asking for 1 more byte than written." << endl;
  while (count < 10) {
    size_t bytes_wrote = my_serial.write(test_string);

    string result = my_serial.read(test_string.length()+1);

    cout << "Iteration: " << count << ", Bytes written: ";
    cout << bytes_wrote << ", Bytes read: "<<endl;
    cout << result.length() << ", String read: " << result << endl;
    //for( i=0;i<8;i++) {printf("%x\n",result[i]);}
    count += 1;
  }

  return 0;
}

int main(int argc, char **argv) {
  try {
    return run(argc, argv);
  } catch (exception &e) {
    cerr << "Unhandled Exception: " << e.what() << endl;
  }
}

And here are the results I received.

luc@luc-ThinkPad-T450:~/catkin_ws$ rosrun serial serial_example /dev/ttyUSB0 11
Is the serial port open? Yes.
Timeout == 1000ms, asking for 1 more byte than written.
Iteration: 0, Bytes written: 2, Bytes read: 
3, String read: �
Iteration: 1, Bytes written: 2, Bytes read: 
3, String read: 1
Iteration: 2, Bytes written: 2, Bytes read: 
3, String read: �1
Iteration: 3, Bytes written: 2, Bytes read ...
(more)
2018-03-26 21:35:04 -0500 marked best answer Question about sending simple goal to navigation stack.

I read this answer about how to publish /move_base_simple/goal. But I want to do something further.

Here is my current setup:

First ran:

roslaunch turtlebot_bringup minimal.launch

roslaunch turtlebot_navigation amcl_demo_rplidar.launch map_file:=/home/ubuntu/maps/mymap.yaml

then I try to publish the goals:

rostopic pub /move_base_simple/goal geometry_msgs/PoseStamped '{header: {stamp: now, frame_id: "map"}, pose: {position: {x: 1.0, y: 0.0, z: 0.0}, orientation: {w: 1.0}}}'

The robot moved.

Then I tried to do something further, so I wrote a node to publish the msg. Here is my code.

#include "std_msgs/String.h"
#include<ros/ros.h>
#include<geometry_msgs/PoseStamped.h>
#include <sstream>

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

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

  ros::NodeHandle nh;

  ros::Publisher pub = nh.advertise<geometry_msgs::PoseStamped>("/move_base_simple/goal",1) ;

  ros::Rate loop_rate(1);

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

   geometry_msgs::PoseStamped goal;

   goal.header.frame_id="map";
   goal.pose.position.x=1;
   goal.pose.orientation.w=1;
   goal.pose.orientation.z=0;

   ROS_INFO("%lf",goal.pose.position.x);

   pub.publish(goal);

   ros::spinOnce();

   loop_rate.sleep();

   }


  return 0;
}

After actkin_make, I rosrun it, but something wired happened.

Here is the result:

luc@luc-ThinkPad-T450:~/catkin_ws$ rosrun goal_test publish_goal 
[ INFO] [1510794351.286271377]: 1.000000
[ INFO] [1510794352.286323753]: 1.000000
[ INFO] [1510794353.286425226]: 1.000000
[ INFO] [1510794354.286430381]: 1.000000
[ INFO] [1510794355.286429147]: 1.000000
[ INFO] [1510794356.286306929]: 1.000000

But the turtlebot2 is still.

Then I cancel the process by "ctrl+c", the turtlebot2 moved.

So, I am confused.

Could anyone please tell me how to publish a msg through a node to send simple goal to make my turtlebot2 move?

Sorry for my poor English.

2018-03-26 21:34:52 -0500 received badge  Famous Question (source)
2018-03-26 21:34:52 -0500 received badge  Notable Question (source)
2018-03-26 21:19:46 -0500 edited question Turtlebot_navigation issue:local_map drifts after a long-distance movement.

Turtlebot_navigation issue:local_map drifts after a long-distance movement. I want to upload some pictures to show my pr

2018-03-26 21:19:45 -0500 edited question Turtlebot_navigation issue:local_map drifts after a long-distance movement.

Turtlebot_navigation issue:local_map drifts after a long-distance movement. I want to upload some pictures to show my pr

2018-03-26 21:19:45 -0500 received badge  Editor (source)
2018-03-26 21:02:22 -0500 received badge  Organizer (source)
2018-03-26 20:57:40 -0500 asked a question Turtlebot_navigation issue:local_map drifts after a long-distance movement.

Turtlebot_navigation issue:local_map drifts after a long-distance movement. I want to upload some pictures to show my pr

2018-03-14 03:26:32 -0500 received badge  Enthusiast
2018-03-10 00:31:37 -0500 received badge  Famous Question (source)
2018-03-06 07:02:10 -0500 received badge  Supporter (source)
2017-11-20 01:16:38 -0500 received badge  Notable Question (source)
2017-11-16 08:15:37 -0500 received badge  Popular Question (source)
2017-11-16 05:58:11 -0500 answered a question Question about sending simple goal to navigation stack.

I added ros::Duration d(5); before loop_rate.sleep(); It works.

2017-11-16 05:56:35 -0500 commented question Question about sending simple goal to navigation stack.

Thank you! It is exactly the reason what you say.

2017-11-15 21:52:10 -0500 asked a question Question about sending simple goal to navigation stack.

Question about sending simple goal to navigation stack. I read this answer about how to publish /move_base_simple/goal.