Giter Club home page Giter Club logo

turtlebot2_demo's Issues

can this demo run on ROS2 dashing?

Bug report

Required Info:

  • Operating System:
  • Installation type:
  • Version or commit hash:
  • DDS implementation:
  • Client library (if applicable):

Steps to reproduce issue


Expected behavior

Actual behavior

Additional information


Feature request

Feature description

Implementation considerations

console spam if no joystick connected

maybe reconsider the use of the restart exit handler

$ launch ~/ros2_ws/src/turtlebot2_demo/turtlebot2_drivers/launch/turtlebot_joy.py
(joy_node) pid 2737: ['joy_node'] (stderr > stdout, all > console)
[joy_node] ahhhh couldn't open /dev/input/js0
(joy_node) rc 1
(joy_node) pid 2738: ['joy_node'] (stderr > stdout, all > console)
[joy_node] ahhhh couldn't open /dev/input/js0
(joy_node) rc 1
(joy_node) pid 2739: ['joy_node'] (stderr > stdout, all > console)
[joy_node] ahhhh couldn't open /dev/input/js0
(joy_node) rc 1
(joy_node) pid 2740: ['joy_node'] (stderr > stdout, all > console)
[joy_node] ahhhh couldn't open /dev/input/js0
(joy_node) rc 1
(joy_node) pid 2741: ['joy_node'] (stderr > stdout, all > console)
...

Cannot find joy_node?

After finished the build, I can execute the kobuki_node, but I cannot find the joy_node as described in README.md. where to download it?

Split up the "turtlebot2_drivers" package

Right now, it is hosting at least 3 different things:

  • The kobuki driver node
  • The dumb teleop node
  • The launch files

We should probably just get rid of dumb_teleop completely. Beyond that, it would probably make sense to fork the upstream https://github.com/yujinrobot/kobuki.git repository to land the updated kobuki driver in (see #34 ). And then the launch files would make more sense as a top-level "robot" package.

Error occur for cartographer_ros

When I install packages use command

src/ament/ament_tools/scripts/ament.py build --isolated --symlink-install --parallel --only cartographer cartographer_ros ceres_solver turtlebot2_amcl turtlebot2_cartographer turtlebot2_drivers turtlebot2_follower turtlebot2_teleop --make-flags -j2 -l2

I get this error like below:

Determining if the pthread_create exist failed with the following output:
Change Dir: /home/wangyawei/RosWorkspace/ros2_ws/build_isolated/cartographer_ros/CMakeFiles/CMakeTmp

Run Build Command:"/usr/bin/make" "cmTC_2f9df/fast"
/usr/bin/make -f CMakeFiles/cmTC_2f9df.dir/build.make CMakeFiles/cmTC_2f9df.dir/build
make[1]: Entering directory '/home/wangyawei/RosWorkspace/ros2_ws/build_isolated/cartographer_ros/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_2f9df.dir/CheckSymbolExists.c.o
/usr/bin/cc     -o CMakeFiles/cmTC_2f9df.dir/CheckSymbolExists.c.o   -c /home/wangyawei/RosWorkspace/ros2_ws/build_isolated/cartographer_ros/CMakeFiles/CMakeTmp/CheckSymbolExists.c
Linking C executable cmTC_2f9df
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_2f9df.dir/link.txt --verbose=1
/usr/bin/cc       CMakeFiles/cmTC_2f9df.dir/CheckSymbolExists.c.o  -o cmTC_2f9df 
CMakeFiles/cmTC_2f9df.dir/CheckSymbolExists.c.o: In function `main':
CheckSymbolExists.c:(.text+0x16): undefined reference to `pthread_create'
collect2: error: ld returned 1 exit status
CMakeFiles/cmTC_2f9df.dir/build.make:97: recipe for target 'cmTC_2f9df' failed
make[1]: *** [cmTC_2f9df] Error 1
make[1]: Leaving directory '/home/wangyawei/RosWorkspace/ros2_ws/build_isolated/cartographer_ros/CMakeFiles/CMakeTmp'
Makefile:126: recipe for target 'cmTC_2f9df/fast' failed
make: *** [cmTC_2f9df/fast] Error 2

