linorobot / linorobot2

Autonomous mobile robots (2WD, 4WD, Mecanum Drive)
Apache License 2.0
436 stars 148 forks source link

Some commands in the install_linorobot2.bash are not working #47

Closed mertsaadet closed 1 year ago

mertsaadet commented 1 year ago

Hi,

I'm trying to run the script using Foxy - Ubuntu 20.04 Setup. It seems that to be able to run the script one must have python3-rospkg package. Even if I source my foxy setup.bash file,

 ROSDISTRO="$(rosversion -d)"

doesn't work. Instead we can use

ROSDISTRO="$(printenv ROS_DISTRO)"

for deciding the ROSDISTRO variable, since in the instructions it says we should source the correct setup.bash beforehand.

In addition to that

if [ LASER_SENSOR=="-" ]
    then
        LASER_SENSOR=""
fi

if [ DEPTH_SENSOR=="-" ]
    then
        DEPTH_SENSOR=""
fi

part is eliminating every sensor thats given. Please take a look at this part, I fixed those parts by changing it to

if [ -z "$LASER_SENSOR" ]
    then
        LASER_SENSOR=""
fi

if [ -z "$DEPTH_SENSOR" ]
    then
        DEPTH_SENSOR=""
fi
grassjelly commented 1 year ago

thanks for posting the issue. This has been fixed here: https://github.com/linorobot/linorobot2/pull/51 . Closing this for now