File /home/wangyawei/RosWorkspace/ros2_ws/build_isolated/cartographer_ros/CMakeFiles/CMakeTmp/CheckSymbolExists.c:
/* */
#include <pthread.h>

int main(int argc, char** argv)
{
  (void)argv;
#ifndef pthread_create
  return ((int*)(&pthread_create))[argc];
#else
  (void)argc;
  return 0;
#endif
}

Determining if the function pthread_create exists in the pthreads failed with the following output:
Change Dir: /home/wangyawei/RosWorkspace/ros2_ws/build_isolated/cartographer_ros/CMakeFiles/CMakeTmp

Run Build Command:"/usr/bin/make" "cmTC_611b6/fast"
/usr/bin/make -f CMakeFiles/cmTC_611b6.dir/build.make CMakeFiles/cmTC_611b6.dir/build
make[1]: Entering directory '/home/wangyawei/RosWorkspace/ros2_ws/build_isolated/cartographer_ros/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_611b6.dir/CheckFunctionExists.c.o
/usr/bin/cc    -DCHECK_FUNCTION_EXISTS=pthread_create   -o CMakeFiles/cmTC_611b6.dir/CheckFunctionExists.c.o   -c /usr/share/cmake-3.5/Modules/CheckFunctionExists.c
Linking C executable cmTC_611b6
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_611b6.dir/link.txt --verbose=1
/usr/bin/cc   -DCHECK_FUNCTION_EXISTS=pthread_create    CMakeFiles/cmTC_611b6.dir/CheckFunctionExists.c.o  -o cmTC_611b6 -lpthreads 
/usr/bin/ld: cannot find -lpthreads
collect2: error: ld returned 1 exit status
CMakeFiles/cmTC_611b6.dir/build.make:97: recipe for target 'cmTC_611b6' failed
make[1]: *** [cmTC_611b6] Error 1
make[1]: Leaving directory '/home/wangyawei/RosWorkspace/ros2_ws/build_isolated/cartographer_ros/CMakeFiles/CMakeTmp'
Makefile:126: recipe for target 'cmTC_611b6/fast' failed
make: *** [cmTC_611b6/fast] Error 2

Someone can help me?

Failed to install turtlebot drivers

Bug report

Required Info:

  • Operating System:
    Ubuntu 18.04
  • Installation type:
    Source
  • Version or commit hash:
  • DDS implementation:
  • Client library (if applicable):

turtlebot_drivers

Steps to reproduce issue


Expected behavior

Actual behavior

Failed <<< turtlebot2_drivers [30.0s, exited with code -11]

Additional information

I am trying to install turtlebot2 drivers following the instructions in the repository.
I cannot successfully install the turtlebot2 drivers and therefore I cannot successfully use the demo.

I have reached to a point where I have successfully installed ros2-bouncy from source. Installed ros-melodic. But when I try to build the ros1 libraries it throws an error.
Specifically. I run
colcon build --symlink-install --packages-select cartographer cartographer_ros turtlebot2_amcl turtlebot2_cartographer turtlebot2_drivers turtlebot2_follower turtlebot2_teleop

and I get

Starting >>> turtlebot2_drivers
Starting >>> cartographer                        
Failed   <<< turtlebot2_drivers [30.0s, exited with code -11]                                         
Aborted  <<< cartographer [8min 15s]                                          
                                      
Summary: 0 packages finished [8min 17s]
  1 package failed: turtlebot2_drivers
  1 package aborted: cartographer
  1 package had stderr output: cartographer
  5 packages not processed

Any help in this regard will be deeply appreciated. I am new to ros2, so sorry for noob questions.


Feature request

Feature description

Implementation considerations

About contribute to more demos

I am not sure whether this is the place to ask, however we have a turtlebot autonomous mapping repo under ROS indigo for more than 8 months. I would like to transfer it to ROS2 to add to the demos for turtlebot. Any suggestions? Thanks!

Create 2 Base Support in ROS2 Turtlebot Demo

Feature request

Support Create 2 iRobot base, other 3d sensors.

Feature description

In ROS Kinetic, one can use the iRobot Create 2 base for a turtlebot_demo by updating .bashrc:
export TURTLEBOT_BASE=create
export TURTLEBOT_STACKS=circles
export TURTLEBOT_3D_SENSOR=asus_xtion_pro (alternatively kinect)

Because this robot is still actively sold and marketed, it would be very helpful to have this same option. It is a very affordable option to try the turtlebot demos and it was easy to do with Kinetic.

Port the kobuki core drivers to ROS2

In order to build the current turtlebot2 drivers, one has to very carefully follow the build instructions: https://github.com/ros2/turtlebot2_demo/blob/master/README.md . In particular, during the initial build, Kinetic can not be sourced, otherwise it causes compilation errors. Then, the user has to source Kinetic and build just the turtlebot2 parts of the stack. Failing to follow this exact sequence can lead to API conflicts in tf2_ros, as seen in #74 . One thing we should do to work around this is to actually port libkobuki.so into ROS2 so that we don't have to have this dance with Kinetic.

ROS1 tf2_ros conflicts and interference with ROS2 tf2_ros of header file transform_broadcaster.h

Bug report

When build the turtlebot2_driver package, its kobuki_node depends on ROS1 kobuki_driver, but after running source /opt/ros/kinetic/setup.bash, the building process is directed to use APIs in ROS1 tf2_ros transform_broadcaster.h, howerver, it should use those same APIs which are defined is ROS2 tf2_ros transform_broadcaster.h and have different arguments from ROS1. the following is the build error:

+++ Building 'turtlebot2_drivers'
==> '. /home/ros/Myspace/rosdev/ros2/release-latest/build/turtlebot2_drivers/cmake__build.sh && /usr/bin/make cmake_check_build_system' in '/home/ros/Myspace/rosdev/ros2/release-latest/build/turtlebot2_drivers'
==> '. /home/ros/Myspace/rosdev/ros2/release-latest/build/turtlebot2_drivers/cmake__build.sh && /usr/bin/make -j4 -l4' in '/home/ros/Myspace/rosdev/ros2/release-latest/build/turtlebot2_drivers'
[ 50%] Built target dumb_teleop
[ 75%] Building CXX object CMakeFiles/kobuki_node.dir/src/kobuki_node.cpp.o
/home/ros/Myspace/rosdev/ros2/release-latest/src/ros2/turtlebot2_demo/turtlebot2_drivers/src/kobuki_node.cpp: In function ‘int main(int, char**)’:
/home/ros/Myspace/rosdev/ros2/release-latest/src/ros2/turtlebot2_demo/turtlebot2_drivers/src/kobuki_node.cpp:89:40: error: no matching function for call to ‘tf2_ros::TransformBroadcaster::TransformBroadcaster(std::shared_ptrrclcpp::Node&)’
tf2_ros::TransformBroadcaster br(node);
^
In file included from /home/ros/Myspace/rosdev/ros2/release-latest/src/ros2/turtlebot2_demo/turtlebot2_drivers/src/kobuki_node.cpp:42:0:
/opt/ros/kinetic/share/sophus/../../include/tf2_ros/transform_broadcaster.h:51:3: note: candidate: tf2_ros::TransformBroadcaster::TransformBroadcaster()
TransformBroadcaster();
^
/opt/ros/kinetic/share/sophus/../../include/tf2_ros/transform_broadcaster.h:51:3: note: candidate expects 0 arguments, 1 provided
/opt/ros/kinetic/share/sophus/../../include/tf2_ros/transform_broadcaster.h:48:7: note: candidate: tf2_ros::TransformBroadcaster::TransformBroadcaster(const tf2_ros::TransformBroadcaster&)
class TransformBroadcaster{

^
/opt/ros/kinetic/share/sophus/../../include/tf2_ros/transform_broadcaster.h:48:7: note: no known conversion for argument 1 from ‘std::shared_ptrrclcpp::Node’ to ‘const tf2_ros::TransformBroadcaster&’
/opt/ros/kinetic/share/sophus/../../include/tf2_ros/transform_broadcaster.h:48:7: note: candidate: tf2_ros::TransformBroadcaster::TransformBroadcaster(tf2_ros::TransformBroadcaster&&)
/opt/ros/kinetic/share/sophus/../../include/tf2_ros/transform_broadcaster.h:48:7: note: no known conversion for argument 1 from ‘std::shared_ptrrclcpp::Node’ to ‘tf2_ros::TransformBroadcaster&&’
/home/ros/Myspace/rosdev/ros2/release-latest/src/ros2/turtlebot2_demo/turtlebot2_drivers/src/kobuki_node.cpp:233:34: error: no matching function for call to ‘tf2_ros::TransformBroadcaster::sendTransform(geometry_msgs::msg::TransformStamped_<std::allocator >&)’
br.sendTransform(*odom_tf_msg);
^
In file included from /home/ros/Myspace/rosdev/ros2/release-latest/src/ros2/turtlebot2_demo/turtlebot2_drivers/src/kobuki_node.cpp:42:0:
/opt/ros/kinetic/share/sophus/../../include/tf2_ros/transform_broadcaster.h:63:8: note: candidate: void tf2_ros::TransformBroadcaster::sendTransform(const TransformStamped&)
void sendTransform(const geometry_msgs::TransformStamped & transform);
^
/opt/ros/kinetic/share/sophus/../../include/tf2_ros/transform_broadcaster.h:63:8: note: no known conversion for argument 1 from ‘geometry_msgs::msg::TransformStamped_<std::allocator >’ to ‘const TransformStamped& {aka const geometry_msgs::TransformStamped_<std::allocator >&}’
/opt/ros/kinetic/share/sophus/../../include/tf2_ros/transform_broadcaster.h:67:8: note: candidate: void tf2_ros::TransformBroadcaster::sendTransform(const std::vector<geometry_msgs::TransformStamped_<std::allocator > >&)
void sendTransform(const std::vector<geometry_msgs::TransformStamped> & transforms);
^
/opt/ros/kinetic/share/sophus/../../include/tf2_ros/transform_broadcaster.h:67:8: note: no known conversion for argument 1 from ‘geometry_msgs::msg::TransformStamped_<std::allocator >’ to ‘const std::vector<geometry_msgs::TransformStamped_<std::allocator > >&’
/home/ros/Myspace/rosdev/ros2/release-latest/src/ros2/turtlebot2_demo/turtlebot2_drivers/src/kobuki_node.cpp:250:33: error: no matching function for call to ‘tf2_ros::TransformBroadcaster::sendTransform(geometry_msgs::msg::TransformStamped_<std::allocator >&)’
br.sendTransform(*imu_tf_msg);
^
In file included from /home/ros/Myspace/rosdev/ros2/release-latest/src/ros2/turtlebot2_demo/turtlebot2_drivers/src/kobuki_node.cpp:42:0:
/opt/ros/kinetic/share/sophus/../../include/tf2_ros/transform_broadcaster.h:63:8: note: candidate: void tf2_ros::TransformBroadcaster::sendTransform(const TransformStamped&)
void sendTransform(const geometry_msgs::TransformStamped & transform);
^
/opt/ros/kinetic/share/sophus/../../include/tf2_ros/transform_broadcaster.h:63:8: note: no known conversion for argument 1 from ‘geometry_msgs::msg::TransformStamped_<std::allocator >’ to ‘const TransformStamped& {aka const geometry_msgs::TransformStamped_<std::allocator >&}’
/opt/ros/kinetic/share/sophus/../../include/tf2_ros/transform_broadcaster.h:67:8: note: candidate: void tf2_ros::TransformBroadcaster::sendTransform(const std::vector<geometry_msgs::TransformStamped_<std::allocator > >&)
void sendTransform(const std::vector<geometry_msgs::TransformStamped> & transforms);
^
/opt/ros/kinetic/share/sophus/../../include/tf2_ros/transform_broadcaster.h:67:8: note: no known conversion for argument 1 from ‘geometry_msgs::msg::TransformStamped_<std::allocator >’ to ‘const std::vector<geometry_msgs::TransformStamped_<std::allocator > >&’
CMakeFiles/kobuki_node.dir/build.make:62: recipe for target 'CMakeFiles/kobuki_node.dir/src/kobuki_node.cpp.o' failed
make[2]: *** [CMakeFiles/kobuki_node.dir/src/kobuki_node.cpp.o] Error 1
CMakeFiles/Makefile2:99: recipe for target 'CMakeFiles/kobuki_node.dir/all' failed
make[1]: *** [CMakeFiles/kobuki_node.dir/all] Error 2
Makefile:138: recipe for target 'all' failed
make: *** [all] Error 2

<== Command '. /home/ros/Myspace/rosdev/ros2/release-latest/build/turtlebot2_drivers/cmake__build.sh && /usr/bin/make -j4 -l4' failed in '/home/ros/Myspace/rosdev/ros2/release-latest/build/turtlebot2_drivers' with exit code '2'
<== Command '. /home/ros/Myspace/rosdev/ros2/release-latest/build/turtlebot2_drivers/cmake__build.sh && /usr/bin/make -j4 -l4' failed in '/home/ros/Myspace/rosdev/ros2/release-latest/build/turtlebot2_drivers' with exit code '2'

Required Info:

  • Operating System:
    • Ubuntu 16.04
  • Installation type:
    • ROS2 source and ROS1 Binary
  • Version or commit hash:
    • master
  • DDS implementation:
    • N/A
  • Client library (if applicable):
    • N/A

Steps to reproduce issue

1. Clone the ROS2 release-latest (a.k.a ardent) and turtlebot2_demo ardent branch
2. Run `src/ament/ament_tools/scripts/ament.py build --build-tests --symlink-install --only-packages turtlebot2_drivers` after sourcing the ROS1 setup.bash which is installed in the way of binary package

Expected behavior

No build error and use ROS2 tf2_ros

Actual behavior

use ROS1 tf2_ros

Additional information


Make the kobuki_node more like the ROS1 kobuki node

The ROS1 kobuki node is written as an event-based loop that takes data as it comes in from the serial line and publishes it to ROS directly. In contrast, the current ROS2 kobuki_node polls for data at 20Hz and publishes it.

Because of this, the ROS1 node publishes data at a much higher rate for IMU (100 Hz) and odometry (50Hz).

I started some work on doing this on this branch. It works as intended, but tends to crash. So we should probably figure out why that is and switch to using that for the kobuki node.

Cannot build the demo

I followed the doc to build the demo, but received the below error messsages, any suggestions/comments?

Built target dumb_teleop
In file included from ros2_ws/src/turtlebot2_demo/turtlebot2_drivers/src/kobuki_node.cpp:40:0:
ros2_ws/install/include/tf2_ros/transform_broadcaster.h:72:32: error: ‘tf2_msgs’ was not declared in this scope
rclcpp::publisher::Publisher<tf2_msgs::msg::TFMessage>::SharedPtr publisher_;

Turtlebot2_cartographer mapping overlay

we run the demo "turtlebot2_cartographer/launch/turtlebot_carto_2d.py" on turtlebot2 by Hokuyo laser(enabled urg_node) , but the mapping meet overlays while turn round the robot.

  • Not sure If community met same issues as below pic?
  • Not see flat_world_imu_node_main.cc(from ROS1) is porting to ROS2, will it be the root cause?

Mapping with Hokuyo UTM-30LX
cartographer_mapping_with_laser

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.